Skip to content

Commit 12a6b35

Browse files
committed
Remove boolean value type from ASS highlighting
1 parent 1f13aa6 commit 12a6b35

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Dark/SubStationAlphaHighlightingDefinition.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,6 @@ private ValueType DetecteType(string input)
478478
if (double.TryParse(input, out _))
479479
return ValueType.Numeric;
480480

481-
if (bool.TryParse(input, out _))
482-
return ValueType.Boolean;
483-
484481
return ValueType.String;
485482
}
486483

@@ -489,7 +486,6 @@ private string GetValueColor(ValueType type)
489486
return type switch
490487
{
491488
ValueType.Numeric => "#B5CEA8",
492-
ValueType.Boolean => "#719BD1",
493489
ValueType.String or _ => "#CE9178",
494490
};
495491
}
@@ -520,8 +516,6 @@ public static InlineText[] SplitWords(string input)
520516
return [];
521517

522518
var result = new List<InlineText>();
523-
// 定义正则表达式:匹配非分隔符的连续字符段
524-
// 分隔符包括:空格 \ { } ( ) , (注意 \\ 需要双转义)
525519
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
526520
foreach (Match match in matches)
527521
{
@@ -558,7 +552,6 @@ private enum ValueType
558552
{
559553
String,
560554
Numeric,
561-
Boolean,
562555
}
563556

564557
public sealed class SessionStore : Dictionary<string, Session>

QuickLook.Plugin/QuickLook.Plugin.TextViewer/Themes/HighlightingDefinitions/Light/SubStationAlphaHighlightingDefinition.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,6 @@ private ValueType DetecteType(string input)
478478
if (double.TryParse(input, out _))
479479
return ValueType.Numeric;
480480

481-
if (bool.TryParse(input, out _))
482-
return ValueType.Boolean;
483-
484481
return ValueType.String;
485482
}
486483

@@ -489,7 +486,6 @@ private string GetValueColor(ValueType type)
489486
return type switch
490487
{
491488
ValueType.Numeric => "#098658",
492-
ValueType.Boolean => "#0000FF",
493489
ValueType.String or _ => "#A31515",
494490
};
495491
}
@@ -520,8 +516,6 @@ public static InlineText[] SplitWords(string input)
520516
return [];
521517

522518
var result = new List<InlineText>();
523-
// 定义正则表达式:匹配非分隔符的连续字符段
524-
// 分隔符包括:空格 \ { } ( ) , (注意 \\ 需要双转义)
525519
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
526520
foreach (Match match in matches)
527521
{
@@ -558,7 +552,6 @@ private enum ValueType
558552
{
559553
String,
560554
Numeric,
561-
Boolean,
562555
}
563556

564557
public sealed class SessionStore : Dictionary<string, Session>

0 commit comments

Comments
 (0)