mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-14 23:00:37 +01: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>> {
|
pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
|
||||||
let candidate = Candidate::new(path.as_ref());
|
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() {
|
for (ref glob, ref syntax) in self.mappings.iter().rev() {
|
||||||
if glob.is_match_candidate(&candidate)
|
if glob.is_match_candidate(&candidate)
|
||||||
|| canddidate_filename
|
|| candidate_filename
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or(false, |filename| glob.is_match_candidate(filename))
|
.map_or(false, |filename| glob.is_match_candidate(filename))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user