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

Fix visibility for SyntaxMapping::get_syntax_for

This change was made in 31fb708, but then was reverted (I assume incorrectly)
in 6246485.
This commit is contained in:
cyqsimon
2023-11-04 21:42:17 +08:00
parent 4815b6155e
commit 7e1fbcfe95

View File

@@ -290,7 +290,7 @@ impl<'a> SyntaxMapping<'a> {
&self.mappings
}
pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
pub fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
// Try matching on the file name as-is.
let candidate = Candidate::new(&path);
let candidate_filename = path.as_ref().file_name().map(Candidate::new);