From 1ce23eb640dfb028e755a9d76188df64af5e1ffb Mon Sep 17 00:00:00 2001 From: demostanis Date: Sun, 31 Jul 2022 21:53:45 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibMarkdown/Heading.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibMarkdown/Heading.cpp b/Userland/Libraries/LibMarkdown/Heading.cpp index 0c3f2f3de8..900ec87a50 100644 --- a/Userland/Libraries/LibMarkdown/Heading.cpp +++ b/Userland/Libraries/LibMarkdown/Heading.cpp @@ -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: