#953·showdown

makeMarkdown inserts newline where it's not supposed to

Author: diogen737Created Sep 14, 2022Updated Nov 26, 2025

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:

xml
<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