mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
Document StripAnsiMode and its variants with doc comments
This commit is contained in:
1 parent
62b439dae3
commit
d50b53d0ef
1 file changed
+10
@@ -302,11 +302,21 @@ pub fn strip_overstrike(line: &str, first_backspace: usize) -> String {
|
|||||||
output
|
output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Specify when to strip ANSI escape sequences from the input.
|
||||||
|
///
|
||||||
|
/// Used for both the `--strip-ansi` and the `--sanitize` option, the latter
|
||||||
|
/// implying the former with the same value.
|
||||||
#[derive(Debug, PartialEq, Clone, Copy, Default)]
|
#[derive(Debug, PartialEq, Clone, Copy, Default)]
|
||||||
pub enum StripAnsiMode {
|
pub enum StripAnsiMode {
|
||||||
|
/// Keep escape sequences in the output
|
||||||
#[default]
|
#[default]
|
||||||
Never,
|
Never,
|
||||||
|
|
||||||
|
/// Strip escape sequences from the output
|
||||||
Always,
|
Always,
|
||||||
|
|
||||||
|
/// Strip escape sequences unless the syntax highlighting language is plain
|
||||||
|
/// text, in which case they may be part of what the input wants to display
|
||||||
Auto,
|
Auto,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user