mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
re-use strip_colors
This commit is contained in:
parent
00d1ac0aef
commit
f66711d53e
5 changed files with 23 additions and 27 deletions
|
@ -98,20 +98,6 @@ pub fn path_to_binary(binary_name: &str) -> PathBuf {
|
|||
path
|
||||
}
|
||||
|
||||
pub fn strip_colors(str: &str) -> String {
|
||||
use roc_reporting::report::ANSI_STYLE_CODES;
|
||||
|
||||
str.replace(ANSI_STYLE_CODES.red, "")
|
||||
.replace(ANSI_STYLE_CODES.green, "")
|
||||
.replace(ANSI_STYLE_CODES.yellow, "")
|
||||
.replace(ANSI_STYLE_CODES.cyan, "")
|
||||
.replace(ANSI_STYLE_CODES.white, "")
|
||||
.replace(ANSI_STYLE_CODES.bold, "")
|
||||
.replace(ANSI_STYLE_CODES.underline, "")
|
||||
.replace(ANSI_STYLE_CODES.reset, "")
|
||||
.replace(ANSI_STYLE_CODES.color_reset, "")
|
||||
}
|
||||
|
||||
pub fn run_roc_with_stdin<I, S>(args: I, stdin_vals: &[&str]) -> Out
|
||||
where
|
||||
I: IntoIterator<Item = S>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue