Skip to content

Commit

Permalink
Fix issue with type-7 HTML blocks interrupting paragraphs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Feb 7, 2021
1 parent 78e2b78 commit 5acc7d4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ static void open_new_blocks(cmark_parser *parser, cmark_node **container,
} else if (!indented && ((matched = scan_html_block_start(
input, parser->first_nonspace)) ||
(cont_type != CMARK_NODE_PARAGRAPH &&
!maybe_lazy &&
(matched = scan_html_block_start_7(
input, parser->first_nonspace))))) {
*container = add_child(parser, *container, CMARK_NODE_HTML_BLOCK,
Expand Down
20 changes: 20 additions & 0 deletions test/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,23 @@ Issue #334 - UTF-8 BOM
.
<h1>Hi</h1>
````````````````````````````````

Issue commonmark.js#213 - type 7 blocks can't interrupt
paragraph

```````````````````````````````` example
- <script>
- some text
some other text
</script>
.
<ul>
<li>
<script>
</li>
<li>some text
some other text
</script></li>
</ul>
````````````````````````````````

Expand Down

0 comments on commit 5acc7d4

Please sign in to comment.