mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-18 22:52:37 +00: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);
|
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('=');
|
||||||
|
@@ -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('=');
|
||||||
|
Reference in New Issue
Block a user