1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibMarkdown: Indent blockquotes inside the terminal renderer

This removes one FIXME :^)
This commit is contained in:
Arda Cinar 2022-12-23 12:32:27 +03:00 committed by Andreas Kling
parent 5cc984d74c
commit c9d434247d

View file

@ -22,8 +22,12 @@ DeprecatedString BlockQuote::render_to_html(bool) const
Vector<DeprecatedString> BlockQuote::render_lines_for_terminal(size_t view_width) const
{
// FIXME: Indent lines inside the blockquote
return m_contents->render_lines_for_terminal(view_width);
Vector<DeprecatedString> lines;
size_t child_width = view_width < 4 ? 0 : view_width - 4;
for (auto& line : m_contents->render_lines_for_terminal(child_width))
lines.append(DeprecatedString::formatted(" {}", line));
return lines;
}
RecursionDecision BlockQuote::walk(Visitor& visitor) const