User:Andreas Plank/kate-highlighting

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Kate-Screenshot (editing mediawiki text)
English: Highlighting scheme for mediawiki syntax for the text editor kate on Linux (KDE). Templates & Variables are recognised. Put the file into your KDE-home directory to install it for you as single user (only): ~/.kde/share/apps/katepart/syntax/mediawiki.xml. To install it for all users instead it has to be copied to the KDE system program directory (OpenSuSE e.g. /opt/kde3/share/): /opt/kde3/share/apps/katepart/syntax/mediawiki.xml. In Kate, Kwrite etc. it is now accessible for highlighting in the Markup section. If keywords are missing, just add them.
Deutsch: Syntaxhervorhebung für den Texteditor Kate unter Linux (KDE). Vorlagen und Variablen werden nun auch hervorgehoben. Diese Datei muß in das eigene Heimverzeichnis von KDE ~/.kde/share/apps/katepart/syntax/mediawiki.xml, um sie als Einzelnutzer verwenden zu können. Für eine systemweite Installation hingegen (alle Benutzer) muß die Datei in das systemweite Programmverzeichnis von KDE (OpenSuSE z.B. unter /opt/kde3/share/): /opt/kde3/share/apps/katepart/syntax/mediawiki.xml. In Kate, Kwrite etc. ist sie nun unter Extras > Hervorhebung > Markup zu finden. Falls noch Schlüsselwörter fehlen, einfach dazuschreiben.



<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE language SYSTEM "language.dtd"
[
<!-- entities usably with &...; -->
<!ENTITY wikivarrefEN    "User|File|Image|Category|Media|Special|Template|Help|Wikipedia">
<!ENTITY wikivarrefDE    "Benutzer|Bild|Datei|Kategorie|Spezial|Vorlage|Hilfe|Wikipedia">
<!ENTITY wikiShortcuts    "aa|ab|ace|af|ak|aln|als|am|an|ang|ar|arc|arn|arv|arz|as|ast|av|avk|ay|az|ba|bar|bat-smg|bcc|bcl|bcr|be|bem|bg|bh|bi|bm|bn|bo|bpy|bqi|br|bs|bto|bug|byp|bxr|ca|cbk-zam|cdo|ce|ceb|ch|cho|chr|chy|ckb|co|cop|cps|cr|crh|cs|csb|cu|cv|cy|da|de|diq|dsb|dv|dz|ee|el|eml|en|eo|es|et|eu|ext|fa|ff|fi|fil|fiu-vro|fj|fo|fr|frc|frp|frr|fur|fy|ga|gag|gan|gd|gil|gl|glk|gn|got|grc|gsw|gu|gv|ha|hak|haw|he|hi|hif|hil|ho|hr|hsb|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|iku|ike|ikt|ilo|inh|io|is|it|iu|ja|jbo|jut|jv|ka|kaa|kab|kg|ki|kiu|kj|kk|kl|km|kn|ko|koi|kr|krc|kri|krj|ks|ksh|ku|kv|kw|ky|la|lad|lb|lbe|lez|lfn|lg|li|lij|lld|lmo|ln|lo|loz|lt|lv|lzh|lzz|mad|mai|map-bms|mc|mdf|mg|mh|mhr|mi|minnan|mk|ml|mn|mo|mr|mrj|ms|mt|mul|mus|mwl|my|myv|mzn|na|nah|nan|nap|nb|nd|nds|ne|new|ng|niu|nl|nn|no|non|nov|nr|nrm|nso|nv|ny|oc|och|oj|om|or|os|pa|pag|pam|pap|pcd|pdc|pdt|pfl|pi|pih|pl|pms|pnb|pnt|prg|ps|pt|pt-br|qu|rar|rgn|rif|rm|rmy|rn|ro|ru|ruq|rw|sa|sah|sc|scn|sco|sd|sdc|se|sei|ses|sg|sh|shi|si|sk|sl|sli|sm|sma|sn|so|sq|sr|srn|ss|st|stq|su|sv|sw|szl|ta|tcy|te|tet|tg|th|ti|tk|tl|tlh|tn|to|tokipona|tpi|tr|ts|tt|tum|tvl|tw|ty|tyv|tzm|udm|ug|uk|ur|uz|ve|vec|vep|vi|vls|vo|vot|vro|wa|war|wo|wuu|xal|xh|xmf|yao|yap|ydd|yi|yo|yue|yux|za|zea|zh|zh-classical|zh-cn|zh-hans|zh-hant|zh-hk|zh-min-nan|zh-mo|zh-my|zh-sg|zh-tw|zh-yue|zu|m|mw">
<!ENTITY wikitags    "(categorytree|charinsert|code|dpl|dynamicpagelist|gallery|identificationtool|imagemap|includeonly|inputbox|noinclude|onlyinclude|pre|ref|references|section|sgallery|sgalleryset|source|syntaxhighlight|tt)">
]>

