mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Libraries: Add LibMarkdown
This commit is contained in:
parent
dd5541fefc
commit
2e80b2b32f
Notes:
sideshowbarker
2024-07-19 11:57:43 +09:00
Author: https://github.com/bugaevc
Commit: 2e80b2b32f
Pull-request: https://github.com/SerenityOS/serenity/pull/609
Reviewed-by: https://github.com/awesomekling ✅
17 changed files with 711 additions and 1 deletions
20
Libraries/LibMarkdown/MDCodeBlock.h
Normal file
20
Libraries/LibMarkdown/MDCodeBlock.h
Normal 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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue