mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibMarkdown: Emit properly formed HTML documents
This commit is contained in:
parent
2c035f5072
commit
517e78a7e2
1 changed files with 6 additions and 0 deletions
|
@ -9,11 +9,17 @@ String MDDocument::render_to_html() const
|
|||
{
|
||||
StringBuilder builder;
|
||||
|
||||
builder.append("<!DOCTYPE html>\n");
|
||||
builder.append("<html>\n");
|
||||
builder.append("<body>\n");
|
||||
|
||||
for (auto& block : m_blocks) {
|
||||
auto s = block.render_to_html();
|
||||
builder.append(s);
|
||||
}
|
||||
|
||||
builder.append("</body>\n");
|
||||
builder.append("</html>\n");
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue