mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:17:34 +00:00
LibMarkdown: Re-add support for Serenity's style code blocks extension
I decided to not use the text parser for this one and rely on a regex to parse the style tags. This way it supports only and opening delimiter run and also is much simpler.
This commit is contained in:
parent
565b561522
commit
6ae1a80583
2 changed files with 32 additions and 3 deletions
|
@ -14,9 +14,10 @@ namespace Markdown {
|
|||
|
||||
class CodeBlock final : public Block {
|
||||
public:
|
||||
CodeBlock(const String& language, const String& code)
|
||||
CodeBlock(String const& language, String const& style, String const& code)
|
||||
: m_code(move(code))
|
||||
, m_language(language)
|
||||
, m_style(style)
|
||||
{
|
||||
}
|
||||
virtual ~CodeBlock() override { }
|
||||
|
@ -28,6 +29,7 @@ public:
|
|||
private:
|
||||
String m_code;
|
||||
String m_language;
|
||||
String m_style;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue