mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-02-02 01:09:36 +08:00
Skip empty lines in properties highlighting
This commit is contained in:
@@ -67,7 +67,7 @@ public class PropertiesHighlightingDefinition : DarkHighlightingDefinition
|
||||
{
|
||||
var text = CurrentContext.Document.GetText(line);
|
||||
|
||||
if (text.TrimStart().StartsWith("#"))
|
||||
if (string.IsNullOrWhiteSpace(text) || text.TrimStart().StartsWith("#"))
|
||||
return;
|
||||
|
||||
int idx = text.IndexOf('=');
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PropertiesHighlightingDefinition : LightHighlightingDefinition
|
||||
{
|
||||
var text = CurrentContext.Document.GetText(line);
|
||||
|
||||
if (text.TrimStart().StartsWith("#"))
|
||||
if (string.IsNullOrWhiteSpace(text) || text.TrimStart().StartsWith("#"))
|
||||
return;
|
||||
|
||||
int idx = text.IndexOf('=');
|
||||
|
||||
Reference in New Issue
Block a user