html comment after list causes all remaining content be commented out #3515
Labels
category: html blocks
category: lists
L2 - annoying
Similar to L1 - broken but there is a known workaround available for the issue
Marked version: 14.1.3
Describe the bug
When a html comment appears directly after a list, the rest of the content can become incorrectly commented out
To Reproduce
Try rendering the markdown:
https://marked.js.org/demo/?text=-%20list%0A%3C!--%0A-%20a%0A--%3E%0A%0AMore%20text%0A&options=%7B%0A%20%22async%22%3A%20false%2C%0A%20%22breaks%22%3A%20false%2C%0A%20%22extensions%22%3A%20null%2C%0A%20%22gfm%22%3A%20true%2C%0A%20%22hooks%22%3A%20null%2C%0A%20%22pedantic%22%3A%20false%2C%0A%20%22silent%22%3A%20false%2C%0A%20%22tokenizer%22%3A%20null%2C%0A%20%22walkTokens%22%3A%20null%0A%7D&version=14.1.3
Expected behavior
The content after the comment is not shown. Looking at the html source, you can see that an unclosed comment is created which contains the rest of the document:
Seems to work on commonmark and for markdown-it
The text was updated successfully, but these errors were encountered: