1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:27:45 +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:
xSlendiX 2022-02-16 23:12:30 +02:00 committed by Andreas Kling
parent 19b7a5fe0d
commit 5d219ad4f7
4 changed files with 10 additions and 5 deletions

View file

@ -45,12 +45,11 @@ String List::render_for_terminal(size_t) const
for (auto& item : m_items) {
builder.append(" ");
if (m_is_ordered)
builder.appendff("{}. ", ++i);
builder.appendff("{}.", ++i);
else
builder.append("* ");
builder.append("*");
builder.append(item->render_for_terminal());
}
builder.append("\n");
return builder.build();
}