LibMarkdown: Recognize and handle comments

This also improves Commonmark coverage, e.g. it fixes tests
HTML_blocks_ex179_2894..2906 and Lists_ex308_5439..5457.

In other words, we go from 271 out of 652 to 273 out of 652.
This commit is contained in:
Ben Wiederhake 2021-10-23 14:12:27 +02:00 committed by Linus Groh
commit d2f9fee4ab
Notes: sideshowbarker 2024-07-18 01:38:42 +09:00
5 changed files with 116 additions and 2 deletions

View file

@ -107,8 +107,12 @@ OwnPtr<ContainerBlock> ContainerBlock::parse(LineIterator& lines)
has_blank_lines = has_blank_lines || has_trailing_blank_lines;
}
bool any = try_parse_block<Table>(lines, blocks) || try_parse_block<List>(lines, blocks) || try_parse_block<CodeBlock>(lines, blocks)
|| try_parse_block<Heading>(lines, blocks) || try_parse_block<HorizontalRule>(lines, blocks)
bool any = try_parse_block<Table>(lines, blocks)
|| try_parse_block<List>(lines, blocks)
|| try_parse_block<CodeBlock>(lines, blocks)
|| try_parse_block<CommentBlock>(lines, blocks)
|| try_parse_block<Heading>(lines, blocks)
|| try_parse_block<HorizontalRule>(lines, blocks)
|| try_parse_block<BlockQuote>(lines, blocks);
if (any) {