diff options
-rw-r--r-- | src/color.rs | 6 | ||||
-rw-r--r-- | src/config.rs | 4 | ||||
-rw-r--r-- | src/main.rs | 3 | ||||
-rw-r--r-- | src/syntect_utils.rs (renamed from src/syntect_color.rs) | 0 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/color.rs b/src/color.rs index 8b7428be..e7c3f62f 100644 --- a/src/color.rs +++ b/src/color.rs @@ -7,7 +7,7 @@ use lazy_static::lazy_static; use syntect::highlighting::Color as SyntectColor; use crate::bat_utils::terminal::to_ansi_color; -use crate::syntect_color; +use crate::syntect_utils; pub fn parse_color(s: &str, true_color: bool) -> Option<Color> { if s == "normal" { @@ -22,8 +22,8 @@ pub fn parse_color(s: &str, true_color: bool) -> Option<Color> { } else { s.parse::<u8>() .ok() - .and_then(syntect_color::syntect_color_from_ansi_number) - .or_else(|| syntect_color::syntect_color_from_ansi_name(s)) + .and_then(syntect_utils::syntect_color_from_ansi_number) + .or_else(|| syntect_utils::syntect_color_from_ansi_name(s)) .unwrap_or_else(die) }; to_ansi_color(syntect_color, true_color) diff --git a/src/config.rs b/src/config.rs index 4a93cfe2..15b3b75d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -21,7 +21,7 @@ use crate::features::side_by_side; use crate::git_config::{GitConfig, GitConfigEntry}; use crate::paint::BgFillMethod; use crate::style::{self, Style}; -use crate::syntect_color; +use crate::syntect_utils; use crate::wrapping::WrapConfig; pub const INLINE_SYMBOL_WIDTH_1: usize = 1; @@ -292,7 +292,7 @@ impl From<cli::Opt> for Config { hyperlinks_file_link_format: opt.hyperlinks_file_link_format, inspect_raw_lines: opt.computed.inspect_raw_lines, inline_hint_color: Some(SyntectStyle { - foreground: syntect_color::syntect_color_from_ansi_name("blue").unwrap(), + foreground: syntect_utils::syntect_color_from_ansi_name("blue").unwrap(), ..SyntectStyle::default() }), keep_plus_minus_markers: opt.keep_plus_minus_markers, diff --git a/src/main.rs b/src/main.rs index 8b382a34..21b6e749 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,8 @@ mod style; mod wrapping; mod subcommands; -mod syntect_color; +mod syntect_utils; + mod tests; use std::io::{self, ErrorKind}; diff --git a/src/syntect_color.rs b/src/syntect_utils.rs index 3569b318..3569b318 100644 --- a/src/syntect_color.rs +++ b/src/syntect_utils.rs |