mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 17:55:06 +00:00
LibMarkdown: Replace inline styles in HTML with CSS in <head>
This commit is contained in:
parent
e5ec4d35ea
commit
10c19d5207
2 changed files with 8 additions and 4 deletions
|
@ -55,10 +55,10 @@ String CodeBlock::render_to_html() const
|
|||
if (style.emph)
|
||||
builder.append("<i>");
|
||||
|
||||
if (style_language.is_null())
|
||||
builder.append("<code style=\"white-space: pre;\">");
|
||||
if (style_language.is_empty())
|
||||
builder.append("<code>");
|
||||
else
|
||||
builder.appendf("<code style=\"white-space: pre;\" class=\"%s\">", style_language.characters());
|
||||
builder.appendff("<code class=\"{}\">", style_language);
|
||||
|
||||
builder.append(escape_html_entities(m_code));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue