summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMarkdown
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2022-04-24 22:56:00 -0600
committerAndreas Kling <kling@serenityos.org>2022-04-26 15:02:26 +0200
commit116e0dc4dec62c18e71a517b0564860e0945ad30 (patch)
treed322092bc679940364f7d7213afe878b584eb2de /Userland/Libraries/LibMarkdown
parentc15c57a6af582e8d8433bc1b293b471743fe2dc0 (diff)
downloadserenity-116e0dc4dec62c18e71a517b0564860e0945ad30.zip
LibMarkdown: Limit headings to 6 levels
Diffstat (limited to 'Userland/Libraries/LibMarkdown')
-rw-r--r--Userland/Libraries/LibMarkdown/Heading.cpp2
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);