mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +00:00
LibMarkdown: Add additional spacing for terminal rendering
This patch adds spacing to give a sense of structure to markdown documents viewed in the terminal. This also makes the content easier to read.
This commit is contained in:
parent
19b7a5fe0d
commit
5d219ad4f7
4 changed files with 10 additions and 5 deletions
|
@ -49,8 +49,11 @@ String CodeBlock::render_for_terminal(size_t) const
|
|||
{
|
||||
StringBuilder builder;
|
||||
|
||||
builder.append(m_code);
|
||||
builder.append("\n\n");
|
||||
for (auto line : m_code.split('\n')) {
|
||||
builder.append(" ");
|
||||
builder.append(line);
|
||||
builder.append("\n");
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue