Page 2 of 5

Re: What do you think about Markdown?

Posted: Mon Jul 21, 2014 9:18 am
by brunoais
Sorry for undigging but I only knew that this existed now.
Personally, I like MarkDown. But still, I think that MarkDown does not work well without BBCode to support it.

Markdown, for me, is quite limiting, specially with the extensions. Checkout the multiple ways of doing markdown, each one with their own ideas.
  • Stackoverflow: I think they have had the best idea for the links. You write the text, add a reference at the end of the text then the url goes at the bottom (it allows other ways). But then, a new line is not a new line; {space}{space}{Enter} is a new line (so when reading the text, you better select it or actually look at the preview, else you will get a surprise). Also, It forces lists to start at 1... Always, there's no way to change that. Escaping does not really work the way a programmer expects.

    Code: Select all

    3\.  
    4\.
    Instead of expected:

    Code: Select all

    \3.  
    \4.
    When it comes down to more custom stuff... they enter into a way greyer area where the MarkDown is not more readable than BBCode.
  • Github: Thankfully, new line means new line. I wonder about tables, though.
Tables in MarkDown can easily become a mess where you don't know which column is which. That's like BBCode except in BBCode you can format it differently such that that does not become a bother, in MarkDown... Take time and will to keep your source with all columns about the same width or you are stuck with the mess.

Lastely, extending MarkDown to allow it to do more is madness. Anything outside the small simple stuff is a nightmare, also because there's no easy format, adding something to MarkDown means to meddle with actual code which most BB administrators hate.

What I think we can do is to allow having a MarkDown to BBCode client side js translator that allows the user to write in MarkDown instead of BBCode and then it translates the MarkDown to BBCode. If the messages are simple like the ones we have been using on github, it should work well for most forum posts that require only very simple formating.

Re: What do you think about Markdown?

Posted: Mon Jul 21, 2014 9:29 am
by JoshyPHP
brunoais wrote:But then, a new line is not a new line; {space}{space}{Enter} is a new line
I think that the perception of Markdown's line breaking rules as a issue is exaggerated. When I started using Markdown, it felt like it's going to be an issue but after a while I completely forgot about it. In the context of a forum, we rarely need a single line break. Look at your post. There's only one instance of a single line break, at the beginning. Everything else is a double line break used to separate paragraphs.

Wrt escaping \3. or 3\. I think I know why Markdown implementation restrict the use of the backslash to special characters, it's because people rarely need to escape things. The backslash is more often used in a context where it should be reproduced as-is. For instance, Foo\Bar to describe the name of a PHP class, or emotes such as :-\

Re: What do you think about Markdown?

Posted: Mon Jul 21, 2014 10:42 am
by brunoais
Hum... I don't know if you noticed but I like MarkDown and I never thought it is wrong or a bad idea. As long as texts are (markup-wise) simple, MarkDown is really well thought out. The problem appears when you want more than the simple.
MarkDown is thought as a nearly 1:1 you type; you get. For me, in MarkDown, your concern is to tell it what you want to mention and that's great when you want some simple text with some minor formatting (with enphasis and bolded text) or when you want to type in a document that does not need any specific complex text requirements.

BBCode you tell it what it is about. A tag can mean something as simple as bold or it can mean a complete javascript equivalent. Heck, although stupid, a BBCode can mean to place a WYSIWYG editor inside the post itself with some text as default!
I've seen many examples of BBCode usage where MarkDown would be too stupid. For example, a forum about comics where there is a sub-forum where the comics are presented. it must include a table with a specific format (that should be the same) and also the required data it needs.
With BBCode, just an XML-like format with only the required data will be enough for it to display the table with all the requirements in the way the admin wants. With MarkDown... You'll have to make the table yourself and you are screwed if the table requires some special look (that is not the same as the other tables) specified in the CSS.
This is just an example of a reality I've seen! It is also why I feel that MarkDown is OK for forum but without HTML turned on and with BBCode included.

For phpBB, I think that we could place an editor that allows MarkDown (disabled by default) and BBCode as the source and is WYSIWYG and then, when submitted, it submits it in BBCode. I think, that way, we can please the most crowd.
I'll work on that for my current WIP extension. I was interested already anyway.

