mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-01 04:21:01 +01:00
Run syntax highlighting when --binary=as-text
This commit is contained in:
parent
a769a3d813
commit
0c3b22e0f0
@ -269,7 +269,8 @@ impl<'a> InteractivePrinter<'a> {
|
||||
.content_type
|
||||
.map_or(false, |c| c.is_binary() && !config.show_nonprintable);
|
||||
|
||||
let needs_to_match_syntax = !is_printing_binary
|
||||
let needs_to_match_syntax = (!is_printing_binary
|
||||
|| matches!(config.binary, BinaryBehavior::AsText))
|
||||
&& (config.colored_output || config.strip_ansi == StripAnsiMode::Auto);
|
||||
|
||||
let (is_plain_text, highlighter_from_set) = if needs_to_match_syntax {
|
||||
|
Loading…
Reference in New Issue
Block a user