summaryrefslogtreecommitdiff
path: root/Libraries/LibMarkdown/MDList.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2019-09-21 00:46:18 +0300
committerAndreas Kling <awesomekling@gmail.com>2019-09-28 18:29:42 +0200
commit2e80b2b32f2448502db3acc99b6a403ecb7dc835 (patch)
tree96de88dd3abeb30700270e3d003a73f1edbaa5e5 /Libraries/LibMarkdown/MDList.h
parentdd5541fefc2763368627d8e6e39e93eeead36000 (diff)
downloadserenity-2e80b2b32f2448502db3acc99b6a403ecb7dc835.zip
Libraries: Add LibMarkdown
Diffstat (limited to 'Libraries/LibMarkdown/MDList.h')
-rw-r--r--Libraries/LibMarkdown/MDList.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/Libraries/LibMarkdown/MDList.h b/Libraries/LibMarkdown/MDList.h
new file mode 100644
index 0000000000..c1e58dc9bb
--- /dev/null
+++ b/Libraries/LibMarkdown/MDList.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <AK/Vector.h>
+#include <LibMarkdown/MDBlock.h>
+#include <LibMarkdown/MDText.h>
+
+class MDList final : public MDBlock {
+public:
+ virtual ~MDList() override {}
+
+ virtual String render_to_html() const override;
+ virtual String render_for_terminal() const override;
+ virtual bool parse(Vector<StringView>::ConstIterator& lines) override;
+
+private:
+ // TODO: List items should be considered blocks of their own kind.
+ Vector<MDText> m_items;
+ bool m_is_ordered { false };
+};