Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion markdown_it/rules_block/html_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def html_block(state: StateBlock, startLine: int, endLine: int, silent: bool) ->
# Let's roll down till block end.
if not html_seq[1].search(lineText):
while nextLine < endLine:
if state.sCount[nextLine] < state.blkIndent:
if state.sCount[nextLine] < state.blkIndent and not state.isEmpty(nextLine):
break

pos = state.bMarks[nextLine] + state.tShift[nextLine]
Expand Down
24 changes: 24 additions & 0 deletions tests/test_port/fixtures/commonmark_extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,3 +749,27 @@ Issue #204. Combination of blockquotes, list and newlines causes an IndexError
</li>
</ul>
.

Issue #377. HTML comment block inside list item should not end at blank line
.
1. item

<!--
comment with

blank line inside
-->
paragraph
.
<ol>
<li>
<p>item</p>
<!--
comment with

blank line inside
-->
<p>paragraph</p>
</li>
</ol>
.