showdown
showdown copied to clipboard
makeMarkdown inserts newline where it's not supposed to
The makeMarkdown method inserts two newline symbols after each html-like block in the resulting markdown (<sub> in this example, but also with <s> and <u>).
Input:
<p>wtf? and <strong><em>bold</em></strong> again <sub>and</sub> again</p>
Expected output:
wtf? and ***bold*** again <sub>and</sub> again\n\n
Output:
wtf? and ***bold*** again <sub>and</sub>\n\n again\n\n
Pretty sure this is caused by https://github.com/showdownjs/showdown/blob/95255984ad80acf745ed74605bd3ad8357dc9b33/src/subParsers/makemarkdown/node.js#L121 Adding this blank line should probably be conditional on the node being a block-level element