mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 10:19:07 +00:00
74 lines
2.6 KiB
XML
74 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<SyntaxDefinition name="reStructuredText" extensions=".rst" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
|
<Color name="Heading" foreground="#0066CC" exampleText="Title\n=====" />
|
|
<Color name="Emphasis" fontStyle="italic" exampleText="*this* is important!" />
|
|
<Color name="StrongEmphasis" fontWeight="bold" exampleText="**this** is more important!" />
|
|
<Color name="InlineCode" foreground="#333333" fontFamily="Consolas" background="#F5F5F5" exampleText="``int.GetHashCode()``" />
|
|
<Color name="Code" exampleText="::\n\n code block" />
|
|
<Color name="BlockQuote" foreground="#006600" exampleText=" This is a\n block quote." />
|
|
<Color name="Link" foreground="#0066CC" exampleText="`link text <http://example.com>`_" />
|
|
<Color name="Image" foreground="#0066CC" exampleText=".. image:: path/to/image.png" />
|
|
<Color name="Directive" foreground="#CC6600" exampleText=".. note::" />
|
|
<Color name="Role" foreground="#9900CC" exampleText=":doc:`reference`" />
|
|
<Color name="LineBreak" background="#E0E0E0" exampleText="end of line\n2nd line" />
|
|
<Color name="Comment" foreground="#666666" exampleText=".. This is a comment" />
|
|
|
|
<RuleSet ignoreCase="false">
|
|
<!-- RST heading with underline -->
|
|
<Rule color="Heading">
|
|
^.+\r?\n[=\-`:'\"~^_*+#<>]{4,}\s*$
|
|
</Rule>
|
|
<!-- RST heading with overline and underline -->
|
|
<Rule color="Heading">
|
|
^[=\-`:'\"~^_*+#<>]{4,}\s*\r?\n.+\r?\n[=\-`:'\"~^_*+#<>]{4,}\s*$
|
|
</Rule>
|
|
<!-- Strong emphasis (bold) -->
|
|
<Rule color="StrongEmphasis">
|
|
\*\*[^\s*].*?[^\s*]\*\*
|
|
</Rule>
|
|
<!-- Emphasis (italic) -->
|
|
<Rule color="Emphasis">
|
|
\*[^\s*].*?[^\s*]\*
|
|
</Rule>
|
|
<!-- Inline code -->
|
|
<Rule color="InlineCode">
|
|
``.*?``
|
|
</Rule>
|
|
<!-- RST directives -->
|
|
<Rule color="Directive">
|
|
^\.\.\s+\w+::.*$
|
|
</Rule>
|
|
<!-- RST roles -->
|
|
<Rule color="Role">
|
|
:\w+:`[^`]*`
|
|
</Rule>
|
|
<!-- External links -->
|
|
<Rule color="Link">
|
|
`[^`]+\s+<[^>]+>`_
|
|
</Rule>
|
|
<!-- Internal link references -->
|
|
<Rule color="Link">
|
|
\w+_
|
|
</Rule>
|
|
<!-- Comments -->
|
|
<Rule color="Comment">
|
|
^\.\.\s.*$
|
|
</Rule>
|
|
<!-- RST code blocks: indented content after :: -->
|
|
<Span color="Code" multiline="true">
|
|
<Begin>^::\s*$</Begin>
|
|
<End>^(?!\s)</End>
|
|
</Span>
|
|
<!-- RST literal blocks: indented content -->
|
|
<Span color="Code" multiline="true">
|
|
<Begin>^[ \t]+\S</Begin>
|
|
<End>^(?![ \t])</End>
|
|
</Span>
|
|
<!-- RST block quotes -->
|
|
<Span color="BlockQuote" multiline="true">
|
|
<Begin>^[ \t]+</Begin>
|
|
<End>^(?![ \t])</End>
|
|
</Span>
|
|
</RuleSet>
|
|
</SyntaxDefinition> |