mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
fix: allow a tab or end of input after a type 6 html block tag name (#4128)
This commit is contained in:
+1
-1
@@ -165,7 +165,7 @@ const html = edit(
|
||||
+ '|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)' // (3)
|
||||
+ '|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)' // (4)
|
||||
+ '|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)' // (5)
|
||||
+ '|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)' // (6)
|
||||
+ '|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)' // (6)
|
||||
+ '|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)' // (7) open tag
|
||||
+ '|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)' // (7) closing tag
|
||||
+ ')', 'i')
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="x">
|
||||
*stays raw*
|
||||
</div>
|
||||
<TABLE class="x"><tr><td>
|
||||
*stays raw*
|
||||
</td></tr></TABLE>
|
||||
<div
|
||||
class="x">
|
||||
*stays raw*
|
||||
</div>
|
||||
<blockquote>
|
||||
<div class="x">
|
||||
*stays raw*
|
||||
</div>
|
||||
</blockquote>
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="x">
|
||||
*stays raw*
|
||||
</div>
|
||||
|
||||
<TABLE class="x"><tr><td>
|
||||
*stays raw*
|
||||
</td></tr></TABLE>
|
||||
|
||||
<div
|
||||
class="x">
|
||||
*stays raw*
|
||||
</div>
|
||||
|
||||
> <div class="x">
|
||||
> *stays raw*
|
||||
> </div>
|
||||
@@ -0,0 +1,2 @@
|
||||
<p>Paragraph</p>
|
||||
<div
|
||||
@@ -0,0 +1,3 @@
|
||||
Paragraph
|
||||
|
||||
<div
|
||||
Reference in New Issue
Block a user