1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-12 00:02:28 +01:00

Separate inputs from config

This commit is contained in:
sharkdp
2020-04-21 21:14:44 +02:00
committed by David Peter
parent 5e5cb89da6
commit 1dc328ad49
10 changed files with 61 additions and 41 deletions

View File

@@ -219,6 +219,7 @@ impl HighlightingAssets {
.get_extension_syntax(&file_name)
.or(self.get_first_line_syntax(reader)),
(_, InputFile::ThemePreviewFile) => self.syntax_set.find_syntax_by_name("Rust"),
(None, InputFile::FromReader(s, _)) => None,
};
syntax.unwrap_or_else(|| self.syntax_set.find_syntax_plain_text())