diff --git a/src/Tokenizer.ts b/src/Tokenizer.ts index f29795e704..f8bf850573 100644 --- a/src/Tokenizer.ts +++ b/src/Tokenizer.ts @@ -305,7 +305,7 @@ export class _Tokenizer { const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`); const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`); const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`); - const htmlBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}<[a-z].*>`, 'i'); + const htmlBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}<(?:[a-z].*>|!--)`, 'i'); // Check if following lines should be included in List Item while (src) { diff --git a/test/specs/new/html_following_list.html b/test/specs/new/html_following_list.html index 349d4136cb..7cbb6643ef 100644 --- a/test/specs/new/html_following_list.html +++ b/test/specs/new/html_following_list.html @@ -5,3 +5,11 @@
Content
+ + + diff --git a/test/specs/new/html_following_list.md b/test/specs/new/html_following_list.md index 52c2113123..6275de00eb 100644 --- a/test/specs/new/html_following_list.md +++ b/test/specs/new/html_following_list.md @@ -3,3 +3,9 @@
Content
+ +- list item 1 +- list item 2 +