mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 06:07:21 +00:00
26 lines
801 B
C#
26 lines
801 B
C#
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 = "-",
|
||
|
|
};
|
||
|
|
}
|