mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 09:47:22 +00:00
Highlighted code blocks inside the app (#1153)
This commit is contained in:
1 parent
0b42c0288e
commit
f4a86c2fb8
60 files changed
+2550
-41
No files matched your search
@@ -0,0 +1,26 @@
|
||||
namespace AIStudio.Tools.CodeHighlighting.Languages;
|
||||
|
||||
/// <summary>
|
||||
/// How a style sheet in CSS looks to the tokenizer.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// A style sheet has no statements: it has selectors, such as .card or #main, and blocks of properties
|
||||
/// with their values. The tokenizer tells them apart by the braces. At-rules, such as @media, and
|
||||
/// !important get the color of keywords, and a function, such as var(), that of functions.
|
||||
/// </remarks>
|
||||
public static class CssCodeRules
|
||||
{
|
||||
public static readonly CodeLanguageRules RULES = new()
|
||||
{
|
||||
IsStyleSheet = true,
|
||||
BlockComments = [new("/*", "*/")],
|
||||
Strings =
|
||||
[
|
||||
new("\"", "\""),
|
||||
new("'", "'"),
|
||||
],
|
||||
|
||||
WordStartCharacters = "-",
|
||||
WordCharacters = "-",
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user