Skip empty lines in properties highlighting

This commit is contained in:
ema
2025-06-29 06:49:22 +08:00
parent caf301f3f5
commit 9a17d5fa0f
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public class PropertiesHighlightingDefinition : DarkHighlightingDefinition
{ {
var text = CurrentContext.Document.GetText(line); var text = CurrentContext.Document.GetText(line);
if (text.TrimStart().StartsWith("#")) if (string.IsNullOrWhiteSpace(text) || text.TrimStart().StartsWith("#"))
return; return;
int idx = text.IndexOf('='); int idx = text.IndexOf('=');

View File

@@ -68,7 +68,7 @@ public class PropertiesHighlightingDefinition : LightHighlightingDefinition
{ {
var text = CurrentContext.Document.GetText(line); var text = CurrentContext.Document.GetText(line);
if (text.TrimStart().StartsWith("#")) if (string.IsNullOrWhiteSpace(text) || text.TrimStart().StartsWith("#"))
return; return;
int idx = text.IndexOf('='); int idx = text.IndexOf('=');