Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makeMarkdown inserts newline where it's not supposed to #953

Open
diogen737 opened this issue Sep 14, 2022 · 1 comment
Open

makeMarkdown inserts newline where it's not supposed to #953

diogen737 opened this issue Sep 14, 2022 · 1 comment

Comments

@diogen737
Copy link

diogen737 commented Sep 14, 2022

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
@layaxx
Copy link

layaxx commented Mar 29, 2023

Pretty sure this is caused by

txt = node.outerHTML + '\n\n';

Adding this blank line should probably be conditional on the node being a block-level element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants