Emphasis Delimiter Parsing Difference with Hard Linebreaks


#1

The emphasis delimiters * and _ are parsed differently when proceeded by a hard linebreak. For example, compare the ASTs of

__strong__\
...

http://spec.commonmark.org/dingus/?text=__strong__\ next

and

**strong**\
...

http://spec.commonmark.org/dingus/?text=**strong**\ next

Only the latter, with the ending ** delimiter, is parsed as strong emphasis. The former is parsed into three text elements: [’__’, ‘strong’, ‘__’]. Why?

I can’t tell from the spec whether this – admittedly surprising – result is intentional or not.


Odd behaviour with colon, emphasis and linebreak
#2

Asterisks work inside words, underscores do not. A forced line break should clearly count as a word boundary and therefore this is a bug.


#3

@Crissov Is this a confirmed bug? I.e. shall I fix it?


#4

All Commonmark implementations except commonmark.js agree on this, see Babelmark.


#5

Now filed as an issue at Github:


#6

Great.

Thank you for creating a Github Issue, Christoph.