Closed aakodadi closed 2 years ago
What browser is this happening on?
This seems related to: https://github.com/showdownjs/showdown/issues/861 That issue seems to have the problem where these entity counterparts are created, and you are having the opposite problem.
What browser is this happening on?
This seems related to: #861 That issue seems to have the problem where these entity counterparts are created, and you are having the opposite problem.
I am using it as a command line tool with Node.js v17.3.0 not on a browser. And yes, you are right, it seems to be the opposite of #861. However, my issue happens with markdown style code blocks (with four spaces prefix and ``</code>) and #861 is for HTML style code blocks (using
` tags)
EDIT: I believe that #861 is not an issue (correct me if I'm wrong), it's supposed to behave that way.
Never mind, showdown works correctly. My issue was caused by something else.
What I did:
I have a markdown file that looks like this:
I use the command line tool to generate the HTML file.
What I expect:
Since the lines are prefixed with four spaces, I expect them to be interpreted as code and the
<
and>
symbols in<stdio.h>
and<stdlib.h>
should be replaced by their entities counterparts. i.e<
and>
What I got:
My HTML looks like this:
<
and>
are left as they are in the resulting HTML. As a result, the browser interpret<stdio.h>
and<stdlib.h>
as HTML tags, and they don't appear as text.Version
1.9.1