You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML following between two comments don't get recognized as HTML #1032
<!-- This is a comment --><details><summary>
This is the summary.
</summary>
Hello!
hello!
hello!
</details><!-- This is a comment -->
Expectation
<!-- This is a comment --><details><summary>
This is the summary.
</summary>
Hello!
hello!
hello!
</details><!-- This is a comment -->
Result
<!-- This is a comment --><p><details></p><p><summary>
This is the summary.
</summary>
Hello!</p><p>hello!</p><p>hello!
</details><!-- This is a comment --></p>
What was attempted
As shown above, HTML code between two comments are identified as paragraphs instead of html. Inserting blank lines between the comments and the HTML code in markdown temporarily solved the rendering issue. But the html regex in marked.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.
There sure are a lot of \n inside the html regex...
Commonmark.js parses this as expected.
I'g flag this for 0.4 and categorize under html (/mixed content ?)
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). :)
Activity
Chore: Make <details> be displayed correctly
Feder1co5oave commentedon Jan 23, 2018
There sure are a lot of
\ninside the html regex...Commonmark.js parses this as expected.
I'g flag this for 0.4 and categorize under html (/mixed content ?)
Thanks for reporting this @qzhou1607 !
joshbruce commentedon Jan 24, 2018
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). :)
joshbruce commentedon Jan 24, 2018
#985