mirror of
https://github.com/cheat/cheat.git
synced 2024-12-25 14:09:44 +01:00
1790aec85d
Bump `alecthomas/chroma` to `v2`: https://github.com/cheat/cheat/issues/735
95 lines
2.5 KiB
XML
95 lines
2.5 KiB
XML
<lexer>
|
|
<config>
|
|
<name>XML</name>
|
|
<alias>xml</alias>
|
|
<filename>*.xml</filename>
|
|
<filename>*.xsl</filename>
|
|
<filename>*.rss</filename>
|
|
<filename>*.xslt</filename>
|
|
<filename>*.xsd</filename>
|
|
<filename>*.wsdl</filename>
|
|
<filename>*.wsf</filename>
|
|
<filename>*.svg</filename>
|
|
<filename>*.csproj</filename>
|
|
<filename>*.vcxproj</filename>
|
|
<filename>*.fsproj</filename>
|
|
<mime_type>text/xml</mime_type>
|
|
<mime_type>application/xml</mime_type>
|
|
<mime_type>image/svg+xml</mime_type>
|
|
<mime_type>application/rss+xml</mime_type>
|
|
<mime_type>application/atom+xml</mime_type>
|
|
<dot_all>true</dot_all>
|
|
</config>
|
|
<rules>
|
|
<state name="root">
|
|
<rule pattern="[^<&]+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="&\S*?;">
|
|
<token type="NameEntity"/>
|
|
</rule>
|
|
<rule pattern="\<\!\[CDATA\[.*?\]\]\>">
|
|
<token type="CommentPreproc"/>
|
|
</rule>
|
|
<rule pattern="<!--">
|
|
<token type="Comment"/>
|
|
<push state="comment"/>
|
|
</rule>
|
|
<rule pattern="<\?.*?\?>">
|
|
<token type="CommentPreproc"/>
|
|
</rule>
|
|
<rule pattern="<![^>]*>">
|
|
<token type="CommentPreproc"/>
|
|
</rule>
|
|
<rule pattern="<\s*[\w:.-]+">
|
|
<token type="NameTag"/>
|
|
<push state="tag"/>
|
|
</rule>
|
|
<rule pattern="<\s*/\s*[\w:.-]+\s*>">
|
|
<token type="NameTag"/>
|
|
</rule>
|
|
</state>
|
|
<state name="comment">
|
|
<rule pattern="[^-]+">
|
|
<token type="Comment"/>
|
|
</rule>
|
|
<rule pattern="-->">
|
|
<token type="Comment"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="-">
|
|
<token type="Comment"/>
|
|
</rule>
|
|
</state>
|
|
<state name="tag">
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="[\w.:-]+\s*=">
|
|
<token type="NameAttribute"/>
|
|
<push state="attr"/>
|
|
</rule>
|
|
<rule pattern="/?\s*>">
|
|
<token type="NameTag"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="attr">
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="".*?"">
|
|
<token type="LiteralString"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="'.*?'">
|
|
<token type="LiteralString"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="[^\s>]+">
|
|
<token type="LiteralString"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer> |