Closed markopy closed 3 years ago
If emphasis tags of the same type (em, i) or (strong, b) follow each other without space like this:
<em>foo</em><em>bar</em>
it produces the markdown
*foo**bar*
which is incorrect because it converts back to
<em>foo**bar</em>
per https://spec.commonmark.org/0.29/#example-411
The fix for this seems to be to merge consecutive emphasis tags if they will produce the same type of emphasis (* or **) in markdown. The correct output is simply:
*
**
*foobar*
This is fixed in version 5.0.
If emphasis tags of the same type (em, i) or (strong, b) follow each other without space like this:
it produces the markdown
which is incorrect because it converts back to
per https://spec.commonmark.org/0.29/#example-411
The fix for this seems to be to merge consecutive emphasis tags if they will produce the same type of emphasis (
*
or**
) in markdown. The correct output is simply: