mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
fix: fix html comment after list (#3518)
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
@@ -5,3 +5,11 @@
|
||||
<div class="some-class">
|
||||
Content
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li>list item 1</li>
|
||||
<li>list item 2</li>
|
||||
</ul>
|
||||
<!--
|
||||
Comment
|
||||
-->
|
||||
|
||||
@@ -3,3 +3,9 @@
|
||||
<div class="some-class">
|
||||
Content
|
||||
</div>
|
||||
|
||||
- list item 1
|
||||
- list item 2
|
||||
<!--
|
||||
Comment
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user