mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 18:39:45 +00:00
Remove boolean value type from ASS highlighting
This commit is contained in:
@@ -478,9 +478,6 @@ public class SubStationAlphaHighlightingDefinition : DarkHighlightingDefinition
|
|||||||
if (double.TryParse(input, out _))
|
if (double.TryParse(input, out _))
|
||||||
return ValueType.Numeric;
|
return ValueType.Numeric;
|
||||||
|
|
||||||
if (bool.TryParse(input, out _))
|
|
||||||
return ValueType.Boolean;
|
|
||||||
|
|
||||||
return ValueType.String;
|
return ValueType.String;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,7 +486,6 @@ public class SubStationAlphaHighlightingDefinition : DarkHighlightingDefinition
|
|||||||
return type switch
|
return type switch
|
||||||
{
|
{
|
||||||
ValueType.Numeric => "#B5CEA8",
|
ValueType.Numeric => "#B5CEA8",
|
||||||
ValueType.Boolean => "#719BD1",
|
|
||||||
ValueType.String or _ => "#CE9178",
|
ValueType.String or _ => "#CE9178",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -520,8 +516,6 @@ public class SubStationAlphaHighlightingDefinition : DarkHighlightingDefinition
|
|||||||
return [];
|
return [];
|
||||||
|
|
||||||
var result = new List<InlineText>();
|
var result = new List<InlineText>();
|
||||||
// 定义正则表达式:匹配非分隔符的连续字符段
|
|
||||||
// 分隔符包括:空格 \ { } ( ) , (注意 \\ 需要双转义)
|
|
||||||
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
|
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
|
||||||
foreach (Match match in matches)
|
foreach (Match match in matches)
|
||||||
{
|
{
|
||||||
@@ -558,7 +552,6 @@ public class SubStationAlphaHighlightingDefinition : DarkHighlightingDefinition
|
|||||||
{
|
{
|
||||||
String,
|
String,
|
||||||
Numeric,
|
Numeric,
|
||||||
Boolean,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class SessionStore : Dictionary<string, Session>
|
public sealed class SessionStore : Dictionary<string, Session>
|
||||||
|
@@ -478,9 +478,6 @@ public class SubStationAlphaHighlightingDefinition : LightHighlightingDefinition
|
|||||||
if (double.TryParse(input, out _))
|
if (double.TryParse(input, out _))
|
||||||
return ValueType.Numeric;
|
return ValueType.Numeric;
|
||||||
|
|
||||||
if (bool.TryParse(input, out _))
|
|
||||||
return ValueType.Boolean;
|
|
||||||
|
|
||||||
return ValueType.String;
|
return ValueType.String;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -489,7 +486,6 @@ public class SubStationAlphaHighlightingDefinition : LightHighlightingDefinition
|
|||||||
return type switch
|
return type switch
|
||||||
{
|
{
|
||||||
ValueType.Numeric => "#098658",
|
ValueType.Numeric => "#098658",
|
||||||
ValueType.Boolean => "#0000FF",
|
|
||||||
ValueType.String or _ => "#A31515",
|
ValueType.String or _ => "#A31515",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -520,8 +516,6 @@ public class SubStationAlphaHighlightingDefinition : LightHighlightingDefinition
|
|||||||
return [];
|
return [];
|
||||||
|
|
||||||
var result = new List<InlineText>();
|
var result = new List<InlineText>();
|
||||||
// 定义正则表达式:匹配非分隔符的连续字符段
|
|
||||||
// 分隔符包括:空格 \ { } ( ) , (注意 \\ 需要双转义)
|
|
||||||
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
|
var matches = Regex.Matches(input, @"[^{}\(\)\\,\s]+");
|
||||||
foreach (Match match in matches)
|
foreach (Match match in matches)
|
||||||
{
|
{
|
||||||
@@ -558,7 +552,6 @@ public class SubStationAlphaHighlightingDefinition : LightHighlightingDefinition
|
|||||||
{
|
{
|
||||||
String,
|
String,
|
||||||
Numeric,
|
Numeric,
|
||||||
Boolean,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class SessionStore : Dictionary<string, Session>
|
public sealed class SessionStore : Dictionary<string, Session>
|
||||||
|
Reference in New Issue
Block a user