summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMarkdown/ContainerBlock.cpp
diff options
context:
space:
mode:
authorPeter Elliott <pelliott@ualberta.ca>2021-09-19 11:14:18 -0600
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-10-05 13:27:25 +0330
commit10f6f6a723b2cec608d9499e27c28b7343d6e51f (patch)
tree89c3947d3ce78c57f10b74ea7f07097cef4d610f /Userland/Libraries/LibMarkdown/ContainerBlock.cpp
parentcd560d3ae3c5dd618f54f802f1efffe633ba75a5 (diff)
downloadserenity-10f6f6a723b2cec608d9499e27c28b7343d6e51f.zip
LibMarkdown: Add LineIterator
LineIterator wraps a vector's ConstIterator, to provide an iterator that can work on indented container blocks (like lists and blockquotes).
Diffstat (limited to 'Userland/Libraries/LibMarkdown/ContainerBlock.cpp')
-rw-r--r--Userland/Libraries/LibMarkdown/ContainerBlock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibMarkdown/ContainerBlock.cpp b/Userland/Libraries/LibMarkdown/ContainerBlock.cpp
index 6acc5f3226..7585d635ee 100644
--- a/Userland/Libraries/LibMarkdown/ContainerBlock.cpp
+++ b/Userland/Libraries/LibMarkdown/ContainerBlock.cpp
@@ -39,7 +39,7 @@ String ContainerBlock::render_for_terminal(size_t view_width) const
}
template<typename BlockType>
-static bool try_parse_block(Vector<StringView>::ConstIterator& lines, NonnullOwnPtrVector<Block>& blocks)
+static bool try_parse_block(LineIterator& lines, NonnullOwnPtrVector<Block>& blocks)
{
OwnPtr<BlockType> block = BlockType::parse(lines);
if (!block)
@@ -48,7 +48,7 @@ static bool try_parse_block(Vector<StringView>::ConstIterator& lines, NonnullOwn
return true;
}
-OwnPtr<ContainerBlock> ContainerBlock::parse(Vector<StringView>::ConstIterator& lines)
+OwnPtr<ContainerBlock> ContainerBlock::parse(LineIterator& lines)
{
NonnullOwnPtrVector<Block> blocks;