mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:47:45 +00:00
LibMarkdown: Add LineIterator
LineIterator wraps a vector's ConstIterator, to provide an iterator that can work on indented container blocks (like lists and blockquotes).
This commit is contained in:
parent
cd560d3ae3
commit
10f6f6a723
16 changed files with 139 additions and 21 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue