1
0
mirror of https://github.com/sharkdp/bat synced 2026-08-02 18:41:42 +00:00

Allow configuring show_nonprintable from PrettyPrinter

This commit is contained in:
acheronfail
2022-04-01 20:24:33 +10:30
committed by David Peter
parent 49317adcd3
commit b1e67e215c
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -164,6 +164,12 @@ impl<'a> PrettyPrinter<'a> {
self
}
/// Whether to print binary content or nonprintable characters (default: no)
pub fn show_nonprintable(&mut self, yes: bool) -> &mut Self {
self.config.show_nonprintable = yes;
self
}
/// Whether to show "snip" markers between visible line ranges (default: no)
pub fn snip(&mut self, yes: bool) -> &mut Self {
self.active_style_components.snip = yes;