trentm/python-markdown2

Formatting error when input contains multiple words surrounded by triple asterisks

ryanvilbrandt opened this issue · 2 comments

Describe the bug
When the markdown input contains multiple words surrounded by triple asterisks (bold and italics), the output is improperly formatted.

To Reproduce

BELFRY: In fact, what would you know about ***ANY*** of this?!
BELFRY: You've never had to look after anything in your ***LIFE!***

Expected behavior
I expect the output to look like this:

<p>BELFRY: In fact, what would you know about <strong><em>ANY</em></strong> of this?!<br />
BELFRY: You've never had to look after anything in your <strong><em>LIFE!</em></strong></p>

Actual behavior
Output:

<p>BELFRY: In fact, what would you know about <strong><em>ANY</em><em>* of this?!<br />
BELFRY: You've never had to look after anything in your *</em><em>LIFE!</em></strong></p>

Debug info
Version of library being used:
2.4.11

Any extras being used:
strike, break-on-newline

Additional context
This bug was introduced in 2.4.11. The output is formatted properly on 2.4.10.

I tested against 2.4.11 and then master and the bug has since been resolved (I think by #545). Until 2.4.12 gets released, a workaround could be to install version <=2.4.10

2.4.12 has now been released, thanks!