<language name="Mediawiki" section="Markup" version="2.03" kateversion="2.4" extensions="*.mwt;*.mediawiki;*.wiki;*.txt;*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" casesensitive="1"  author="Andreas Plank (andreas minus plank at gmx dot de)" license="LGPL" priority="5">

<!--  It’s not perfect but helps a lot ;-)
    TODO test: nested bold bolditalic text (seems to work properly)
    TODO within HTML - style="…" Wikisyntax does not work, e.g:
 <span style="font-weight:bold;{{
     #switch: {{lc:{{{mystyle|}}}}}
     | orange    = background-color:#FCFFEC; border:1px solid #ffc51a;
     | #default  = {{{mystyle|}}}
}}">
   → can be done with separate files/definitions?

-->
  <highlighting>
    <list name="functions">
      <!-- Extension:Semantic Wiki -->
      <item>#ask:</item>
      <item>#arraymap:</item>
      <item>#arraymaptemplate:</item>
      <item>#forminput:</item>
      <item>#formlink:</item>
      <!-- Extension:StringFunctions -->
      <item>#len:</item>
      <item>#pos:</item>
      <item>#rpos:</item>
      <item>#sub:</item>
      <item>#pad:</item>
      <item>#replace:</item>
      <item>#explode:</item>
      <item>#urlencode:</item>
      <item>#urldecode:</item>
      <!-- ?Extension:ParserFunctions -->
      <item>#dateformat:</item>
      <item>#formatdate:</item>
      <item>#expr:</item>
      <item>#if:</item>
      <item>#ifeq:</item>
      <item>#iferror:</item>
      <item>#ifexist:</item>
      <item>#ifexpr:</item>
      <item>#language:</item>
      <item>#rel2abs:</item>
      <item>#special:</item>
      <item>#tag:</item>
      <item>#subst:</item>
      <item>#switch:</item>
      <item>#time:</item>
      <item>#titleparts:</item>
      <!-- Extension:VariablesExtension -->
      <item>#var:</item>
      <item>#vardefine:</item>
      <item>#varexists:</item>
      <item>#vardefineecho:</item>
      <!-- Extension:MathStatFunctions -->
      <item>#const:</item>
      <item>#mean:</item>
      <item>#median:</item>
      <item>#tan:</item>
      <item>#cot:</item>
      <item>#acot:</item>
      <item>#atan:</item>
      <item>#tanh:</item>
      <item>#atanh:</item>
      <item>#cos:</item>
      <item>#sec:</item>
      <item>#asec:</item>
      <item>#acos:</item>
      <item>#cosh:</item>
      <item>#acosh:</item>
      <item>#sin:</item>
      <item>#csc:</item>
      <item>#acsc:</item>
      <item>#asin:</item>
      <item>#sinh:</item>
      <item>#asinh:</item>
      <item>#ln:</item>
      <item>#log:</item>
      <item>#exp:</item>
    </list>
    <list name="wikivariables">
      <!-- German -->
      <item>SORTIERUNG:</item>
      <item>SEITENTITEL:</item>
      <item>SEITENNAME</item>
      <!-- English -->
      <item>anchorencode:</item>
      <item>DEFAULTCATEGORYSORT:</item>
      <item>DEFAULTSORT:</item>
      <item>DEFAULTSORTKEY:</item>
      <item>DISPLAYTITLE:</item>
      <item>filepath:</item>
      <item>formatnum:</item>
      <item>fullurl:</item>
      <item>gender:</item>
      <item>grammar:</item>
      <item>groupconvert:</item>
      <item>int:</item>
      <item>lc:</item>
      <item>lcfirst:</item>
      <item>localurl:</item>
      <item>NAMESPACE:</item>
      <item>ns:</item>
      <item>NUMBERINGROUP:</item>
      <item>NUMINGROUP:</item>
      <item>padleft:</item>
      <item>padright:</item>
      <item>PAGENAME:Template:</item>
      <item>PAGESINCAT:</item>
      <item>PAGESINCATEGORY:</item>
      <item>PAGESINNAMESPACE:</item>
      <item>PAGESINNS:</item>
      <item>PAGESIZE:</item>
      <item>PROTECTIONLEVEL:</item>
      <item>Template:</item>
      <item>uc:</item>
      <item>ucfirst:</item>
      <item>urlencode:</item>
      <item>ARTICLESPACE</item>
      <item>BASEPAGENAME</item>
      <item>BASEPAGENAMEE</item>
      <item>CONTENTLANG</item>
      <item>CONTENTLANGUAGE</item>
      <item>CURRENTDAY2</item>
      <item>CURRENTDAY</item>
      <item>CURRENTDAYNAME</item>
      <item>CURRENTDOW</item>
      <item>CURRENTHOUR</item>
      <item>CURRENTMONTH</item>
      <item>CURRENTMONTHABBREV</item>
      <item>CURRENTMONTHNAME</item>
      <item>CURRENTMONTHNAMEGEN</item>
      <item>CURRENTTIME</item>
      <item>CURRENTTIMESTAMP</item>
      <item>CURRENTVERSION</item>
      <item>CURRENTWEEK</item>
      <item>CURRENTYEAR</item>
      <item>DIRECTIONMARK</item>
      <item>DIRMARK</item>
      <item>FULLPAGENAME</item>
      <item>LOCALDAY2</item>
      <item>LOCALDAY</item>
      <item>LOCALDAYNAME</item>
      <item>LOCALDOW</item>
      <item>LOCALHOUR</item>
      <item>LOCALMONTH</item>
      <item>LOCALMONTHABBREV</item>
      <item>LOCALMONTHNAME</item>
      <item>LOCALMONTHNAMEGEN</item>
      <item>LOCALTIME</item>
      <item>LOCALTIMESTAMP</item>
      <item>NAMESPACE</item>
      <item>NAMESPACEE</item>
      <item>NUMBEROFACTIVEUSERS</item>
      <item>NUMBEROFADMINS</item>
      <item>NUMBEROFARTICLES</item>
      <item>NUMBEROFEDITS</item>
      <item>NUMBEROFFILES</item>
      <item>NUMBEROFPAGES</item>
      <item>NUMBEROFUSERS</item>
      <item>NUMBEROFVIEWS</item>
      <item>PAGENAME</item>
      <item>PAGENAMEE</item>
      <item>REVISIONDAY2</item>
      <item>REVISIONDAY</item>
      <item>REVISIONID</item>
      <item>REVISIONMONTH</item>
      <item>REVISIONTIMESTAMP</item>
      <item>REVISIONUSER</item>
      <item>REVISIONYEAR</item>
      <item>SCRIPTPATH</item>
      <item>SERVER</item>
      <item>SERVERNAME</item>
      <item>SITENAME</item>
      <item>STYLEPATH</item>
      <item>SUBJECTPAGENAME</item>
      <item>SUBJECTPAGENAMEE</item>
      <item>SUBJECTSPACE</item>
      <item>SUBJECTSPACEE</item>
      <item>SUBPAGENAME</item>
      <item>SUBPAGENAMEE</item>
      <item>TALKPAGENAME</item>
      <item>TALKPAGENAMEE</item>
      <item>TALKSPACE</item>
      <item>TALKSPACEE</item>
    </list>
    <list name="wikimagicvariables">
      <!-- German -->
      <item>__INHALTSVERZEICHNIS__</item>
      <item>__KEIN_INHALTSVERZEICHNIS__</item>
      <!-- English -->
      <item>__END__</item>
      <item>__FORCETOC__</item>
      <item>__HIDDENCAT__</item>
      <item>__INDEX__</item>
      <item>__NEWSECTIONLINK__</item>
      <item>__NOCC__</item>
      <item>__NOCONTENTCONVERT__</item>
      <item>__NOEDITSECTION__</item>
      <item>__NOGALLERY__</item>
      <item>__NOINDEX__</item>
      <item>__NONEWSECTIONLINK__</item>
      <item>__NOTC__</item>
      <item>__NOTITLECONVERT__</item>
      <item>__NOTOC__</item>
      <item>__START__</item>
      <item>__STATICREDIRECT__</item>
      <item>__TOC__</item>
    </list>
    <contexts>
      <!-- all contexts -->
      <!-- <context attribute="…" has to be set usually also in → itemDatas → <itemData name="…" ></itemData> -->
      <!-- <context      name="…" the context name = rules that matches: context → name="" switch to specified name -->
        <!-- Note: the order within <context></context> DOES MATTER  !!! -->
      <context  name="normal" attribute="Normal" lineEndContext="#stay">
        <IncludeRules context="commonrules"/>
      </context>
      <context name="tttext" attribute="Wikitext" lineEndContext="#pop">
        <!--<RegExpr attribute="Template" context="#pop#pop"  String="(?=\})\}{4}(?!\})" endRegion="Brace2" />-->
        <RegExpr attribute="Template" context="#pop"      String="\}{2}" minimal="true" endRegion="Brace2" />
        <RegExpr attribute="Variable" context="#pop"      String="\}{3}" minimal="true" endRegion="Brace3" />
        <keyword attribute="Keyword" context="#stay" String="wikivariables" />
        <keyword attribute="Keyword" context="#stay" String="functions" />
        <RegExpr String="\s*&lt;/&wikitags;\s*&gt;" attribute="Wiki-Tag" context="#pop" endRegion="wikitag"/>
        <RegExpr String="\s+&lt;/\s+&wikitags;&gt;?" attribute="Error" context="#stay" />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="tabletext" attribute="Wikitext" lineEndContext="#stay">
        <RegExpr attribute="Table" context="#pop" String="\|\}"  column="0" endRegion="table" />
        <!-- <tr> -->
        <RegExpr String="\|-" attribute="Table row" context="#stay" column="0" />
        <!-- <th> -->
        <RegExpr String="^(!|![^!\|[{]+\|)" attribute="Table" context="#stay" column="0" />
        <!-- <td> -->
        <RegExpr String="^(\||\|[^|[{]+\|)" attribute="Table" context="#stay" column="0" />
        <RegExpr String="(\|\||!!)" attribute="Table" context="#stay"   column="0" />
        <RegExpr attribute="Error" context="#stay" String="^.*\|\}" lineEndContext="#stay"  />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="sectiontext" attribute="Section" lineEndContext="#pop">
        <RegExpr String="[=]{6}$" attribute="Section" context="#pop" />
        <RegExpr String="[=]{5}$" attribute="Section" context="#pop" />
        <RegExpr String="[=]{4}$" attribute="Section" context="#pop" />
        <RegExpr String="[=]{3}$" attribute="Section" context="#pop" />
        <RegExpr String="[=]{2}$" attribute="Section" context="#pop" />
      </context>
      <context name="linktextwikisite" attribute="Wikitext" lineEndContext="#stay">
        <RegExpr attribute="Link" context="#pop"  String="\]\]" minimal="true" endRegion="Bracket2" />
        <DetectChar attribute="Error" context="#stay" String="]"   />
        <RegExpr attribute="Variable" context="#pop" String="\}{3}" minimal="true" endRegion="Brace3" />
        <RegExpr attribute="Template" context="#pop" String="\}{2}" minimal="true" endRegion="Brace2" />
        <RegExpr attribute="Link" context="linktextwikisite::object" String=":?((&wikiShortcuts;):)?(&wikivarrefEN;|&wikivarrefDE;):" />
        <RegExpr attribute="Link" context="linktextwikisite::object" String=":?(&wikiShortcuts;):\w+:" />
        <RegExpr String="\|[^]]+" attribute="Link" context="#stay"/>
        <RegExpr String="[^]|]+(?=\])" attribute="Link" minimal="true" endRegion="Bracket2"/>
        <IncludeRules context="commonrules"/>
      </context>
      <context name="linktextwikisite::object" attribute="Wikitext" lineEndContext="#stay">
        <RegExpr attribute="Link" context="#pop#pop"  String="\]{2}" minimal="true" endRegion="Bracket2" />
        <DetectChar attribute="Error" context="#stay" String="]"   />
        <DetectChar attribute="Link" context="#stay" String="|"   />
        <RegExpr attribute="Variable" context="#pop" String="\}{3}" minimal="true" endRegion="Brace3" />
        <RegExpr attribute="Template" context="#pop" String="\}{2}" minimal="true" endRegion="Brace2" />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="linktextwebsite" attribute="Wikitext" lineEndContext="#stay" >
        <RegExpr attribute="URL"   String="(http:|https:|ftp:|mailto:)[^\s&lt;&gt;\\]*\b"  context="#stay" />
        <RegExpr attribute="Error" context="#stay" String="[^[\s]*(&wikivarrefEN;|&wikivarrefDE;):" />
        <DetectChar attribute="Link" context="#pop"  char="]"   endRegion="Bracket1" />
        <Detect2Chars attribute="Error" context="#stay" char="]" char2="]"   />
        <RegExpr attribute="Variable" context="#pop" String="\}{3}" minimal="true" endRegion="Brace3" />
        <RegExpr attribute="Template" context="#pop" String="\}{2}" minimal="true" endRegion="Brace2" />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="variabletext" attribute="Wikitext" lineEndContext="#stay" >
        <RegExpr attribute="Variable" context="#pop" String="\}{3}" minimal="true" endRegion="Brace3" />
        <RegExpr attribute="Template" context="#pop" String="\}{2}"   minimal="true" endRegion="Brace2" />
        <IncludeRules context="commonrules"/>
        <DetectChar char="|" attribute="Variable" context="#stay"/>
      </context>
      <context name="templatetext" attribute="Wikitext" lineEndContext="#stay" >
        <keyword attribute="Keyword" context="#stay" String="wikivariables" />
        <keyword attribute="Keyword" context="#stay" String="functions" />
        <StringDetect String="&lt;!--" context="comment" attribute="Comment" beginRegion="comment" />
        <RegExpr attribute="Variable" context="variabletext" String="\{{3}" minimal="true" beginRegion="Brace3" />
        <RegExpr attribute="Template" context="templatetext" String="\{{2}" minimal="true" beginRegion="Brace2" />
        <!--<RegExpr attribute="Template" context="#pop#pop"  String="(?=\})\}{4}(?!\})"                endRegion="Brace2" />-->
        <!--<RegExpr attribute="Template" context="#pop"      String="(?=\})\}{2}(?!\})" minimal="true" endRegion="Brace2" />-->
        <RegExpr attribute="Variable" context="#pop"      String="\}{3}" minimal="true" endRegion="Brace3" lookAhead="false" />
        <RegExpr attribute="Template" context="#pop"      String="\}{2}" minimal="true" endRegion="Brace2" lookAhead="false" />
        <RegExpr String="\s*\|[^\|&lt;=\}]+=" attribute="Template: options" context="#stay" minimal="true" />
        <DetectChar char="|" attribute="Template: options" context="#stay"/>
        <IncludeRules context="commonrules"/>
      </context>
      <!--  Typeface   -->
      <context name="bolditalictext" attribute="Text: bold-italic" lineEndContext="#pop">
        <RegExpr attribute="Text: bold-italic" context="#pop" String="'{5,5}" endRegion="bolditalic" />
        <RegExpr attribute="Text: bold-italic" context="#pop" String="'{3,3}" endRegion="bolditalic" />
        <RegExpr attribute="Text: bold-italic" context="#pop" String="'{2,2}" endRegion="bolditalic" />
        <!--<RegExpr  attribute="Error" context="#stay" String="'{2,4}"  />-->
        <IncludeRules context="commonrules"/>
      </context>
      <context name="boldtext" attribute="Text: bold" lineEndContext="#pop" >
        <RegExpr attribute="Text: bold" context="#pop" String="'{3,3}" endRegion="bold" />
        <RegExpr attribute="Text: bold-italic"   context="bolditalictext"  String="'{2,2}" minimal="true" beginRegion="bolditalic" />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="italictext" attribute="Text: italic" lineEndContext="#pop" >
        <RegExpr attribute="Text: bold-italic"   context="bolditalictext"  String="'{3,3}" minimal="true" beginRegion="bolditalic" />
        <RegExpr attribute="Text: italic" context="#pop" String="'{2,2}"  endRegion="italic" />
      </context>
      <context name="wikitagtext" attribute="Normal" lineEndContext="#stay" >
        <RegExpr String="\s*&lt;/&wikitags;\s*&gt;" attribute="Wiki-Tag" context="#pop" endRegion="wikitag"/>
        <RegExpr String="\s+&lt;/\s+&wikitags;&gt;?" attribute="Error" context="#stay" />
        <IncludeRules context="commonrules"/>
      </context>
      <context name="nowikitext" attribute="Wikitext" lineEndContext="#stay" >
        <StringDetect String="&lt;/pre&gt;" context="#pop" attribute="NoWiki-Tag" endRegion="pre" />
        <StringDetect String="&lt;/nowiki&gt;" context="#pop" attribute="NoWiki-Tag" endRegion="nowiki" />
      </context>
      <context name="comment" attribute="Comment" lineEndContext="#stay" >
        <StringDetect String="--&gt;" context="#pop" attribute="Comment" endRegion="comment" />
      </context>
      <!-- common rules that are needed several times. Note: the order DOES MATTER  !!! -->
      <context name="commonrules" lineEndContext="#stay" attribute="Normal" >
        <StringDetect String="&lt;!--" context="comment" attribute="Comment" beginRegion="comment" />
        <StringDetect String="&lt;nowiki&gt;" context="nowikitext" attribute="NoWiki-Tag" beginRegion="nowiki"  />
        <StringDetect String="&lt;pre&gt;"    context="nowikitext" attribute="NoWiki-Tag" beginRegion="pre"  />
        <RegExpr String="&lt;&wikitags;[^&gt;/]*&gt;" attribute="Wiki-Tag" context="wikitagtext" beginRegion="wikitag"/>
        <RegExpr String="&lt;\s+&wikitags;[^&gt;/]*&gt;?" attribute="Error" context="wikitagtext" beginRegion="wikitag"/>
        <RegExpr String="&lt;(references)[^&gt;]*/&gt;" attribute="Wiki-Tag" context="#stay" />
        <keyword attribute="Keyword" context="#stay" String="wikimagicvariables" />
        <RegExpr String="[=]{6}" attribute="Section" context="sectiontext" column="0" />
        <RegExpr String="[=]{5}" attribute="Section" context="sectiontext" column="0" />
        <RegExpr String="[=]{4}" attribute="Section" context="sectiontext" column="0" />
        <RegExpr String="[=]{3}" attribute="Section" context="sectiontext" column="0" />
        <RegExpr String="[=]{2}" attribute="Section" context="sectiontext" column="0" />
        <RegExpr String="^[*#:]+" attribute="Lists" context="#stay" column="0" />
        <RegExpr String=";[^:]+:?" attribute="Lists" context="#stay" column="0"  firstNonSpace="true" />
        <RegExpr attribute="Variable" context="variabletext" String="\{{3}" minimal="true" beginRegion="Brace3"  />
        <RegExpr attribute="Template" context="templatetext" String="\{{2}"  minimal="true" beginRegion="Brace2" />
        <RegExpr attribute="Link"   context="linktextwikisite"   String="\[{2,2}"  minimal="true"  beginRegion="Bracket2" />
        <RegExpr attribute="Link"   context="linktextwebsite"   String="\[{1,1}"  minimal="true"  beginRegion="Bracket1" />
        <RegExpr attribute="URL"   String="(http:|https:|ftp:|mailto:)[^\s&lt;&gt;\\]*\b"  context="#stay" />
        <RegExpr attribute="Text: bold-italic" context="bolditalictext" String="'{5,5}" minimal="true" beginRegion="bolditalic" />
        <RegExpr attribute="Text: bold"        context="boldtext"       String="'{3,3}" minimal="true" beginRegion="bold" />
        <RegExpr attribute="Text: italic"      context="italictext"     String="'{2,2}" minimal="true" beginRegion="italic" />
        <RegExpr attribute="Table"             context="tabletext" String="\{\|" column="0"  beginRegion="table" />
        <RegExpr attribute="HTML-Entity" String="&amp;[a-z#0-9]+;" context="#stay" />
        <RegExpr attribute="Wikitext" String="\s{1,}" context="tttext" column="0" />
        <IncludeRules context="##HTML" includeAttrib="true"/>
      </context>
    </contexts>
    <!--    List of available checks in customising highlightings -->
    <itemDatas>
      <!-- e.g.:
       <list name="mylist">keywords</list>

             ┌ in <contexts>
           <contexts>
             <context>            #stay = how to behave ─┐     the list ─┐
               <keyword attribute="MagicList" context="#stay" String="mylist" />
             </context>                └─ further defined in <itemDatas></itemDatas> below
           </contexts>
           <itemDatas>
             <itemData name="MagicList" defStyleNum="" />
           </itemDatas>
      -->
      <itemData name="Keyword"           defStyleNum="dsKeyword" color="#4682b4"  bold="true"/>
      <itemData name="Normal"            defStyleNum="dsNormal" />
      <itemData name="Wikitext"          defStyleNum="dsNorma" color="#595959"   />
      <itemData name="Text: bold"        defStyleNum="dsNormal" bold="true" />
      <itemData name="Text: italic"      defStyleNum="dsNormal" italic="true" />
      <itemData name="Text: bold-italic" defStyleNum="dsNormal" bold="true" italic="true" />
      <itemData name="Section"   defStyleNum="dsNormal" color="#000" backgroundColor="#EBEBF6" bold="true"/>
      <itemData name="Lists"     defStyleNum="dsNormal" color="#AF4300" bold="true"/>
      <itemData name="Table"       defStyleNum="dsDecVal" color="#B43C29" backgroundColor="#FFDE94"  />
      <itemData name="Table row"   defStyleNum="dsDecVal" color="#CE5C00" backgroundColor="#F0A513" bold="true" />
      <itemData name="Template"          defStyleNum="dsDecVal" color="#990000" backgroundColor="#FFF6E6"/>
      <itemData name="Template: options" defStyleNum="dsDecVal" color="#629908" />
      <itemData name="Variable"    defStyleNum="dsDecVal" color="#B48152" />
      <itemData name="Link"        defStyleNum="dsDecVal" color="#5A91C5" bold="true" />
      <itemData name="URL"         defStyleNum="dsDecVal" color="#5A91C5" underline="true" />
      <itemData name="HTML-Entity" defStyleNum="dsDecVal" color="#8BAECD"/>
      <itemData name="NoWiki-Tag"  defStyleNum="dsDecVal" color="#BD7110" bold="true" />
      <itemData name="Wiki-Tag"    defStyleNum="dsDecVal" color="#416183"/>
      <itemData name="Comment"     defStyleNum="dsComment"/>
      <itemData name="Error"     defStyleNum="dsError"  color="#FF0000"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment start="&lt;!--" end="--&gt;" name="multiLine" />
    </comments>
    <keywords weakDeliminator="#:" />
  </general>
</language>