summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibMarkdown/List.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibMarkdown/List.cpp b/Libraries/LibMarkdown/List.cpp
index 15cd47d80a..52bc2816fe 100644
--- a/Libraries/LibMarkdown/List.cpp
+++ b/Libraries/LibMarkdown/List.cpp
@@ -142,8 +142,10 @@ OwnPtr<List> List::parse(Vector<StringView>::ConstIterator& lines)
first = false;
if (!item_builder.is_empty())
item_builder.append(' ');
+ ASSERT(offset <= line.length());
item_builder.append(line.substring_view(offset, line.length() - offset));
++lines;
+ offset = 0;
}
if (!flush_item_if_needed() || first)