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

Issue with new lines in generated HTML out of MD #839

Open FilipJakab opened 3 years ago

FilipJakab commented 3 years ago

Hello, Im trying to use this library and I have come across an issue. For simple text like: Some body the library outputs just the original text thats good but when I try to use some formatting e.g. This is **some** <u>body </u>to test it produces this:

"This is **some **<u>content </u>

to test"

The way I make markdown (serves as a reference to below screenshots) image Initialization of showdown image

These are the value and result for just simple bold - that works image

These are the value and result when trying to add underline - this does not work image

In last screenshot of input/output params there is visible, that the showdown does add \n\n after the <u> tag.

Is there something I might be doing wrong?

Thanks in advance

FilipJakab commented 3 years ago

Here is jsfiddle: https://jsfiddle.net/fady6hw5/2/