Syntax Highlighting - Add missing classification (#34)
This commit is contained in:
@@ -233,6 +233,7 @@ public partial class CustomHighlighter : SyntaxHighlighter
|
|||||||
|
|
||||||
// Literals & comments
|
// Literals & comments
|
||||||
"string" => CachedColors.LightOrangeBrown,
|
"string" => CachedColors.LightOrangeBrown,
|
||||||
|
"string - escape character" => CachedColors.Orange,
|
||||||
"comment" => CachedColors.CommentGreen,
|
"comment" => CachedColors.CommentGreen,
|
||||||
"number" => CachedColors.NumberGreen,
|
"number" => CachedColors.NumberGreen,
|
||||||
|
|
||||||
@@ -278,9 +279,9 @@ public partial class CustomHighlighter : SyntaxHighlighter
|
|||||||
// Misc
|
// Misc
|
||||||
"excluded code" => CachedColors.Gray,
|
"excluded code" => CachedColors.Gray,
|
||||||
|
|
||||||
_ => CachedColors.Orange // orange, warning color for unhandled classifications
|
_ => CachedColors.Pink // pink, warning color for unhandled classifications
|
||||||
};
|
};
|
||||||
if (colour == CachedColors.Orange)
|
if (colour == CachedColors.Pink)
|
||||||
{
|
{
|
||||||
GD.PrintErr($"Unhandled classification type: '{classificationType}'");
|
GD.PrintErr($"Unhandled classification type: '{classificationType}'");
|
||||||
}
|
}
|
||||||
@@ -301,8 +302,9 @@ public static class CachedColors
|
|||||||
public static readonly Color ClassGreen = new("4ec9b0");
|
public static readonly Color ClassGreen = new("4ec9b0");
|
||||||
public static readonly Color VariableBlue = new("9cdcfe");
|
public static readonly Color VariableBlue = new("9cdcfe");
|
||||||
public static readonly Color Gray = new("a9a9a9");
|
public static readonly Color Gray = new("a9a9a9");
|
||||||
|
public static readonly Color Pink = new("c586c0");
|
||||||
|
|
||||||
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
public static readonly Color RazorComponentGreen = new("0b7f7f");
|
||||||
public static readonly Color RazorMetaCodePurple = new("a699e6");
|
public static readonly Color RazorMetaCodePurple = new("a699e6");
|
||||||
public static readonly Color HtmlDelimiterGray = new("808080");
|
public static readonly Color HtmlDelimiterGray = new("808080");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user