浏览代码

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.
demostanis 3 年之前
父节点
当前提交
1ce23eb640
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibMarkdown/Heading.cpp

+ 1 - 1
Userland/Libraries/LibMarkdown/Heading.cpp

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