mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 04:39:10 +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
Notes:
sideshowbarker
2024-07-17 18:37:51 +09:00
Author: https://github.com/xslendix
Commit: 5d219ad4f7
Pull-request: https://github.com/SerenityOS/serenity/pull/12586
Reviewed-by: https://github.com/petelliott ✅
4 changed files with 10 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue