Another markdown parser error, this time with [link]

markdown

(Kane York) #1
[[Article](http://boingboing.net/2013/12/18/moon.html)] [[Forum](http://bbs.boingboing.net/t/the-moon-is-terrifying-and-thats-why-i-love-it/16969/)]

Intended result (using HTML):
[Article] [Forum]

Actual:
[Article] [Forum]

Adding another [, it works:
[Article] [[Forum]


(Jeff Atwood) #2

Did you try it in babelmark?

http://johnmacfarlane.net/babelmark2/

If not you should.

(I say this because markdown is not a “robust” “standard”, if the bug exists in lots of other implementations, etc.)


(Kane York) #3

I get 2 parsers giving errors, and Maruku 0.7.0 appears to have given up (which is what we see above). marked 0.2.6 places the opening bracket inside the links, and peg-markdown 0.4.14 has no space between the two links.

The two most common are:

<p>[<a href="http://boingboing.net/2013/12/18/moon.html">Article</a>] [<a href="http://bbs.boingboing.net/t/the-moon-is-terrifying-and-thats-why-i-love-it/16969/">Forum</a>]</p>

(with 6) and

<p>[<a href="http://boingboing.net/2013/12/18/moon.html">Article</a>] [<a href="http://bbs.boingboing.net/t/the-moon-is-terrifying-and-thats-why-i-love-it/16969/">Forum</a>]</p>

(with 9). By the way, I see no difference between those two.


(Rikki Tooley) #4

Is that markdown formatting? Looking like Wikipedian to me. Only styles i’ve seen are Stack Exchange/ Discourse and Reddit/ Ghost - (label)[link] (or the other way round, i can never remember)

edit: i just stumbled across another parse bug, i wrote stuff after the ghost link example…


(Régis Hanol) #5

@riking: Adding a \ at the beginning makes it work :wink:

Using markdown: [Article] [Forum]

@haiku: It’s not a bug, you’re not using the markdown syntax properly. A link with a label is [label](link) and not (label)[link].


(Sam Saffron) #6

Closing as we will not fix, new CommonMark engine will take care of it.

Test against GitHub - markdown-it/markdown-it: Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed , if it is an issue there raise a bug on GitHub.


(Sam Saffron) #7