LibMarkdown: Fix coloring of the first line

The escape sequence to color a section's name was separated
by a newline from the section's name, making less(1) trim
the escape sequence off when the section's name was on the
first line.
This commit is contained in:
demostanis 2022-07-31 21:53:45 +02:00 committed by Brian Gianforcaro
commit 1ce23eb640
Notes: sideshowbarker 2024-07-17 08:26:13 +09:00

View file

@ -19,7 +19,7 @@ String Heading::render_for_terminal(size_t) const
{
StringBuilder builder;
builder.append("\033[0;31;1m\n"sv);
builder.append("\n\033[0;31;1m"sv);
switch (m_level) {
case 1:
case 2: