mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:57:44 +00:00
LibMarkdown: Add terminal color formatting
This patch adds color formatting to markdown viewed in the terminal. This also increases readability.
This commit is contained in:
parent
5d219ad4f7
commit
7685d53654
2 changed files with 3 additions and 4 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue