sirthias / pegdown

A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions
http://pegdown.org
Apache License 2.0
1.29k stars 217 forks source link

StrongEmphSuperNode not properly parsed after special chars #196

Closed martinklepsch closed 9 years ago

martinklepsch commented 9 years ago

There's a testcase here: https://github.com/martinklepsch/pegdown/commit/aa36ef5a779f093b02b8cd9e5cda93c770170782

Somehow parsing (**this** ... will not properly turn this into a StrongEmphSuperNode.

vsch commented 9 years ago

That is correct. Emphasis markers have to be preceded by a blank.

martinklepsch commented 9 years ago

Interesting. I didn't know. How does one achieve something like (this is bold then? Apparently Github Flavoured Markdown supports it.

vsch commented 9 years ago

Yes, GFM has a lot of changes. Some good, some not so much. For example, I recently found out that you can indent nested lists with just one space for second level, and two spaces for the third.

It is changing an already loose spec for Markdown in areas where it isn't that critical.

vsch commented 9 years ago

Forgot to answer your question:

(<strong>test</strong>

See:

(test

Deraen commented 9 years ago

As far as I can tell, CommonMark supports this: http://spec.commonmark.org/0.22/#example-355

It looks like the most complete markdown specification.