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

Inline HTML in markdown is not properly processed. #13

Open
eyeszack opened this issue Feb 11, 2017 · 6 comments
Open

Inline HTML in markdown is not properly processed. #13

eyeszack opened this issue Feb 11, 2017 · 6 comments

Comments

@eyeszack
Copy link

According to the markdown syntax description inline HTML is supported for those elements not represented in the syntax. When I include the following inline HTML it is not "passed" through to the output as HTML.

Inline HTML that I want written as is to output HTML:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

Instead it's parsed and rendered as follows:

<p>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css&quot;&gt;  </p>
<p>&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js&quot;&gt;&lt;/script&gt;<br>&lt;script&gt;hljs.initHighlightingOnLoad();&lt;/script&gt;  


</p>

This breaks the desired results when using the HTML file. Please refer to the inline section of the markdown syntax for more information.

https://daringfireball.net/projects/markdown/syntax#html

@JESii
Copy link

JESii commented Jul 4, 2017

Same issue here; this code is not properly handled:

## API
<dl>
<dt><em><b>Digraph.new() </b></em>
<dd>Initialize the Directed Graph
<hl>

Surrounding each html tag with spaces does not resolve this issue.

This is a fatal flaw which makes this unusable in the general case.

@larrykluger
Copy link

Unfortunately I have the same issue. My thought is to use sed to convert the escaped entities back to their original form.

@larrykluger
Copy link

Solved!

You can run the output through the recode utility. StackOverflow info.

Example:

markdown changes.md | recode html..ascii > changes.htm

@cwjohan
Copy link
Owner

cwjohan commented Nov 16, 2017 via email

@mohsentaleb
Copy link

mohsentaleb commented May 14, 2018

@cwjohan I'm having the same issue with list items inside a table (<li>). Are you planning to fix this?
I understand this thread is quite old, back to 2017.

@cwjohan
Copy link
Owner

cwjohan commented May 14, 2018 via email

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

5 participants