mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
LibMarkdown: Implement "tightness" for lists
From the commonmark spec: A list is loose if any of its constituent list items are separated by blank lines, or if any of its constituent list items directly contain two block-level elements with a blank line between them. Otherwise a list is tight. (The difference in HTML output is that paragraphs in a loose list are wrapped in <p> tags, while paragraphs in a tight list are not.)
This commit is contained in:
parent
5bb87c630c
commit
0a21c2bace
15 changed files with 75 additions and 28 deletions
|
@ -23,7 +23,7 @@ public:
|
|||
}
|
||||
virtual ~CodeBlock() override { }
|
||||
|
||||
virtual String render_to_html() const override;
|
||||
virtual String render_to_html(bool tight = false) const override;
|
||||
virtual String render_for_terminal(size_t view_width = 0) const override;
|
||||
static OwnPtr<CodeBlock> parse(LineIterator& lines);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue