mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 23:12:24 +00:00
34 lines
1.9 KiB
XML
34 lines
1.9 KiB
XML
|
|
||
|
<lexer>
|
||
|
<config>
|
||
|
<name>MoinMoin/Trac Wiki markup</name>
|
||
|
<alias>trac-wiki</alias>
|
||
|
<alias>moin</alias>
|
||
|
<mime_type>text/x-trac-wiki</mime_type>
|
||
|
<case_insensitive>true</case_insensitive>
|
||
|
</config>
|
||
|
<rules>
|
||
|
<state name="root">
|
||
|
<rule pattern="^#.*$"><token type="Comment"/></rule>
|
||
|
<rule pattern="(!)(\S+)"><bygroups><token type="Keyword"/><token type="Text"/></bygroups></rule>
|
||
|
<rule pattern="^(=+)([^=]+)(=+)(\s*#.+)?$"><bygroups><token type="GenericHeading"/><usingself state="root"/><token type="GenericHeading"/><token type="LiteralString"/></bygroups></rule>
|
||
|
<rule pattern="(\{\{\{)(\n#!.+)?"><bygroups><token type="NameBuiltin"/><token type="NameNamespace"/></bygroups><push state="codeblock"/></rule>
|
||
|
<rule pattern="(\'\'\'?|\|\||`|__|~~|\^|,,|::)"><token type="Comment"/></rule>
|
||
|
<rule pattern="^( +)([.*-])( )"><bygroups><token type="Text"/><token type="NameBuiltin"/><token type="Text"/></bygroups></rule>
|
||
|
<rule pattern="^( +)([a-z]{1,5}\.)( )"><bygroups><token type="Text"/><token type="NameBuiltin"/><token type="Text"/></bygroups></rule>
|
||
|
<rule pattern="\[\[\w+.*?\]\]"><token type="Keyword"/></rule>
|
||
|
<rule pattern="(\[[^\s\]]+)(\s+[^\]]+?)?(\])"><bygroups><token type="Keyword"/><token type="LiteralString"/><token type="Keyword"/></bygroups></rule>
|
||
|
<rule pattern="^----+$"><token type="Keyword"/></rule>
|
||
|
<rule pattern="[^\n\'\[{!_~^,|]+"><token type="Text"/></rule>
|
||
|
<rule pattern="\n"><token type="Text"/></rule>
|
||
|
<rule pattern="."><token type="Text"/></rule>
|
||
|
</state>
|
||
|
<state name="codeblock">
|
||
|
<rule pattern="\}\}\}"><token type="NameBuiltin"/><pop depth="1"/></rule>
|
||
|
<rule pattern="\{\{\{"><token type="Text"/><push/></rule>
|
||
|
<rule pattern="[^{}]+"><token type="CommentPreproc"/></rule>
|
||
|
<rule pattern="."><token type="CommentPreproc"/></rule>
|
||
|
</state>
|
||
|
</rules>
|
||
|
</lexer>
|