From 7685d53654ecc4537ed259adeb9363a78bbde229 Mon Sep 17 00:00:00 2001 From: xSlendiX Date: Wed, 16 Feb 2022 23:13:56 +0200 Subject: LibMarkdown: Add terminal color formatting This patch adds color formatting to markdown viewed in the terminal. This also increases readability. --- Userland/Libraries/LibMarkdown/Text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibMarkdown/Text.cpp') diff --git a/Userland/Libraries/LibMarkdown/Text.cpp b/Userland/Libraries/LibMarkdown/Text.cpp index faae1d4353..1d91ebf648 100644 --- a/Userland/Libraries/LibMarkdown/Text.cpp +++ b/Userland/Libraries/LibMarkdown/Text.cpp @@ -156,7 +156,7 @@ void Text::LinkNode::render_for_terminal(StringBuilder& builder) const { bool is_linked = href.contains("://"); if (is_linked) { - builder.append("\e]8;;"); + builder.append("\033[0;34m\e]8;;"); builder.append(href); builder.append("\e\\"); } @@ -165,7 +165,7 @@ void Text::LinkNode::render_for_terminal(StringBuilder& builder) const if (is_linked) { builder.appendff(" <{}>", href); - builder.append("\033]8;;\033\\"); + builder.append("\033]8;;\033\\\033[0m"); } } -- cgit v1.2.3