namespace AIStudio.Tools.CodeHighlighting; public static class CodeTokenKindExtensions { /// What the part is. extension(CodeTokenKind kind) { /// /// The CSS class which MudBlazor.Markdown gives this kind of part, so that it takes its color from /// the palette of the theme, just as the languages the library highlights itself. /// /// The CSS class of the part. public string CssClass => kind switch { CodeTokenKind.KEYWORD => "hljs-keyword", CodeTokenKind.TYPE => "hljs-type", CodeTokenKind.LITERAL => "hljs-literal", CodeTokenKind.STRING => "hljs-string", CodeTokenKind.COMMENT => "hljs-comment", CodeTokenKind.NUMBER => "hljs-number", CodeTokenKind.FUNCTION => "hljs-title function_", CodeTokenKind.META => "hljs-meta", CodeTokenKind.VARIABLE => "hljs-variable", CodeTokenKind.ATTRIBUTE => "hljs-attr", CodeTokenKind.SELECTOR => "hljs-selector-class", _ => string.Empty, }; } }