chores: ratatui span -> lines

This commit is contained in:
Jack Wills
2023-06-03 23:41:16 +00:00
parent 4da1fb599d
commit 0d37ac5501
2 changed files with 25 additions and 25 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ pub mod log_sanitizer {
text::{Span, Line},
};
/// Attempt to colorize the given string to tui-rs standards
/// Attempt to colorize the given string to ratatui standards
pub fn colorize_logs<'a>(input: &str) -> Vec<Line<'a>> {
vec![Line::from(
categorise_text(input)
@@ -39,7 +39,7 @@ pub mod log_sanitizer {
)]
}
/// Remove all ansi formatting from a given string and create tui-rs spans
/// Remove all ansi formatting from a given string and create ratatui Lines
pub fn remove_ansi<'a>(input: &str) -> Vec<Line<'a>> {
raw(&categorise_text(input)
.into_iter()
@@ -47,7 +47,7 @@ pub mod log_sanitizer {
.collect::<String>())
}
/// create tui-rs spans that exactly match the given strings
/// create ratatui Lines that exactly match the given strings
pub fn raw<'a>(input: &str) -> Vec<Line<'a>> {
vec![Line::from(Span::raw(input.to_owned()))]
}