-
-
Notifications
You must be signed in to change notification settings - Fork 342
Open
Milestone
Description
Given the following markdown:
**strong* still strong**The online reference parser gives this output:
<p><em><em>strong</em> still strong</em>*</p>However, using rule 15 (just below http://spec.commonmark.org/0.27/#can-open-emphasis)
- When two potential emphasis or strong emphasis spans overlap, so that the second begins before the first ends and ends after the first ends, the first takes precedence. Thus, for example,
*foo _bar* baz_is parsed as<em>foo _bar</em>baz_ rather than*foo <em>bar* baz</em>.
I think the output should be this
<p><strong>strong* still strong</strong></p>Instead, the parser is behaving more like it would when faced with rule 16
- When there are two potential emphasis or strong emphasis spans with the same closing delimiter, the shorter one (the one that opens later) takes precedence. Thus, for example,
**foo **bar baz**is parsed as**foo <strong>bar baz</strong>rather than<strong>foo **bar baz</strong>.
Even though these emphasis and strong emphasis spans do not have the same closing delimiter (so this rule should not apply).
Note that I am assuming that the phrase same closing delimiter (which is not formally defined) is referring to a delimiter run as categorised by its starting position in the string (this holds for the example given).
Metadata
Metadata
Assignees
Labels
No labels