summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMarkdown/List.h
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/List.h
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/List.h')
-rw-r--r--Userland/Libraries/LibMarkdown/List.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMarkdown/List.h b/Userland/Libraries/LibMarkdown/List.h
index ead37cffb1..10271403fd 100644
--- a/Userland/Libraries/LibMarkdown/List.h
+++ b/Userland/Libraries/LibMarkdown/List.h
@@ -9,6 +9,7 @@
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include <LibMarkdown/Block.h>
+#include <LibMarkdown/LineIterator.h>
#include <LibMarkdown/Text.h>
namespace Markdown {
@@ -25,7 +26,7 @@ public:
virtual String render_to_html() const override;
virtual String render_for_terminal(size_t view_width = 0) const override;
- static OwnPtr<List> parse(Vector<StringView>::ConstIterator& lines);
+ static OwnPtr<List> parse(LineIterator& lines);
private:
// TODO: List items should be considered blocks of their own kind.