Open sebpowell opened 1 year ago
Using the CommonMark dingus, entering I think &
or I think &
renders to <p>I think &</p>
. So, the HTML entity in the HTML source doesn't need to be preserved in the resulting Markdown to still render properly. Are you asking for a way to preserve HTML entities, even if they don't need to be preserved to render correctly?
@bjones1 it does need to be preserved in this case:
<br>
which is converted to
<br>
and in this case:
&amp; is an ampersand
and in this case:
A big space
and in this case:
Not a code block
Consider the following HTML example:
When I try converting this to Markdown using Turndown, I get the following output:
I guess I would expect Turndown to preserve HTML entities and to output something like this instead:
I couldn't see an option to turn this on, so unless I'm missing something, I assume I need to use something like https://www.npmjs.com/package/html-entities. But I just wanted to check I'm not missing anything obvious?
Here's the config I'm using:
Any help much appreciated!