Mihir
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
30 additions and
1 deletions
-
lib/rules_block/html_block.mjs
-
test/fixtures/markdown-it/commonmark_extras.txt
|
|
|
@ -46,7 +46,10 @@ export default function html_block (state, startLine, endLine, silent) { |
|
|
|
// Let's roll down till block end.
|
|
|
|
if (!HTML_SEQUENCES[i][1].test(lineText)) { |
|
|
|
for (; nextLine < endLine; nextLine++) { |
|
|
|
if (state.sCount[nextLine] < state.blkIndent) { break } |
|
|
|
if (state.sCount[nextLine] < state.blkIndent) { |
|
|
|
// Allow empty lines to stay inside list items per CommonMark rules.
|
|
|
|
if (!(state.listIndent >= 0 && state.isEmpty(nextLine))) { break } |
|
|
|
} |
|
|
|
|
|
|
|
pos = state.bMarks[nextLine] + state.tShift[nextLine] |
|
|
|
max = state.eMarks[nextLine] |
|
|
|
|
|
|
|
@ -740,3 +740,29 @@ Html in image description |
|
|
|
. |
|
|
|
<p><img src="image.png" alt="text <textarea> text"></p> |
|
|
|
. |
|
|
|
|
|
|
|
Issue #1144: HTML comment block in list item with blank line |
|
|
|
. |
|
|
|
1. item |
|
|
|
|
|
|
|
para |
|
|
|
<!-- |
|
|
|
a |
|
|
|
|
|
|
|
b |
|
|
|
--> |
|
|
|
c |
|
|
|
. |
|
|
|
<ol> |
|
|
|
<li> |
|
|
|
<p>item</p> |
|
|
|
<p>para</p> |
|
|
|
<!-- |
|
|
|
a |
|
|
|
|
|
|
|
b |
|
|
|
--> |
|
|
|
<p>c</p> |
|
|
|
</li> |
|
|
|
</ol> |
|
|
|
. |
|
|
|
|