summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-02-19 01:20:07 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-02-18 19:20:07 -0500
commit27afbd135162b435c8af22b18622656ccab12174 (patch)
tree335eef4fed61632602722e70e6fbda7b7aa277df
parent57dee15844ceaabb2f8c74d564363f44285c5464 (diff)
Match TypeScript & JavaScript error colors (#1793)
-rw-r--r--src/ansi.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index e25a8257d..73ae00949 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -1,6 +1,5 @@
-use ansi_term::Color::Cyan;
+use ansi_term::Color::Fixed;
use ansi_term::Color::Red;
-use ansi_term::Color::Yellow;
use ansi_term::Style;
use regex::Regex;
use std::borrow::Cow;
@@ -47,7 +46,8 @@ pub fn italic_bold(s: String) -> impl fmt::Display {
pub fn yellow(s: String) -> impl fmt::Display {
let mut style = Style::new();
if use_color() {
- style = style.fg(Yellow);
+ // matches TypeScript's ForegroundColorEscapeSequences.Yellow
+ style = style.fg(Fixed(11));
}
style.paint(s)
}
@@ -55,7 +55,8 @@ pub fn yellow(s: String) -> impl fmt::Display {
pub fn cyan(s: String) -> impl fmt::Display {
let mut style = Style::new();
if use_color() {
- style = style.fg(Cyan);
+ // matches TypeScript's ForegroundColorEscapeSequences.Cyan
+ style = style.fg(Fixed(14));
}
style.paint(s)
}