Re: What do you think about Markdown?

Posted: Mon Jul 21, 2014 12:08 pm
by callumacrae
brunoais wrote:Markdown, for me, is quite limiting, specially with the extensions.
How's it limiting? You can do literally whatever you want in Markdown xD

Re: What do you think about Markdown?

Posted: Mon Jul 21, 2014 1:08 pm
by brunoais
There are things that MarkDown does not allow.
How would do you MarkDown for a spoiler? AFAIK there's still no well defined (if it exists anywhere) MarkDown markup for that. In order to do that you will have to go into BBCode territory (even if you are still typing in MarkDown).
For those kinds of things, MarkDown was thought to use HTML directly but the HTML that can be allowed is really very small.

Re: What do you think about Markdown?

Posted: Tue Jul 22, 2014 7:41 am
by callumacrae
brunoais wrote:There are things that MarkDown does not allow.
How would do you MarkDown for a spoiler? AFAIK there's still no well defined (if it exists anywhere) MarkDown markup for that. In order to do that you will have to go into BBCode territory (even if you are still typing in MarkDown).
For those kinds of things, MarkDown was thought to use HTML directly but the HTML that can be allowed is really very small.

Code: Select all

>! This is a spoiler on StackOverflow

Code: Select all

[Description](#s "This is a spoiler on Reddit")
Not really BBCode.

Re: What do you think about Markdown?

Posted: Tue Jul 22, 2014 8:05 am
by brunoais
The spoiler on stackoverflow is weird. Feels like a quote that starts with an exclamation point except it isn't.
Imagine that you had only access to the source code and you are not familiar with MarkDown. Would you say that's a spoiler identifier?
I'd think it is a quote that starts with an exclamation point.

Reddit's spoiler is single line only which is also decently annoying is you want more than that.

Thankfully, for those two, I don't feel like they need spoilers for the majority of times while a bulletin board way more often than not has a spoiler tag and uses that spoiler tag frequently.

MarkDown is supposed to be a markup based on how people got used to identify different things where only plain text is allowed. All markup identifiers were thought with that in mind. When it comes to these kinds of things it comes into a mess or into BBCode realm (at least, in terms of complexity).
I've been seeing the same with wiki text in some wiki software.

Re: What do you think about Markdown?

Posted: Sat Jul 26, 2014 1:05 pm
by CarstenF
This is not directly related to the dear fellows' posts immediately above, but I just came home from a two-week trip where I had no access to the Internet but via a mobile phone and a tablet, and would like to add a few thoughts:
  • Keyboard implementations on tablets, no matter how good they are (in my case an iPad Air, but I guess it is similar with other platforms as well) make typing BBcode really really cumbersome and frustrating. If posts could be written in markdown instead, it would be a huge help whenever a full PC hardware keyboard is not available.
  • Original Markdown definition is of course by John Gruber, but I very much like the extensions as used and presented by Pandoc:
    http://johnmacfarlane.net/pandoc/README ... s-markdown
  • If Markdown was added in a backwards-compatible manner to phpBB's BBcode, and/or enabled only on the user's or admin's discretion, would there be a big need for extensions that exceed the "minimal" Markdown as defined by John Gruber (or Pandoc)? I'm asking because it seems whenever an extension is missing, one can always fall back to the relevant BBcode.

Re: What do you think about Markdown?

Posted: Sun Jul 27, 2014 12:30 pm
by brunoais
CarstenF wrote:This is not directly related to the dear fellows' posts immediately above, but I just came home from a two-week trip where I had no access to the Internet but via a mobile phone and a tablet, and would like to add a few thoughts:
  • Keyboard implementations on tablets, no matter how good they are (in my case an iPad Air, but I guess it is similar with other platforms as well) make typing BBcode really really cumbersome and frustrating. If posts could be written in markdown instead, it would be a huge help whenever a full PC hardware keyboard is not available.
Is it hard or unpleasant to press the buttons to generate the BBCode tags' text?
I hardly use those touch screen devices (I don't like that way of inputing nearly as much as keyboard (even if it is a simple phone keyboard)).
CarstenF wrote:
  • Original Markdown definition is of course by John Gruber, but I very much like the extensions as used and presented by Pandoc:
    http://johnmacfarlane.net/pandoc/README ... s-markdown
  • If Markdown was added in a backwards-compatible manner to phpBB's BBcode, and/or enabled only on the user's or admin's discretion, would there be a big need for extensions that exceed the "minimal" Markdown as defined by John Gruber (or Pandoc)? I'm asking because it seems whenever an extension is missing, one can always fall back to the relevant BBcode.
I have nothing directly against MD. I think that if someone would like to make an extension parser for MD for phpBB it's perfectly OK! For starters, I think it would be the best to have it to parse the MD into BBCode instead of MD to HTML due to how phpBB's BBCode parser work and because the BBCode parser has the tendency to make changes to the output forcing some of the MD to be lost.

Re: What do you think about Markdown?

Posted: Sun Jul 27, 2014 1:49 pm
by callumacrae
brunoais wrote: Is it hard or unpleasant to press the buttons to generate the BBCode tags' text?
It's horrific.

Re: What do you think about Markdown?

Posted: Sun Jul 27, 2014 2:30 pm
by CarstenF
brunoais wrote:Is it hard or unpleasant to press the buttons to generate the BBCode tags' text?
Yes, definitively!
With German keyboard layout (and I suspect the same is true for many other non-US layouts as well), it is even difficult with a regular, full PC hardware keyboard, as explained in my earlier post.

On a tablet (touch screen keyboard), it's even worse, both with US and non-US layouts.

Markdown would be a huge help in all of these cases.
CarstenF wrote:I have nothing directly against MD. I think that if someone would like to make an extension parser for MD for phpBB it's perfectly OK! For starters, I think it would be the best to have it to parse the MD into BBCode instead of MD to HTML due to how phpBB's BBCode parser work and because the BBCode parser has the tendency to make changes to the output forcing some of the MD to be lost.
Well, this would probably not be ideal (enter your post in MD, edit the same post in BBCode later?), but if the implementation is easier this way, why not? It would be a good start and certainly be better than nothing.
Iirc, something like this has been discussed on Aera51 before, but it seems that I cannot find the relevant threads right now...

Re: What do you think about Markdown?

Posted: Sun Jul 27, 2014 5:47 pm
by A_Jelly_Doughnut

Re: What do you think about Markdown?

Posted: Sun Jul 27, 2014 7:46 pm
by CarstenF
A_Jelly_Doughnut wrote:Possibly this thread?
http://area51.phpbb.com/phpBB/viewtopic ... 08&t=44467
Right, thanks! :)

Re: What do you think about Markdown?

Posted: Mon Jul 28, 2014 6:58 am
by Arty
What if instead of writing bbcode there was a wysiwyg editor, like modern websites have?

Then users won't care what is behind that editor - bbcode, html. But markdown wouldn't make any sense. Its hard if not impossible to implement md with wysiwyg editor.

It is useful for mobile phones though. Right now I'm writing this from phone, before this was replying to pm on other forum that has wysiwyg. It is quite hard to write bbcode, selecting text in wysiwyg is total pita. Would love md for phones. Maybe some bbcode <-> md convertor to make it possible to type basic md on phones and then convert it to bbcode? Advanced stuff and custom bbcodes can remain bbcodes. Could be an idea for 3.1 ext!

Re: What do you think about Markdown?

Posted: Mon Jul 28, 2014 8:00 am
by CarstenF
Arty wrote:What if instead of writing bbcode there was a wysiwyg editor, like modern websites have?
Imho, wysiwyg editors are nice as long as they work, e.g. all the simple cases like bold, italics, link URLs, etc.
It gets horrible as soon as the editor gets into the way and reliably does not do what the user wants, e.g. indenting the wrong paragraph(s) of text in a list, mis-aligning images, etc. Therefore, personally I don't like wysiwyg editors, unless you can toggle them into "source code view".

Btw., a nice alternative that can be seen e.g. in recent versions of Trac is a "dynamic preview": You type the (Wiki) text in a text input field, and the preview of the rendered text is automatically and dynamically updated in a preview pane on the same web page, without a need to press the "Preview" button.

Alas, all this seems to be completely orthogonal to Markdown, which is a great alternative (or addition) to BBCode, but unrelated to the wysiwyg or preview features.