diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Dark/PropertiesHighlightingDefinition.cs b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Dark/PropertiesHighlightingDefinition.cs index 4eed277..dd98e26 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Dark/PropertiesHighlightingDefinition.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Dark/PropertiesHighlightingDefinition.cs @@ -66,14 +66,19 @@ public class PropertiesHighlightingDefinition : DarkHighlightingDefinition protected override void ColorizeLine(DocumentLine line) { var text = CurrentContext.Document.GetText(line); - int idx = text.IndexOf('='); - if (idx > 0) + + if (!text.TrimStart().StartsWith("#")) { - ChangeLinePart( - line.Offset, - line.Offset + idx, + int idx = text.IndexOf('='); + + if (idx > 0) + { + ChangeLinePart( + line.Offset, + line.Offset + idx, el => el.TextRunProperties.SetForegroundBrush("#3F9CD6".ToBrush()) - ); + ); + } } } } diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Light/PropertiesHighlightingDefinition.cs b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Light/PropertiesHighlightingDefinition.cs index 38afc09..e5c2630 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Light/PropertiesHighlightingDefinition.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Light/PropertiesHighlightingDefinition.cs @@ -67,14 +67,19 @@ public class PropertiesHighlightingDefinition : LightHighlightingDefinition protected override void ColorizeLine(DocumentLine line) { var text = CurrentContext.Document.GetText(line); - int idx = text.IndexOf('='); - if (idx > 0) + + if (!text.TrimStart().StartsWith("#")) { - ChangeLinePart( - line.Offset, - line.Offset + idx, - el => el.TextRunProperties.SetForegroundBrush(Colors.Blue.ToBrush()) - ); + int idx = text.IndexOf('='); + + if (idx > 0) + { + ChangeLinePart( + line.Offset, + line.Offset + idx, + el => el.TextRunProperties.SetForegroundBrush(Colors.Blue.ToBrush()) + ); + } } } }