Avoid spurious highlight runs in Language::highlight_text
This commit is contained in:
parent
d330f909e6
commit
03d7035630
2 changed files with 7 additions and 1 deletions
|
@ -51,6 +51,10 @@ impl HighlightMap {
|
|||
}
|
||||
|
||||
impl HighlightId {
|
||||
pub fn is_default(&self) -> bool {
|
||||
*self == DEFAULT_SYNTAX_HIGHLIGHT_ID
|
||||
}
|
||||
|
||||
pub fn style(&self, theme: &SyntaxTheme) -> Option<HighlightStyle> {
|
||||
theme
|
||||
.highlights
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue