mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
756 stars 138 forks source link

Emphasis and "the rule of three" #107

Closed mity closed 4 years ago

mity commented 4 years ago

The following input:

***foo *bar baz***

is currently translated to

<p>***foo <em>bar baz</em>**</p>

However it should really be

<p>*<strong>foo <em>bar baz</em></strong></p>

Rationale: The rule of three does not apply when both the opening and closing delimiter run have the lengths which are multiplies of three.

mity commented 4 years ago

This seems to be related to #98: Its fix seems to be incomplete.