mirror of
https://github.com/jht5945/finding.git
synced 2025-12-27 13:20:03 +08:00
ref print
This commit is contained in:
@@ -115,10 +115,10 @@ fn match_lines(tag: &str, content: &str, options: &Options) -> bool {
|
|||||||
} else {
|
} else {
|
||||||
let ss: Vec<&str> = match_line.line_string.split(search_text).collect();
|
let ss: Vec<&str> = match_line.line_string.split(search_text).collect();
|
||||||
for j in 0..ss.len() {
|
for j in 0..ss.len() {
|
||||||
print!("{}", ss[j]);
|
if j != 0 {
|
||||||
if j < ss.len() - 1 {
|
|
||||||
print_color(Some(term::color::RED), true, search_text);
|
print_color(Some(term::color::RED), true, search_text);
|
||||||
}
|
}
|
||||||
|
print!("{}", ss[j]);
|
||||||
}
|
}
|
||||||
println!();
|
println!();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user