mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-02 10:48:37 +00:00
Add Markdown syntax highlighting
Add from https://github.com/cuiliang/AvalonEditHighlightingThemes
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<SyntaxDefinition name="Markdown" extensions=".md;.markdown;.mdx;.mmd;.mkd;.mdwn;.mdown;.mdc;.qmd;.rmd;.rmarkdown;.apib;.mdtxt;.mdtext" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
||||
<Color name="Heading" foreground="#FF00C0FF" exampleText="# Title #" />
|
||||
<Color name="Emphasis" fontStyle="italic" exampleText="*this* is important!" />
|
||||
<Color name="StrongEmphasis" fontWeight="bold" exampleText="**this** is more important!" />
|
||||
<Color name="InlineCode" foreground="#D0D0D0" fontFamily="Consolas" background="#282828" exampleText="this is `int.GetHashCode()`" />
|
||||
<Color name="Code" exampleText="this is `int.GetHashCode()`" />
|
||||
<Color name="BlockQuote" foreground="#FF55FF00" exampleText="> This is a\r\n> quote." />
|
||||
<Color name="Link" foreground="#FF4080FF" exampleText="[text](http://example.com)" />
|
||||
<Color name="Image" foreground="#FF4080FF" exampleText="[text][http://example.com/test.png]" />
|
||||
<Color name="LineBreak" background="#FF222222" exampleText="end of line \r\n2nd line " />
|
||||
<Color name="think" foreground="#999999" exampleText=""/>
|
||||
|
||||
<RuleSet ignoreCase="true">
|
||||
<Rule color="Heading">
|
||||
^\#.*
|
||||
</Rule>
|
||||
<Rule color="StrongEmphasis">
|
||||
\*\*.*\*\*
|
||||
</Rule>
|
||||
<Rule color="StrongEmphasis">
|
||||
__.*__
|
||||
</Rule>
|
||||
<Rule color="Emphasis">
|
||||
\*(?![ ]).*\*
|
||||
</Rule>
|
||||
<Rule color="Emphasis">
|
||||
_.*_
|
||||
</Rule>
|
||||
<Rule color="InlineCode">
|
||||
`(.*?)`
|
||||
</Rule>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^```</Begin>
|
||||
<End>^```$</End>
|
||||
</Span>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^\t</Begin>
|
||||
<End>^(?!\t)</End>
|
||||
</Span>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^[ ]{4}</Begin>
|
||||
<End>^(?![ ]{4})</End>
|
||||
</Span>
|
||||
<Span color="BlockQuote" multiline="true">
|
||||
<Begin>^></Begin>
|
||||
<End>^(?!>)</End>
|
||||
</Span>
|
||||
<Rule color="Image">
|
||||
\!\[.*\]\[.*\]
|
||||
</Rule>
|
||||
<Rule color="Link">
|
||||
\[.*\]\(.*\)
|
||||
</Rule>
|
||||
<Rule color="Link">
|
||||
\[.*\]\[.*\]
|
||||
</Rule>
|
||||
<Rule color="LineBreak">
|
||||
[ ]{2}$
|
||||
</Rule>
|
||||
<Span color="think" multiline="true">
|
||||
<Begin><think></Begin>
|
||||
<End></think></End>
|
||||
</Span>
|
||||
</RuleSet>
|
||||
</SyntaxDefinition>
|
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<SyntaxDefinition name="Markdown" extensions=".md;.markdown;.mdx;.mmd;.mkd;.mdwn;.mdown;.mdc;.qmd;.rmd;.rmarkdown;.apib;.mdtxt;.mdtext" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
||||
<Color name="Heading" foreground="Maroon" exampleText="# Title #" />
|
||||
<Color name="Emphasis" fontStyle="italic" exampleText="*this* is important!" />
|
||||
<Color name="StrongEmphasis" fontWeight="bold" exampleText="**this** is more important!" />
|
||||
<Color name="InlineCode" foreground="#705711" fontFamily="Consolas" background="#F0F0F0" exampleText="this is `int.GetHashCode()`" />
|
||||
<Color name="Code" foreground="#705711" fontFamily="Consolas" exampleText="this is `int.GetHashCode()`" />
|
||||
<Color name="BlockQuote" foreground="DarkBlue" exampleText="> This is a\r\n> quote." />
|
||||
<Color name="Link" foreground="Blue" exampleText="[text](http://example.com)" />
|
||||
<Color name="Image" foreground="Green" exampleText="[text][http://example.com/test.png]" />
|
||||
<Color name="LineBreak" background="LightGray" exampleText="end of line \r\n2nd line " />
|
||||
<Color name="think" foreground="#999999" />
|
||||
|
||||
<RuleSet ignoreCase="true">
|
||||
<Rule color="Heading">
|
||||
^\#.*
|
||||
</Rule>
|
||||
<Rule color="StrongEmphasis">
|
||||
\*\*.*\*\*
|
||||
</Rule>
|
||||
<Rule color="StrongEmphasis">
|
||||
__.*__
|
||||
</Rule>
|
||||
<Rule color="Emphasis">
|
||||
\*(?![ ]).*\*
|
||||
</Rule>
|
||||
<Rule color="Emphasis">
|
||||
_.*_
|
||||
</Rule>
|
||||
<Rule color="InlineCode">
|
||||
`(.*?)`
|
||||
</Rule>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^```</Begin>
|
||||
<End>^```$</End>
|
||||
</Span>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^\t</Begin>
|
||||
<End>^(?!\t)</End>
|
||||
</Span>
|
||||
<Span color="Code" ruleSet="C#/" multiline="true">
|
||||
<Begin>^[ ]{4}</Begin>
|
||||
<End>^(?![ ]{4})</End>
|
||||
</Span>
|
||||
<Span color="BlockQuote" multiline="true">
|
||||
<Begin>^></Begin>
|
||||
<End>^(?!>)</End>
|
||||
</Span>
|
||||
<Rule color="Image">
|
||||
\!\[.*\]\[.*\]
|
||||
</Rule>
|
||||
<Rule color="Link">
|
||||
\[.*\]\(.*\)
|
||||
</Rule>
|
||||
<Rule color="Link">
|
||||
\[.*\]\[.*\]
|
||||
</Rule>
|
||||
<Rule color="LineBreak">
|
||||
[ ]{2}$
|
||||
</Rule>
|
||||
<Span color="think" multiline="true">
|
||||
<Begin><think></Begin>
|
||||
<End></think></End>
|
||||
</Span>
|
||||
</RuleSet>
|
||||
</SyntaxDefinition>
|
Reference in New Issue
Block a user