mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add find_syntax_by_path method in order
This commit is contained in:
parent
15a63a21c9
commit
fe9c859f7f
1 changed files with 4 additions and 0 deletions
|
|
@ -40,6 +40,10 @@ impl Syntax {
|
|||
if let Some(reference) = self.syntax_set.find_syntax_by_token(value) {
|
||||
return self.syntect_buffer(source_code, source_tag, reference);
|
||||
}
|
||||
|
||||
if let Some(reference) = self.syntax_set.find_syntax_by_path(value) {
|
||||
return self.syntect_buffer(source_code, source_tag, reference);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(reference) = self.syntax_set.find_syntax_by_first_line(source_code) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue