-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
HTML following between two comments don't get recognized as HTML #1032
Comments
An issue within the `html` regex in the markdown parser `marked` (see: markedjs/marked#1032) makes the current code not be correctly parsed for the site. Adding blank lines between the comments and the HTML code temporarily fixed the issues. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ref webhintio/webhintio.github.io#364 Fix webhintio/webhintio.github.io#364 Close #771
There sure are a lot of Thanks for reporting this @qzhou1607 ! |
Sounds fair. I don't know the specs well enough to understand their stance on comments. Logically it's just part of HTML - but I'm weird when it comes to my Markdown (avoid putting HTML in there like the plague). :) |
Expectation
Result
What was attempted
As shown above, HTML code between two comments are identified as
paragraph
s instead ofhtml
. Inserting blank lines between the comments and the HTML code in markdown temporarily solved the rendering issue. But the html regex inmarked.js
needs to be modified to recognize HTML both before and after a comment.Alternatively, it could just mention in the documentation that blank lines are required between the comments and the HTML code.
https://github.com/chjj/marked/blob/84c330b62beee7dab83764f373eaf80414b2516e/lib/marked.js#L23
The text was updated successfully, but these errors were encountered: