fix: fix html comment after list (#3518)

This commit is contained in:
Tony Brix
2024-11-07 10:22:52 -07:00
committed by GitHub
parent a73f85ed25
commit a612576ff6
3 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -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) {
+8
View File
@@ -5,3 +5,11 @@
<div class="some-class">
Content
</div>
<ul>
<li>list item 1</li>
<li>list item 2</li>
</ul>
<!--
Comment
-->
+6
View File
@@ -3,3 +3,9 @@
<div class="some-class">
Content
</div>
- list item 1
- list item 2
<!--
Comment
-->