Marked: Bold formatting in single line not properly parsed.

Created on 6 Jul 2018  路  3Comments  路  Source: markedjs/marked

Describe the bug
In marked demo page, with default github flavoured markdown. Bold formatting in single line not properly parsed.
To Reproduce
Steps to reproduce the behavior:
Here is recording of bug :
Bug Recording

I used this :
Marked Demo


Expected behavior
Input : "First letter bold",
Expected output : Only F, l and b should be bold in above sentence.
Actual output: "F*irst *letter bold",

L1 - broken inline elements

Most helpful comment

your marked demo just points to the demo page without the code

here is the actual Marked Demo

here is the CommonMark Demo

All 3 comments

your marked demo just points to the demo page without the code

here is the actual Marked Demo

here is the CommonMark Demo

I ran into this too, so here's a little more info from my testing:

The bug becomes apparent with any wrapped single character followed by another instance of the same markup (regardless of how many characters are wrapped). The bug will repeat if multiple pairs of markup occur in the same line, starting with the first wrapped single character encountered.

Examples:

*a* b *cd* d 

*a* b *cd* d *e* f *g* h

*ad* b *c* d *e* f *g* h

As demonstrated, this also applies to italics and presumably any other markup processed in the same manner. I hope this helps!

This may be the same problem as #1297

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amejiarosario picture amejiarosario  路  3Comments

FireflyAndStars picture FireflyAndStars  路  3Comments

priyesh-diukar picture priyesh-diukar  路  3Comments

gclove picture gclove  路  4Comments

vsemozhetbyt picture vsemozhetbyt  路  4Comments