mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Warn when building assets from files if some referenced contexts are missing
This commit is contained in:
1 parent
5f5b77cdda
commit
50e1c6074f
3 files changed
+15
-6
No files matched your search
+10
-1
@@ -111,8 +111,17 @@ impl HighlightingAssets {
|
||||
);
|
||||
}
|
||||
|
||||
let syntax_set = syntax_set_builder.build();
|
||||
let missing_contexts = syntax_set.find_unlinked_contexts();
|
||||
if !missing_contexts.is_empty() {
|
||||
println!("Some referenced contexts could not be found!");
|
||||
for context in missing_contexts {
|
||||
println!("- {}", context);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(HighlightingAssets::new(
|
||||
Some(syntax_set_builder.build()),
|
||||
Some(syntax_set),
|
||||
None,
|
||||
theme_set,
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user