Libraries: Add LibMarkdown

This commit is contained in:
Sergey Bugaev 2019-09-21 00:46:18 +03:00 committed by Andreas Kling
commit 2e80b2b32f
Notes: sideshowbarker 2024-07-19 11:57:43 +09:00
17 changed files with 711 additions and 1 deletions

View file

@ -0,0 +1,20 @@
#pragma once
#include <LibMarkdown/MDBlock.h>
#include <LibMarkdown/MDText.h>
class MDCodeBlock final : public MDBlock {
public:
virtual ~MDCodeBlock() override {}
virtual String render_to_html() const override;
virtual String render_for_terminal() const override;
virtual bool parse(Vector<StringView>::ConstIterator& lines) override;
private:
String style_language() const;
MDText::Style style() const;
String m_code;
MDText m_style_spec;
};