- Commit
- 5acc7d48c73975769aeb4a5bc0f140d470d85a55
- Parent
- 78e2b78ee1b71bf0b4a3790a72a8f76538980976
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Fix issue with type-7 HTML blocks interrupting paragraphs.
See commonmark/commonmark.js#213.
My personal build of CMark ✏️
Fix issue with type-7 HTML blocks interrupting paragraphs.
See commonmark/commonmark.js#213.
2 files changed, 21 insertions, 0 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | src/blocks.c | 1 | 1 | 0 |
Modified | test/regression.txt | 20 | 20 | 0 |
diff --git a/src/blocks.c b/src/blocks.c @@ -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,
diff --git a/test/regression.txt b/test/regression.txt @@ -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> +```````````````````````````````` +