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:
Looks like it is not ending the list at the comment. Well formatted markdown should have a blank line between block elements, which is displayed correctly. (demo)
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