showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.26k stars 1.56k forks source link

[bug] Md/Html conversions aren't working properly #791

Open guilhermecastro-hotmart opened 4 years ago

guilhermecastro-hotmart commented 4 years ago

Hey!

I am using your converter, and after some tests I faced this behavior. When I try to parse a text interspersed between italic, bold, italic and bold the conversion is 'eating' some spaces.

Markdown: **bold** *italic* **bold** *italic*

Markdown to HTML: <strong>bold</strong> <em>italic</em> <strong>bold</strong> <em>italic</em> bold italic bold italic

Markdown to HTML to Markdown: **bold** *italic***bold***italic*

image

It's also reproduced on the demo here: https://codepen.io/guilhermecastros/pen/MWaVrge