LibMarkdown: Replace inline styles in HTML with CSS in <head>

This commit is contained in:
Linus Groh 2020-10-31 18:11:44 +00:00 committed by Andreas Kling
commit 10c19d5207
Notes: sideshowbarker 2024-07-19 01:36:55 +09:00
2 changed files with 8 additions and 4 deletions

View file

@ -40,7 +40,11 @@ String Document::render_to_html() const
builder.append("<!DOCTYPE html>\n");
builder.append("<html>\n");
builder.append("<head></head>\n");
builder.append("<head>\n");
builder.append("<style>\n");
builder.append("code { white-space: pre; }\n");
builder.append("</style>\n");
builder.append("</head>\n");
builder.append("<body>\n");
for (auto& block : m_blocks) {