1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

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
parent 3ec87ecc75
commit d2f9fee4ab
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) {