mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibMarkdown: Limit headings to 6 levels
This commit is contained in:
parent
c15c57a6af
commit
116e0dc4de
Notes:
sideshowbarker
2024-07-17 11:32:03 +09:00
Author: https://github.com/petelliott Commit: https://github.com/SerenityOS/serenity/commit/116e0dc4de Pull-request: https://github.com/SerenityOS/serenity/pull/13803
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user