mirror of
https://github.com/sharkdp/bat
synced 2024-11-16 21:25:56 +00:00
Fix Typo
This commit is contained in:
parent
b3657aef2b
commit
cab5ddf6ae
@ -94,10 +94,10 @@ impl<'a> SyntaxMapping<'a> {
|
||||
|
||||
pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
|
||||
let candidate = Candidate::new(path.as_ref());
|
||||
let canddidate_filename = path.as_ref().file_name().map(Candidate::new);
|
||||
let candidate_filename = path.as_ref().file_name().map(Candidate::new);
|
||||
for (ref glob, ref syntax) in self.mappings.iter().rev() {
|
||||
if glob.is_match_candidate(&candidate)
|
||||
|| canddidate_filename
|
||||
|| candidate_filename
|
||||
.as_ref()
|
||||
.map_or(false, |filename| glob.is_match_candidate(filename))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user