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
commit c9d434247d
Notes: sideshowbarker 2024-07-17 02:24:06 +09:00

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