diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2021-09-28 01:12:00 -0600 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-10-05 13:27:25 +0330 |
commit | 0a21c2bace9797f835718bf4ea45fb09a5a2297a (patch) | |
tree | a2056944cefc95c1753e08b542e205ffc8fe77d5 /Userland/Libraries/LibMarkdown/HorizontalRule.h | |
parent | 5bb87c630c5599309f29977512d7719ff6cae2eb (diff) | |
download | serenity-0a21c2bace9797f835718bf4ea45fb09a5a2297a.zip |
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.)
Diffstat (limited to 'Userland/Libraries/LibMarkdown/HorizontalRule.h')
-rw-r--r-- | Userland/Libraries/LibMarkdown/HorizontalRule.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMarkdown/HorizontalRule.h b/Userland/Libraries/LibMarkdown/HorizontalRule.h index f4568ce214..034b2233ea 100644 --- a/Userland/Libraries/LibMarkdown/HorizontalRule.h +++ b/Userland/Libraries/LibMarkdown/HorizontalRule.h @@ -21,7 +21,7 @@ public: } virtual ~HorizontalRule() 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<HorizontalRule> parse(LineIterator& lines); }; |