diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2022-04-24 22:56:00 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-26 15:02:26 +0200 |
commit | 116e0dc4dec62c18e71a517b0564860e0945ad30 (patch) | |
tree | d322092bc679940364f7d7213afe878b584eb2de /Userland/Libraries/LibMarkdown | |
parent | c15c57a6af582e8d8433bc1b293b471743fe2dc0 (diff) | |
download | serenity-116e0dc4dec62c18e71a517b0564860e0945ad30.zip |
LibMarkdown: Limit headings to 6 levels
Diffstat (limited to 'Userland/Libraries/LibMarkdown')
-rw-r--r-- | Userland/Libraries/LibMarkdown/Heading.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMarkdown/Heading.cpp b/Userland/Libraries/LibMarkdown/Heading.cpp index c4b54aef91..2eb24c0447 100644 --- a/Userland/Libraries/LibMarkdown/Heading.cpp +++ b/Userland/Libraries/LibMarkdown/Heading.cpp @@ -57,7 +57,7 @@ OwnPtr<Heading> Heading::parse(LineIterator& lines) break; } - if (!level || level >= line.length() || line[level] != ' ') + if (!level || level >= line.length() || line[level] != ' ' || level > 6) return {}; StringView title_view = line.substring_view(level + 1, line.length() - level - 1); |