Run syntax highlighting when --binary=as-text

This commit is contained in:
einfachIrgendwer0815 2024-06-01 00:13:03 +02:00
parent a769a3d813
commit 0c3b22e0f0
No known key found for this signature in database
GPG Key ID: 58D55E5F117DA873

View File

@ -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 {