<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language [
  <!ENTITY mmd_ent_part "([a-zA-Z]+|[0-9]+);">
  <!ENTITY html_ent_part "([a-zA-Z]+|#[0-9]+);">
  <!ENTITY mmd_ent "#&mmd_ent_part;">
  <!ENTITY html_ent "&amp;&html_ent_part;">
  <!ENTITY prefix_mmd_ent_no_ent "#(?!&mmd_ent_part;)">
  <!ENTITY prefix_html_ent_no_ent "&amp;(?!&html_ent_part;)">
  <!ENTITY prefix_ent_no_ent "&prefix_mmd_ent_no_ent;|&prefix_html_ent_no_ent;">

  <!ENTITY prefix_html_tag "&lt;(?=[/a-zA-Z])">
  <!ENTITY prefix_html_tag_no_tag "&lt;(?![/a-zA-Z])">

  <!ENTITY md_syms "$\\*_#&lt;&amp;">
  <!ENTITY md_no_underscore "\B_++\B">
  <!ENTITY md_sym_no_undescore_math_escape "&md_no_underscore;|\$(?!\$)|\\(?=$|[[:alnum:]\s]|\$\$)">
  <!ENTITY md_sym_no_md_no_lt "&md_sym_no_undescore_math_escape;|&prefix_ent_no_ent;">
  <!ENTITY md_sym_no_md "&md_sym_no_md_no_lt;|&prefix_html_tag_no_tag;">
  <!ENTITY md_unescapable_ent "\\(?=&mmd_ent;|&html_ent;)">

  <!ENTITY md_strict_syms "\\*_#&lt;&amp;">
  <!ENTITY md_strict_text "([^&md_strict_syms;]++|&md_no_underscore;|\\(?=$|[[:alnum:]\s])|&prefix_html_ent_no_ent;|&prefix_html_tag_no_tag;)++">

  <!-- '&lt' is a entity, but ';' in '&lt;' is not an entity part...
  Considers '&' as simple text -->
  <!ENTITY md_mmd_syms "$\\*_#&lt;">
  <!ENTITY md_mmd_no_md "&md_sym_no_undescore_math_escape;|&prefix_mmd_ent_no_ent;|&prefix_html_tag_no_tag;">


  <!--
  Generic keywords
  -->

  <!ENTITY accessibility "accTitle\s*:|accDescr\s*[:{]">
  <!-- direction is bugged: https://github.com/mermaid-js/mermaid/pull/7009 -->
  <!ENTITY direction "direction(?=\s+(TB|TD|BT|RL|LR))">

  <!--
  Flowchart
  -->

  <!ENTITY flowchart_node_nospecial "&md_sym_no_md;|&md_unescapable_ent;">
  <!ENTITY flowchart_qtext_syms "&md_syms;&quot;">
  <!ENTITY flowchart_qtext_no_md "&flowchart_node_nospecial;|\\(?=&quot;)">
  <!ENTITY flowchart_qtext  "([^&flowchart_qtext_syms;]++|&flowchart_qtext_no_md;)++">
  <!ENTITY flowchart_mdtext "([^&md_syms;&quot;`]++|&flowchart_node_nospecial;|\\(?=`))++">

  <!ENTITY flowchart_symbol_in_node          "&amp;&#37;#$!*_+'\\/?`.,">
  <!ENTITY flowchart_symbol_in_node_no_comma "&amp;&#37;#$!*_+'\\/?`.">
  <!-- click: https://github.com/mermaid-js/mermaid/issues/7023 -->
  <!ENTITY flowchart_kw_no_node "(?!\b(&accessibility;|&direction;|click\b(?![-:&flowchart_symbol_in_node;=~;(){}\[\]|@])|(subgraph|end|linkStyle|style|classDef|class|graph|flowchart)\b))(?![ox](-[-.]|==))">
  <!ENTITY flowchart_node
    "&flowchart_kw_no_node;([0-9\p{L}_&flowchart_symbol_in_node;]+|-(?![-.])|:(?!::))+">
  <!ENTITY flowchart_node_no_comma
    "&flowchart_kw_no_node;([0-9\p{L}_&flowchart_symbol_in_node_no_comma;]+|-(?![-.])|:(?!::))+">
  <!ENTITY css_class_name "([0-9\p{L}_&amp;&quot;&#37;`\':.#?!$/*+]+|-(?![-.]))+">
  <!-- whitout '{},' -->
  <!ENTITY new_shape_syms "./\;[]()`&#37;#&amp;!$@*=&lt;&gt;?|'&quot;:-+">

  <!--
  Sequence Diagram
  -->

  <!ENTITY seq_kw_no_node "(?!&accessibility;|(autonumber|participant|box|end|links?|create|destroy|activate|deactivate|Note|loop|alt|else|opt|par|and|critical|option|break|rect|sequenceDiagram)\b)">
  <!ENTITY seq_node "&seq_kw_no_node;([^-;:#(&#37;&lt;&gt;,\\/]++|-(?![->x)]|[|][\\/]|//|\\\\)|\((?!\))|\\(?![\\|]-)|/(?![/|]-))++">

  <!--
  Class Diagram
  -->

  <!ENTITY class_kw_no_node "(?!&accessibility;|&direction;|(class|namespace|callback|click|link|classDef|cssClass|style|note for|note|classDiagram)\b)">
  <!ENTITY class_node "&class_kw_no_node;([0-9\p{L}_]+|-(?![-])|\.(?!\.))+">
  <!ENTITY class_syms_no_label ";:">

  <!--
  State Diagram
  -->

  <!ENTITY state_kw_no_node "(?!(&accessibility;|&direction;|(state|note|classDef|class|stateDiagram)(?=$|[-\s{}:])))">
  <!ENTITY state_node "&state_kw_no_node;([^-\s{}:&#37;&quot;])[^-\s{}:]*">

  <!--
  Entity Relationship Diagram
  -->

  <!-- https://github.com/mermaid-js/mermaid/issues/7093 -->
  <!-- without direction: https://github.com/mermaid-js/mermaid/pull/7009 -->
  <!ENTITY er_kw "((erDiagram|classDef|style|1|one|many|to|u|zero or (one|more|many)|only one|optionally to)\b|0[+])">
  <!ENTITY er_kw_no_node "(?!(&accessibility;|&direction;|&er_kw;))">
  <!ENTITY er_node "&er_kw_no_node;([\w*]+|-(?![-])|\.(?!\.))+">
  <!ENTITY er_link "[|}][o|]([.][.]|--)[|o][{|]">

  <!--
  User Journey Diagram
  -->

  <!ENTITY journey_kw_no_task "(?!&accessibility;|title(\s|$)|section(\s[^:]|\s?$)|journey\b)">
  <!ENTITY journey_task "&journey_kw_no_task;[^#:;]+">

  <!--
  Gantt Diagram
  -->

  <!ENTITY gantt_kw_no_task "(?!&accessibility;|(title|excludes|weekend|section|dateFormat|axisFormat|tickInterval|weekday|todayMarker)(\s|$)|gantt\b)">
  <!ENTITY gantt_task "&gantt_kw_no_task;[^#:]+">

  <!--
  Quadrant Chart
  -->

  <!ENTITY quadrant_kw "((title|classDef)\b|quadrantChart|quadrant-[1234]|[xy]-axis)">
  <!ENTITY quadrant_kw_no_text "(?!&accessibility;|&quadrant_kw;)">
  <!ENTITY quadrant_invalid_char ";(){}[]&lt;>~:&quot;|^@">
  <!ENTITY quadrant_text "&quadrant_kw_no_text;([^\Q&quadrant_invalid_char;\E&#37;\-qxytc]++|&#37;(?!&#37;)|--(?!>)|-(?!->)|(?!\b&quadrant_kw;)\w++)++">

  <!--
  Requirement Diagram
  -->

  <!ENTITY requirement_kw "(requirementDiagram|functionalRequirement|performanceRequirement|interfaceRequirement|physicalRequirement|designConstraint|requirement|element|type|docref|id|text|risk|verifymethod|Low|Medium|High|Analysis|Inspection|Test|Demonstration|style|classDef|class)\b">
  <!ENTITY requirement_kw_no_item "(?!&accessibility;|&requirement_kw;|&direction;|[^a-zA-Z0-9])">
  <!ENTITY requirement_node_in_node  "([^-=,:&lt;>{&md_syms;]++|&md_sym_no_md_no_lt;)++">
  <!ENTITY requirement_node_in_ref "([^-\s=,:&lt;>{&md_syms;]++|&md_sym_no_md_no_lt;)++">
  <!ENTITY requirement_node "&requirement_kw_no_item;&requirement_node_in_node;">
  <!ENTITY requirement_ref  "(?![^a-zA-Z0-9])&requirement_node_in_ref;">

  <!--
  Requirement Diagram
  -->

  <!ENTITY zenuml_no_node "(?!(title|as|new|if|else|while|opt|par|try|catch|finally|return)(?=$|[^a-zA-Z0-9(]))">
  <!ENTITY zenuml_node "&zenuml_no_node;(?:[^-:.{}()\s]++|-(?=$|[^>])|\s+(?!as($|\s)))+">

  <!--
  XY Chart
  -->

  <!-- https://github.com/mermaid-js/mermaid/issues/7157 -->
  <!-- '_' and 0-9 are not a word part... At the beginning only -->
  <!ENTITY xy_wend "($|[^_a-z0-9])">
  <!ENTITY xy_no_kw "([ac-gi-km-suwz]|t(?!itle&xy_wend;)|x(?!-axis&xy_wend;)|y(?!-axis&xy_wend;)|b(?!ar&xy_wend;)|l(?!ine&xy_wend;)|h(?!orizontal&xy_wend;)|v(?!ertical&xy_wend;))">
  <!ENTITY xy_text "[-*=+#.&amp;;_\s0-9]*+(&xy_no_kw;[a-z0-9]*+[-*=+#.&amp;;_\s0-9]*+)*+">
  <!ENTITY xy_title "[*=+#.&amp;;\s]*+(((_|&xy_no_kw;)[_a-z]*+|-(?![0-9]))[*=+#.&amp;;\s]*+)*+">

  <!--
  Block Diagram
  -->

  <!ENTITY block_no_kw "(?!block\b|end\b|space\b|columns\s+[0-9]|style\s|classDef\s|class\s)">
  <!ENTITY block_in_node       "([^-(){}[&lt;>: #&amp;]+|&prefix_ent_no_ent;)">
  <!ENTITY block_first_ch_node "([^-(){}[&lt;>: #&amp;&quot;]|&prefix_ent_no_ent;)">
  <!ENTITY block_node "(\s*&block_no_kw;&block_first_ch_node;&block_in_node;*+)">

  <!--
  Kanban Diagram
  -->

  <!ENTITY kanban_node "([^\[\](){}@&md_syms;]+|&md_sym_no_md;)++">
  <!ENTITY kanban_qtext "([^\[\]()}@&md_syms;]+|&md_sym_no_md;)++">

  <!--
  Architecture Diagram
  -->

  <!ENTITY archi_id_ch "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz">

  <!--
  Radar Diagram
  -->

  <!ENTITY radar_id_ch "-0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz">
]>
<!-- Priority greater than Markdown which also uses .mmd -->
<language
  name="Mermaid" section="Scientific" priority="30"
  version="2" kateversion="6.22"
  mimetype="text/vnd.mermaid" extensions="*.mmd;*.mermaid"
  author="Jonathan Poelen (jonathan.poelen@gmail.com)"
  license="MIT"
>
  <!--
  https://mermaid.js.org/syntax/
  https://mermaid.live/edit

  Flowchart (flowchart, graph) based on v11.12
  Sequence diagrams (sequenceDiagram) based on v11.12
    + half arrow and central connection circle: https://github.com/mermaid-js/mermaid/pull/6789
  Class diagrams (classDiagram) based on v11.12
  State diagrams (stateDiagram-v2, stateDiagram) based on v11.12
  Entity Relationship Diagram (erDiagram) based on v11.12
  User Journey Diagram (journey) based on v11.12
  Gantt diagrams (gantt) based on v11.12
  Pie chart diagrams (pie) based on v11.12
  Quadrant Chart (quadrantChart) based on v11.12
  Requirement Diagram (requirementDiagram) based on v11.12
  GitGraph Diagram (gitGraph) based on v11.12
  Mindmap (mindmap) based on v11.12
  Timeline Diagram (timeline) based on v11.12
  ZenUML (zenuml) based on v11.12
  Sankey diagram (sankey) based on v11.12
  XY Chart (xychart) based on v11.12
  Block Diagram (block) based on v11.12
  Packet Diagram (packet) based on v11.12
  Mermaid Kanban Diagram (kanban) based on v11.12
  Architecture Diagram (architecture-beta) based on v11.12
  Radar Diagram (radar-beta) based on v11.12
  Treemap Diagram (treemap-beta) based on v11.12
  -->

  <highlighting>

    <contexts>

      <context name="Normal" attribute="Normal" lineEndContext="Mermaid"
               fallthroughContext="Mermaid">
        <StringDetect String="---" attribute="Comment" context="Frontmatter" column="0"/>
      </context>

      <!-- https://mermaid.js.org/intro/syntax-reference.html#frontmatter-for-diagram-code -->
      <context name="Frontmatter" attribute="Normal" fallthroughContext="Lvl0Text##YAML">
        <StringDetect String="---" attribute="Comment" context="#pop!Mermaid" column="0"/>
        <IncludeRules context="##YAML" includeAttrib="1"/>
      </context>

      <context name="Mermaid" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <WordDetect String="flowchart" attribute="Keyword" context="Flowchart"/>
        <WordDetect String="graph"     attribute="Keyword" context="Flowchart"/>
        <WordDetect String="sequenceDiagram" attribute="Keyword" context="SequenceDiag"/>
        <WordDetect String="classDiagram" attribute="Keyword"
                    context="ClassDiag!LineErrorExceptSpaces"/>
        <WordDetect String="stateDiagram-v2" attribute="Keyword"
                    context="StateDiag!LineErrorExceptSpaces"/>
        <WordDetect String="stateDiagram" attribute="Keyword"
                    context="StateDiag!LineErrorExceptSpaces"/>
        <WordDetect String="erDiagram" attribute="Keyword"
                    context="erDiag!LineErrorExceptSpaces"/>
        <WordDetect String="journey" attribute="Keyword" context="Journey"/>
        <WordDetect String="gantt" attribute="Keyword" context="Gantt"/>
        <WordDetect String="pie" attribute="Keyword" context="Pie"/>
        <WordDetect String="quadrantChart" attribute="Keyword" context="Quadrant"/>
        <WordDetect String="requirementDiagram" attribute="Keyword" context="Requirement"/>
        <WordDetect String="gitGraph" attribute="Keyword" context="Git"/>
        <WordDetect String="mindmap" attribute="Keyword" context="Mindmap"/>
        <WordDetect String="timeline" attribute="Keyword" context="Timeline"/>
        <WordDetect String="zenuml" attribute="Keyword" context="ZenUML"/>
        <WordDetect String="sankey" attribute="Keyword" context="Sankey"
                    additionalDeliminator="&quot;"/>
        <WordDetect String="xychart" attribute="Keyword" context="XYChart"/>
        <WordDetect String="block" attribute="Keyword" context="Block"/>
        <WordDetect String="packet" attribute="Keyword" context="Packet"/>
        <WordDetect String="kanban" attribute="Keyword" context="Kanban"/>
        <WordDetect String="architecture-beta" attribute="Keyword" context="Archi"/>
        <WordDetect String="radar-beta" attribute="Keyword" context="Radar"/>
        <WordDetect String="treemap-beta" attribute="Keyword" context="Treemap"
                    additionalDeliminator="&quot;'"/>

        <IncludeRules context="Find_Comment"/>
      </context>

      <!--
      @{ Accessibility
      https://mermaid.js.org/config/accessibility.html
      -->
      <context name="Find_Accessibility" attribute="Error">
        <WordDetect String="accTitle" attribute="Keyword" context="accTitle"
                    weakDeliminator="!%&amp;()*+,-./&lt;=>?[\\]^{|}~"/>
        <WordDetect String="accDescr" attribute="Keyword" context="accDescr"
                    weakDeliminator="!%&amp;()*+,-./&lt;=>?[\\]^|}~"/>
      </context>

      <context name="Find_Accessibility_Insensitive" attribute="Error">
        <WordDetect String="accTitle" attribute="Keyword" context="accTitle" insensitive="1"
                    weakDeliminator="!%&amp;()*+,-./&lt;=>?[\\]^{|}~"/>
        <WordDetect String="accDescr" attribute="Keyword" context="accDescr" insensitive="1"
                    weakDeliminator="!%&amp;()*+,-./&lt;=>?[\\]^|}~"/>
      </context>

      <context name="accTitle" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String=":" attribute="Keyword Property Separator" context="accTitle_Text"/>
        <DetectSpaces/>
      </context>
      <context name="accTitle_Text" attribute="Text" lineEndContext="#pop#pop">
      </context>

      <context name="accDescr" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"
                      context="accDescr_Block" beginRegion="block"/>
        <IncludeRules context="accTitle"/>
      </context>
      <context name="accDescr_Block" attribute="Text">
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" context="#pop#pop"
                      endRegion="block"/>
      </context>
      <!--
      @} Accessibility
      -->


      <!--
      @{ Flowcharts https://mermaid.js.org/syntax/flowchart.html
      -->

      <context name="Flowchart" attribute="Normal" lineEndContext="Flowchart_Body"
               fallthroughContext="Flowchart_Body!LineError">
        <StringDetect String=";" attribute="Symbol Separator" context="Flowchart_Body"/>
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="TB" attribute="Keyword Parameter"/>
        <StringDetect String="TD" attribute="Keyword Parameter"/>
        <StringDetect String="BT" attribute="Keyword Parameter"/>
        <StringDetect String="RL" attribute="Keyword Parameter"/>
        <StringDetect String="LR" attribute="Keyword Parameter"/>
      </context>

      <context name="Flowchart_Body" attribute="Error" fallthroughContext="Flowchart_AfterNode">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Flowchart_Find_MdText"/>
        <IncludeRules context="Flowchart_Find_UnicodeText"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Flowchart_AfterNode!Flowchart_DeclClassName"/>

        <StringDetect String='|' attribute="Error"
                      context="Flowchart_LinkPipe!Flowchart_QText"/>

        <StringDetect String=";" attribute="Symbol Separator"/>
        <IncludeRules context="Find_Comment"/>

        <RegExpr String="&flowchart_node;" attribute="Node" context="Flowchart_AfterNode"/>

        <WordDetect String="subgraph" attribute="Keyword" beginRegion="kwblock"/>
        <WordDetect String="end" attribute="Keyword" endRegion="kwblock"/>
        <WordDetect String="direction" attribute="Keyword" context="Flowchart_KwDirection"/>
        <WordDetect String="linkStyle" attribute="Keyword" context="Flowchart_KwLinkStyle"/>
        <WordDetect String="style" attribute="Keyword" context="Flowchart_KwStyle"/>
        <WordDetect String="class" attribute="Keyword" context="Flowchart_KwClass"/>
        <WordDetect String="classDef" attribute="Keyword" context="Flowchart_KwClassDef"/>
        <WordDetect String="click" attribute="Keyword" context="Flowchart_KwClick"/>

        <IncludeRules context="Find_Accessibility"/>

        <!-- because mermaid... -->
        <StringDetect String="graph" attribute="Error" context="#pop"/>
        <StringDetect String="flowchart" attribute="Error" context="#pop"/>
      </context>

      <!-- :::classname
              ~~~~~~~~~ -->
      <context name="Flowchart_DeclClassName" attribute="Normal"
               lineEndContext="#pop" fallthroughContext="#pop">
        <RegExpr String="&css_class_name;" attribute="Class Name" context="#pop"/>
      </context>

      <context name="Flowchart_AfterNode" attribute="Normal" lineEndContext="#pop">
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <!-- no space for edge id: `A@{}id@==>`
        https://github.com/mermaid-js/mermaid/issues/7032 -->
        <StringDetect String="@" attribute="Node Separator"
                      context="#pop!Flowchart_AfterNode_Spaces!Flowchart_NewShape"/>
        <DetectSpaces context="#pop!Flowchart_AfterNode_Spaces"/>
        <IncludeRules context="Flowchart_Find_Link"/>
        <IncludeRules context="Flowchart_Find_Shape"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Flowchart_DeclClassName"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>

      <context name="Flowchart_AfterNode_Spaces" attribute="Normal" lineEndContext="#pop">
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <StringDetect String="&amp; " attribute="Union" context="#pop"/>
        <IncludeRules context="Flowchart_Find_Link"/>
        <!-- Normally no spaces before, but subgraph keyword -->
        <IncludeRules context="Flowchart_Find_Shape"/>
        <!-- Normally any character, but the IDs are no longer referable... -->
        <RegExpr String="[a-zA-F][a-zA-F0-9]*(?=@)" attribute="ID" context="Flowchart_ID"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>
      <context name="Flowchart_ID" attribute="Normal">
        <StringDetect String="@" attribute="ID Separator" context="#pop#pop!Flowchart_LinkOrError"/>
      </context>

      <context name="Flowchart_LinkOrError" attribute="Normal" lineEndContext="#pop">
        <IncludeRules context="Flowchart_Find_Link"/>
        <DetectSpaces attribute="Error" context="#pop"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>

      <context name="Flowchart_Find_Link" attribute="Normal">
        <StringDetect String="--"     attribute="Link" context="Flowchart_LinkLine"/>
        <StringDetect String="&lt;--" attribute="Link" context="Flowchart_LinkLine"/>
        <StringDetect String="o--"    attribute="Link" context="Flowchart_LinkLine"/>
        <StringDetect String="x--"    attribute="Link" context="Flowchart_LinkLine"/>

        <StringDetect String="=="     attribute="Link" context="Flowchart_LinkThick"/>
        <StringDetect String="&lt;==" attribute="Link" context="Flowchart_LinkThick"/>
        <StringDetect String="o=="    attribute="Link" context="Flowchart_LinkThick"/>
        <StringDetect String="x=="    attribute="Link" context="Flowchart_LinkThick"/>

        <StringDetect String="-."     attribute="Link" context="Flowchart_LinkDotted"/>
        <StringDetect String="&lt;-." attribute="Link" context="Flowchart_LinkDotted"/>
        <StringDetect String="o-."    attribute="Link" context="Flowchart_LinkDotted"/>
        <StringDetect String="x-."    attribute="Link" context="Flowchart_LinkDotted"/>

        <StringDetect String="~~~" attribute="Link" context="Flowchart_LinkInvisible"/>

        <AnyChar String="-=~" attribute="Error" context="#pop"/>
      </context>

      <context name="Flowchart_Find_Shape" attribute="Normal">
        <!-- [[...]] -->
        <StringDetect String="[[" attribute="Shape" context="Flowchart_TextNode_End[[]]!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- [(...)] -->
        <StringDetect String="[(" attribute="Shape" context="Flowchart_TextNode_End[()]!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- [/.../] or [/...\] -->
        <StringDetect String="[/" attribute="Shape" context="Flowchart_TextNode_Text[//]!Flowchart_QText"/>
        <!-- [\.../] or [\...\] -->
        <StringDetect String="[\" attribute="Shape" context="Flowchart_TextNode_Text[//]!Flowchart_QText"/>
        <!-- [...] -->
        <StringDetect String="[" attribute="Shape" context="Flowchart_TextNode_End[]!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- (((...))) -->
        <StringDetect String="(((" attribute="Shape" context="Flowchart_TextNode_End((()))!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- ((...)) -->
        <StringDetect String="((" attribute="Shape" context="Flowchart_TextNode_End(())!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- ([...]) -->
        <StringDetect String="([" attribute="Shape" context="Flowchart_TextNode_End([])!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- (...) -->
        <StringDetect String="(" attribute="Shape" context="Flowchart_TextNode_End()!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- {{...}} -->
        <StringDetect String="{{" attribute="Shape" context="Flowchart_TextNode_End{{}}!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- {...} -->
        <StringDetect String="{" attribute="Shape" context="Flowchart_TextNode_End{}!Flowchart_TextNode_Text!Flowchart_QText"/>
        <!-- >...] -->
        <StringDetect String=">" attribute="Shape" context="Flowchart_TextNode_End[]!Flowchart_TextNode_Text!Flowchart_QText"/>
      </context>


      <!--
      @{ Link: ==>, etc
      -->
      <context name="Flowchart_Find_LinkText_Common" attribute="Link Text">
        <IncludeRules context="EmptyQuotedText"/>
        <StringDetect String='"' attribute="Error"/>
        <IncludeRules context="Find_Comment_InText"/>
      </context>
      <context name="Flowchart_Find_LinkText_Special_Common" attribute="Link Text">
        <IncludeRules context="EmptyQuotedText_ThenPop"/>
        <StringDetect String='"' attribute="Error" context="#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
      </context>

      <!-- A - - note - - - B
           A - - note - - - - -x B
           A - - - B
           A - - - - - -x B
           A - - | note | B
           A - - - -x| note | B
                 ~~~~~~~~~~~~~~~
      -->
      <context name="Flowchart_LinkLine" attribute="Link"
               lineEndContext="Flowchart_LinkLine_Text!Flowchart_LinkText_Q"
               fallthroughContext="Flowchart_LinkLine_Text!Flowchart_LinkText_Q">
        <AnyChar String="ox>" attribute="Link" context="Flowchart_LinkEnd_PipeOrNoLink"/>
        <StringDetect String="-" attribute="Link"
                      context="Flowchart_LinkEnd_PipeOrNoLink!Flowchart_LinkLine_End"/>
      </context>
      <context name="Flowchart_LinkLine_End" attribute="Link"
               lineEndContext="#pop" fallthroughContext="#pop">
        <AnyChar String="ox>" attribute="Link" context="#pop"/>
        <StringDetect String="-"/>
      </context>
      <!-- A - - note - - - B
                ~~~~~~~~~~~~~
      -->
      <context name="Flowchart_LinkLine_Text" attribute="Link Text"
               fallthroughContext="Flowchart_LinkLine_Text_Special">
        <StringDetect String="--" attribute="Link"
                      context="#pop#pop!Flowchart_LinkLine_TextEnd"/>
        <IncludeRules context="Flowchart_Find_LinkText_Common"/>
        <RegExpr String='([^-"&md_syms;]++|&md_sym_no_md;|-(?!-))++(\\(?=--[->xo]))?'
                 attribute="Link Text" context="Flowchart_LinkLine_Text_Special"/>
      </context>
      <context name="Flowchart_LinkLine_Text_Special" attribute="Link Text"
               lineEndContext="#pop">
        <StringDetect String="--" attribute="Link"
                      context="#pop#pop#pop!Flowchart_LinkLine_TextEnd"/>
        <IncludeRules context="Flowchart_Find_LinkText_Special_Common"/>
        <IncludeRules context="Find_Md_Html_LinkLine_ThenPop"/>
      </context>
      <!-- A - - note - - - B
                         ~~~~
      -->
      <context name="Flowchart_LinkLine_TextEnd" attribute="Link" lineEndContext="#pop">
        <AnyChar String="ox>" attribute="Link" context="Flowchart_LinkEnd_NoLink"/>
        <StringDetect String="-" attribute="Link"
                      context="Flowchart_LinkEnd_NoLink!Flowchart_LinkLine_End"/>
        <RegExpr String="." attribute="Error" context="#pop#pop"/>
      </context>


      <!-- A == note === B
           A == note =====x B
           A === B
           A =====x B
           A == | note | B
           A ===x| note | B
               ~~~~~~~~~~~~~~~
      -->
      <!-- === -->
      <context name="Flowchart_LinkThick" attribute="Link"
               lineEndContext="Flowchart_LinkThick_Text!Flowchart_LinkText_Q"
               fallthroughContext="Flowchart_LinkThick_Text!Flowchart_LinkText_Q">
        <AnyChar String="ox>" attribute="Link" context="Flowchart_LinkEnd_PipeOrNoLink"/>
        <StringDetect String="=" attribute="Link"
                      context="Flowchart_LinkEnd_PipeOrNoLink!Flowchart_LinkThick_End"/>
      </context>
      <context name="Flowchart_LinkThick_End" attribute="Link"
               lineEndContext="#pop" fallthroughContext="#pop">
        <AnyChar String="ox>" attribute="Link" context="#pop"/>
        <StringDetect String="="/>
      </context>
      <!-- A == note === B
               ~~~~~~~~~~~
      -->
      <context name="Flowchart_LinkThick_Text" attribute="Link Text"
               fallthroughContext="Flowchart_LinkThick_Text_Special">
        <StringDetect String="==" attribute="Link"
                      context="#pop#pop!Flowchart_LinkThick_TextEnd"/>
        <StringDetect String="=" attribute="Error"/>
        <IncludeRules context="Flowchart_Find_LinkText_Common"/>
        <RegExpr String='([^="&md_syms;]++|&md_sym_no_md;|\\(?==))++'
                 attribute="Link Text" context="Flowchart_LinkThick_Text_Special"/>
      </context>
      <context name="Flowchart_LinkThick_Text_Special" attribute="Link Text"
               lineEndContext="#pop">
        <StringDetect String="==" attribute="Link"
                      context="#pop#pop#pop!Flowchart_LinkThick_TextEnd"/>
        <StringDetect String="=" attribute="Error" context="#pop"/>
        <IncludeRules context="Flowchart_Find_LinkText_Special_Common"/>
        <IncludeRules context="Find_Md_Html_LinkThick_ThenPop"/>
      </context>
      <!-- A == note === B
                       ~~~
      -->
      <context name="Flowchart_LinkThick_TextEnd" attribute="Link" lineEndContext="#pop">
        <AnyChar String="ox>" attribute="Link" context="Flowchart_LinkEnd_NoLink"/>
        <StringDetect String="=" attribute="Link"
                      context="Flowchart_LinkEnd_NoLink!Flowchart_LinkThick_End"/>
        <RegExpr String="." context="#pop#pop"/>
      </context>


      <!-- A -. note .- B
           A -. note ....-x B
           A -.- B
           A -....-x B
           A -.- | note | B
           A -....-x| note | B
               ~~~~~~~~~~~~~
      -->
      <context name="Flowchart_LinkDotted" attribute="Link"
               lineEndContext="Flowchart_LinkDotted_Text!Flowchart_LinkText_Q"
               fallthroughContext="Flowchart_LinkDotted_Text!Flowchart_LinkText_Q">
        <RegExpr String="[.]*-[ox>]?" attribute="Link"
                 context="Flowchart_LinkEnd_PipeOrNoLink"/>
      </context>
      <!-- -.note.-
             ~~~~~~
      -->
      <context name="Flowchart_LinkDotted_Text" attribute="Link Text"
               fallthroughContext="Flowchart_LinkDotted_Text_Special">
        <StringDetect String="." context="#pop#pop!Flowchart_LinkDotted_TextEnd" lookAhead="1"/>
        <IncludeRules context="Flowchart_Find_LinkText_Common"/>
        <RegExpr String='([^."&md_syms;]++|&md_sym_no_md;|\\(?=\.))++'
                 attribute="Link Text" context="Flowchart_LinkDotted_Text_Special"/>
      </context>
      <context name="Flowchart_LinkDotted_Text_Special" attribute="Link Text"
               lineEndContext="#pop">
        <StringDetect String="." context="#pop#pop#pop!Flowchart_LinkDotted_TextEnd"
                      lookAhead="1"/>
        <IncludeRules context="Flowchart_Find_LinkText_Special_Common"/>
        <IncludeRules context="Find_Md_Html_LinkDotted_ThenPop"/>
      </context>
      <!-- -.note.-
                 ~~
      -->
      <context name="Flowchart_LinkDotted_TextEnd" attribute="Link Text">
        <RegExpr String="[.]*-[ox>]?" attribute="Link" context="Flowchart_LinkEnd_NoLink"/>
        <RegExpr String="[.]+>?|." attribute="Error" context="#pop#pop"/>
      </context>


      <!-- ~~~ -->
      <context name="Flowchart_LinkInvisible" attribute="Link"
               lineEndContext="Flowchart_LinkEnd_PipeOrNoLink"
               fallthroughContext="Flowchart_LinkEnd_PipeOrNoLink">
        <StringDetect String="~" attribute="Link"/>
      </context>


      <!-- A ===| note | B
                ~
      -->
      <context name="Flowchart_LinkEnd_PipeOrNoLink" attribute="Error"
               fallthroughContext="#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="|" attribute="Link Text Delimiter"
                      context="#pop#pop#pop!Flowchart_LinkPipe!Flowchart_QText"/>
        <IncludeRules context="Flowchart_LinkEnd_NoLink"/>
      </context>

      <!-- A ==x==>-
                   ~ Error
      -->
      <context name="Flowchart_LinkEnd_NoLink" attribute="Error"
               fallthroughContext="#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String="--" attribute="Error" context="#pop#pop!Flowchart_LinkLine"/>
        <StringDetect String="o--" attribute="Error" context="#pop#pop!Flowchart_LinkLine"/>
        <StringDetect String="x--" attribute="Error" context="#pop#pop!Flowchart_LinkLine"/>
        <StringDetect String="&lt;--" attribute="Error" context="#pop#pop!Flowchart_LinkLine"/>

        <StringDetect String="o==" attribute="Error" context="#pop#pop!Flowchart_LinkThick"/>
        <StringDetect String="x==" attribute="Error" context="#pop#pop!Flowchart_LinkThick"/>
        <StringDetect String="&lt;==" attribute="Error" context="#pop#pop!Flowchart_LinkThick"/>

        <StringDetect String="-." attribute="Error" context="#pop#pop!Flowchart_LinkDotted"/>
        <StringDetect String="o-." attribute="Error" context="#pop#pop!Flowchart_LinkDotted"/>
        <StringDetect String="x-." attribute="Error" context="#pop#pop!Flowchart_LinkDotted"/>
        <StringDetect String="&lt;-." attribute="Error" context="#pop#pop!Flowchart_LinkDotted"/>

        <StringDetect String="~~~" attribute="Error" context="#pop#pop!Flowchart_LinkInvisible"/>
        <!-- only one '-' is not a link but a node name -->
        <AnyChar String="=~" attribute="Error" context="#pop#pop#pop"/>

      </context>

      <!-- A ===| note | B
                  ~~~~~~
      -->
      <context name="Flowchart_LinkPipe" attribute="Link Text"
               fallthroughContext="Flowchart_LinkPipe_Special">
        <StringDetect String="|" attribute="Link Text Delimiter" context="#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String='([^|{}[]()"&md_syms;]++|&md_sym_no_md;|\\(?=\|))++'
                 attribute="Link Text" context="Flowchart_LinkPipe_Special"/>
      </context>
      <context name="Flowchart_LinkPipe_Special" attribute="Link Text"
               lineEndContext="#pop">
        <StringDetect String="|" attribute="Link Text Delimiter" context="#pop#pop"/>
        <IncludeRules context="EmptyQuotedText_ThenPop"/>
        <AnyChar String='{}[]()"' attribute="Error" context="#pop#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7003 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <!-- A == note === B (and other link)
               ~
      -->
      <context name="Flowchart_LinkText_Q" attribute="Link Text"
               fallthroughContext="#pop!Flowchart_QText">
        <IncludeRules context="Find_Comment_InText"/>
      </context>
      <!--
      @} Link
      -->


      <!-- node["..."] node["`...`"]
                ~~~~~       ~~~~~~~
      -->
      <context name="Flowchart_QText" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop">
        <IncludeRules context="EmptyQuotedText"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7014 -->
        <IncludeRules context="Flowchart_Find_MdText_ThenPop"/>
        <IncludeRules context="Flowchart_Find_UnicodeText_ThenPop"/>
      </context>

      <!-- node[...]
                ~~~
      Neither Quoted Text nor Markdown Formatting
      -->
      <context name="Flowchart_TextNode_Text" attribute="Text"
               fallthroughContext="Flowchart_TextNode_Text_Special">
        <AnyChar String='{}[]()"|@' context="#pop" lookAhead="1"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String='([^{}\[\]()"|@&md_syms;]++|&flowchart_node_nospecial;|\\(?=\]))++'
                 attribute="Text" context="Flowchart_TextNode_Text_Special"/>
      </context>
      <context name="Flowchart_TextNode_Text_Special" attribute="Text"
               lineEndContext="#pop">
        <IncludeRules context="EmptyQuotedText_ThenPop"/>
        <AnyChar String='{}[]()"|@' context="#pop#pop" lookAhead="1"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7014 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <!-- node[/.../] (or /...\ or \.../ or \...\)
                 ~~~
      Neither Quoted Text nor Markdown Formatting
      -->
      <context name="Flowchart_TextNode_Text[//]" attribute="Text"
               fallthroughContext="Flowchart_TextNode_Text[//]_Special">
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
        <IncludeRules context="Find_Comment_InText"/>
        <StringDetect String="\]" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <StringDetect String="/]" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <RegExpr String='([^{}\[\]()"|@/&md_syms;]++|&flowchart_node_nospecial;|\\(?=[/\\]\])|/(?!\]))++'
                 attribute="Text" context="Flowchart_TextNode_Text[//]_Special"/>
      </context>
      <context name="Flowchart_TextNode_Text[//]_Special" attribute="Text"
               lineEndContext="#pop">
        <StringDetect String="\]" attribute="Shape" context="#pop#pop#pop!Flowchart_AfterNode"/>
        <StringDetect String="/]" attribute="Shape" context="#pop#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="EmptyQuotedText_ThenPop"/>
        <AnyChar String='{}[]()"|@' attribute="Error"
                 context="#pop#pop#pop!Flowchart_AfterNode"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7014 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text[//]_ThenPop"/>
      </context>


      <!--
      @{ end text node: node[...], node((...)), etc
                                ~           ~~
      -->
      <context name="Flowchart_TextNode_EndCommon" attribute="Normal">
        <AnyChar String='{}[]()"|@' attribute="Error" context="#pop#pop!Flowchart_AfterNode"/>
      </context>

      <context name="Flowchart_TextNode_End[]" attribute="Normal">
        <StringDetect String="]" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End[[]]" attribute="Normal">
        <StringDetect String="]]" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End[()]" attribute="Normal">
        <StringDetect String=")]" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End()" attribute="Normal">
        <StringDetect String=")" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End(())" attribute="Normal">
        <StringDetect String="))" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End((()))" attribute="Normal">
        <StringDetect String=")))" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End([])" attribute="Normal">
        <StringDetect String="])" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End{{}}" attribute="Normal">
        <StringDetect String="}}" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>

      <context name="Flowchart_TextNode_End{}" attribute="Normal">
        <StringDetect String="}" attribute="Shape" context="#pop#pop!Flowchart_AfterNode"/>
        <IncludeRules context="Flowchart_TextNode_EndCommon"/>
      </context>
      <!--
      @} end text node
      -->


      <!--
      @{ new shape syntax
      -->
      <!-- A@{ shape: manual-file, label: "File Handling"}
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Flowchart_NewShape" attribute="Error">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"
                      context="Flowchart_NewShape_Prop"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>
      <context name="Flowchart_NewShape_Prop" attribute="Error">
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 -->
        <StringDetect String=": " attribute="Property Separator"
                      context="Flowchart_NewShape_PropValue"/>
        <LineContinue char=":" attribute="Property Separator"
                      context="Flowchart_NewShape_PropValue"/>
        <IncludeRules context="Find_DQuote_NoSpecial"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" context="#pop#pop"/>
        <IncludeRules context="Find_Prop"/>
      </context>
      <context name="Find_Prop" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <DetectIdentifier attribute="Property"/>
        <!-- <StringDetect String="-" attribute="Property"/> -->
        <!-- <Int attribute="Property"/> -->
        <IncludeRules context="Find_Comment"/>
      </context>
      <!-- A@{ prop: value }
                    ~~~~~~
      -->
      <context name="Flowchart_NewShape_PropValue" attribute="Error"
               fallthroughContext="Flowchart_NewShape_PropValue_Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Flowchart_NewShape_QEnd!Flowchart_NewShape_PropValue_DQ"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7037 -->
        <StringDetect String="'" attribute="Quoted Text Delimiter"
                      context="Flowchart_NewShape_QEnd!Flowchart_NewShape_PropValue_SQ"/>
        <DetectSpaces attribute="Normal"/>
        <Int attribute="Property Number"
             weakDeliminator="&new_shape_syms;" context="Flowchart_NewShape_PropValue_Text"/>
        <WordDetect String="true" attribute="Property Boolean"
                    weakDeliminator="&new_shape_syms;" context="Flowchart_NewShape_PropValue_Text"/>
        <WordDetect String="false" attribute="Property Boolean"
                    weakDeliminator="&new_shape_syms;" context="Flowchart_NewShape_PropValue_Text"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 -->
        <AnyChar String="`*#%@|&gt;" attribute="Error"
                 context="Flowchart_NewShape_PropValue_Text"/>
      </context>
      <!-- A@{ prop: value }
                     ~~~~~~~
      -->
      <context name="Flowchart_NewShape_PropValue_Text" attribute="Text"
               fallthroughContext="Flowchart_NewShape_PropValue_Text_Special">
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop#pop"/>
        <StringDetect String="," attribute="List Separator" context="#pop#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 for '[]^', ': ', ' #' -->
        <RegExpr String='([^"{}\[\]^ :,&md_syms;]++|&flowchart_node_nospecial;|:(?! )| (?=$|[^#]|&mmd_ent;))++'
                 attribute="Text" context="Flowchart_NewShape_PropValue_Text_Special"/>
      </context>
      <context name="Flowchart_NewShape_PropValue_Text_Special" attribute="Text"
               lineEndContext="#pop">
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop#pop#pop"/>
        <StringDetect String="," attribute="List Separator" context="#pop#pop#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 for '[]^' -->
        <AnyChar String='"{[]^' attribute="Error" context="#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 -->
        <StringDetect String=": " attribute="Error" context="#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 -->
        <StringDetect String=" #" attribute="Error" context="#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7014 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_NewShape_ThenPop"/>
      </context>
      <!-- A@{ prop: "value" }
                      ~~~~~~~~
      -->
      <context name="Flowchart_NewShape_PropValue_DQ" attribute="Quoted Text">
        <IncludeRules context="Flowchart_UnicodeText"/>
        <StringDetect String="\" attribute="Error"/>
      </context>
      <!-- A@{ prop: 'value' }
                      ~~~~~~~~
      mix of Mermaid Text and Yaml
      https://github.com/mermaid-js/mermaid/issues/7044
      -->
      <context name="Flowchart_NewShape_PropValue_SQ" attribute="Text"
               fallthroughContext="Flowchart_NewShape_PropValue_SQ_Special">
        <StringDetect String="''" attribute="Special Text Char"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String="([^'&quot;}&md_syms;]++|&md_sym_no_md;)++"
                 attribute="Text" context="Flowchart_NewShape_PropValue_SQ_Special"/>
      </context>
      <context name="Flowchart_NewShape_PropValue_SQ_Special" attribute="Text"
               lineEndContext="#pop">
        <StringDetect String="''" attribute="Special Text Char" context="#pop"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="#pop#pop"/>
        <StringDetect String="}" attribute="Error" context="#pop#pop#pop#pop#pop#pop"/>
        <StringDetect String='"' attribute="Error" context="#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7003 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_NewShapeSQ_ThenPop"/>
      </context>
      <!-- A@{ prop: 'value' }
                            ~
      -->
      <context name="Flowchart_NewShape_QEnd" attribute="Error">
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop#pop"/>
        <StringDetect String="," attribute="List Separator" context="#pop#pop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
      </context>
      <!--
      @} new shape syntax
      -->


      <!--
      @{ direction
      -->
      <context name="Flowchart_KwDirection" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop!FakeComment">
        <DetectSpaces/>
        <!-- insensitive except for Flowchart -->
        <StringDetect String="TB" attribute="Keyword Parameter" context="#pop!FakeComment" insensitive="1"/>
        <StringDetect String="TD" attribute="Keyword Parameter" context="#pop!FakeComment" insensitive="1"/>
        <StringDetect String="BT" attribute="Keyword Parameter" context="#pop!FakeComment" insensitive="1"/>
        <StringDetect String="RL" attribute="Keyword Parameter" context="#pop!FakeComment" insensitive="1"/>
        <StringDetect String="LR" attribute="Keyword Parameter" context="#pop!FakeComment" insensitive="1"/>
      </context>
      <!--
      @} direction
      -->


      <!--
      @{ click
      -->
      <!-- click D href "https://www.github.com" "Open this in a new tab" _blank -->
      <context name="Flowchart_KwClick" attribute="Normal" lineEndContext="#pop">
        <DetectSpaces/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <RegExpr String="&flowchart_node;" attribute="Node" context="Flowchart_KwClick_Param"/>
      </context>
      <context name="Flowchart_KwClick_Param" attribute="Normal" lineEndContext="#pop#pop">
        <DetectSpaces/>
        <IncludeRules context="Flowchart_Find_UnicodeText"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <WordDetect String="_self" attribute="Keyword Parameter"/>
        <WordDetect String="_blank" attribute="Keyword Parameter"/>
        <WordDetect String="_parent" attribute="Keyword Parameter"/>
        <WordDetect String="_top" attribute="Keyword Parameter"/>
        <WordDetect String="href" attribute="Keyword Parameter"/>
        <WordDetect String="call" attribute="Keyword Parameter"/>
        <DetectIdentifier/>
      </context>
      <!--
      @} click
      -->


      <!--
      @{ style, linkStyle, classDef and class
      -->
      <!-- linkStyle 1,2,7 stroke:#ff3,stroke-width:4px,color:red; -->
      <context name="Flowchart_KwLinkStyle" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwLinkStyle_Idx"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <context name="Flowchart_KwLinkStyle_Idx" attribute="Error" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop!Flowchart_CSSProp">
        <DetectSpaces attribute="Normal" context="#pop#pop!Flowchart_CSSProp"/>
        <Int attribute="ID"/>
        <StringDetect String="," attribute="List Separator"/>
      </context>

      <!-- style id1 fill:#f9f,stroke:#333,stroke-width:4px; -->
      <context name="Flowchart_KwStyle" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwStyle_Node"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <!-- https://github.com/mermaid-js/mermaid/issues/7041 -->
      <context name="Flowchart_KwStyle_Node" attribute="Error" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop!Flowchart_CSSProp">
        <RegExpr String="&flowchart_node;" attribute="Node" context="#pop#pop!Flowchart_CSSProp"/>
      </context>

      <!-- classDef firstClassName,secondClassName fill:#f9f,stroke:#333,stroke-width:4px; -->
      <context name="Flowchart_KwClassDef" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwClassDef_Default"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <!-- classDef default fill:#f9f -->
      <context name="Flowchart_KwClassDef_Default" attribute="Error" lineEndContext="#pop#pop"
               fallthroughContext="#pop!Flowchart_KwClassDef_ClassName">
        <StringDetect String="default " attribute="Keyword Parameter"
                      context="#pop#pop!Flowchart_CSSProp"/>
      </context>
      <context name="Flowchart_KwClassDef_ClassName" attribute="Error"
               lineEndContext="#pop#pop" fallthroughContext="#pop#pop!Flowchart_CSSProp">
        <DetectSpaces attribute="Normal" context="#pop#pop!Flowchart_CSSProp"/>
        <StringDetect String="," attribute="List Separator"/>
        <RegExpr String="&css_class_name;" attribute="Class Name"/>
      </context>

      <!-- class nodeId1,nodeId2 className; -->
      <context name="Flowchart_KwClass" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwClass_Node"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <context name="Flowchart_KwClass_Node" attribute="Normal" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwClass_ClassName"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <RegExpr String="&flowchart_node_no_comma;" attribute="Node"/>
      </context>
      <!-- https://github.com/mermaid-js/mermaid/issues/7043 -->
      <context name="Flowchart_KwClass_ClassName" attribute="Error"
               lineEndContext="#pop#pop#pop">
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop#pop"/>
        <DetectIdentifier attribute="Class Name"/>
        <RegExpr String="&css_class_name;" attribute="Class Name"/>
      </context>

      <!-- @{ inline CSS -->
      <context name="Flowchart_CSSProp" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="Flowchart_CSSValue">
        <DetectSpaces/>
        <StringDetect String=":" attribute="Style Property Separator"
                      context="Flowchart_CSSValue"/>
        <StringDetect String="-" attribute="Style Property"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <StringDetect String="," attribute="Error"/>
        <DetectIdentifier attribute="Style Property"/>
        <StringDetect String="/*" attribute="Comment" context="Flowchart_CSSComment"/>
      </context>
      <context name="Flowchart_CSSValue" attribute="Style Value"
               lineEndContext="#pop#pop">
        <StringDetect String="," attribute="List Separator" context="#pop"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <StringDetect String="\," attribute="Special Text Char"/>
        <DetectIdentifier/>
        <DetectSpaces/>
        <RegExpr String="[-+]?([0-9]+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?(?![-+])"
                 attribute="Number" context="Flowchart_CSSUnit"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/5498
        conflict with Entity codes:
        https://mermaid.js.org/syntax/flowchart.html#entity-codes-to-escape-characters -->
        <RegExpr String="#[a-zA-Z0-9]{3}([a-zA-Z0-9]([a-zA-Z0-9]{2}([a-zA-Z0-9]{2})?+)?+)?+(?![a-zA-Z0-9]*;)"
                 attribute="Style Hexadeximal Color"/>
        <RegExpr String="#[a-zA-Z0-9]+;" attribute="Error" context="#pop#pop"/>
        <StringDetect String="/*" attribute="Comment" context="Flowchart_CSSComment"/>
      </context>
      <context name="Flowchart_CSSUnit" attribute="Normal"
               lineEndContext="#pop#pop#pop" fallthroughContext="#pop">
        <StringDetect String="%" attribute="Style Unit" context="#pop"/>
        <DetectIdentifier attribute="Style Unit" context="#pop"/>
      </context>
      <context name="Flowchart_CSSComment" attribute="Normal" lineEndContext="#pop">
        <AnyChar String=",;" context="#pop" lookAhead="1"/>
        <StringDetect String="*/" attribute="Comment" context="#pop"/>
        <!-- Yes... And that's not the only problem -->
        <StringDetect String=" */" attribute="Error" context="#pop"/>
      </context>
      <!-- @} inline CSS -->
      <!--
      @} style, linkStyle, classDef and class
      -->


      <!--
      @{ Quoted Text + Markdown Formatting
      -->
      <context name="EmptyQuotedText" attribute="Text" fallthroughContext="#pop">
        <StringDetect String='""' attribute="Comment"/>
        <StringDetect String='"``"' attribute="Comment"/>
      </context>
      <context name="EmptyQuotedText_ThenPop" attribute="Text" fallthroughContext="#pop">
        <StringDetect String='""' attribute="Comment" context="#pop"/>
        <StringDetect String='"``"' attribute="Comment" context="#pop"/>
      </context>

      <!-- "..." -->
      <context name="Flowchart_Find_UnicodeText" attribute="Text" fallthroughContext="#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Flowchart_UnicodeText"/>
      </context>
      <context name="Flowchart_Find_UnicodeText_ThenPop" attribute="Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!Flowchart_UnicodeText"/>
      </context>
      <context name="Flowchart_Find_UnicodeText_ThenPop2" attribute="Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop#pop!Flowchart_UnicodeText"/>
      </context>

      <!-- "..."
            ~~~~ -->
      <context name="Flowchart_UnicodeText" attribute="Quoted Text"
               fallthroughContext="Flowchart_UnicodeText_Special">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String="&flowchart_qtext;" attribute="Quoted Text"
                 context="Flowchart_UnicodeText_Special"/>
      </context>
      <context name="Flowchart_UnicodeText_Special" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7003 -->
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_DQ_ThenPop"/>
      </context>

      <!-- "`...`" -->
      <context name="Flowchart_Find_MdText" attribute="Text" fallthroughContext="#pop">
        <StringDetect String='"`' attribute="Markdown Text Delimiter"
                      context="Flowchart_MdText"/>
      </context>
      <context name="Flowchart_Find_MdText_ThenPop" attribute="Text">
        <StringDetect String='"`' attribute="Markdown Text Delimiter"
                      context="#pop!Flowchart_MdText"/>
      </context>

      <!-- "`...`"
             ~~~~~ -->
      <context name="Flowchart_MdText" attribute="Markdown Text"
               fallthroughContext="Flowchart_MdText_Special">
        <StringDetect String='`"' attribute="Markdown Text Delimiter" context="#pop"/>
        <AnyChar String='`"' attribute="Error" context="#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String="&flowchart_mdtext;" attribute="Markdown Text"
                 context="Flowchart_MdText_Special"/>
      </context>
      <context name="Flowchart_MdText_Special" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String='`"' attribute="Markdown Text Delimiter" context="#pop#pop"/>
        <AnyChar String='`"' attribute="Error" context="#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Md_ThenPop"/>
      </context>

      <!--
      @{ Html
      -->

      <!-- special parser for HTML, because the quotes do not close the string inside -->

      <!-- A["<tag attr="...">"]
        stop on " (except attribute)
      -->
      <context name="Find_Md_Html_DQ_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_DQ"/>
      </context>

      <context name="Html_DQ" attribute="HTML Tag">
        <StringDetect String="/" context="Html_DQ_Close"/>
        <DetectIdentifier context="Html_DQ_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_DQ_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_DQ_AttrValue"/>
        <IncludeRules context="Html_DQ_Close"/>
      </context>
      <context name="Html_DQ_AttrValue" attribute="HTML Attribute">
        <DetectIdentifier/>
        <StringDetect String='"' context="#pop"/>
        <StringDetect String=">" attribute="Error" context="#pop#pop#pop"/>
        <StringDetect String="/>" attribute="Error" context="#pop#pop#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7011 -->
        <IncludeRules context="Find_Comment"/>
        <IncludeRules context="Find_Entities"/>
      </context>
      <context name="Html_DQ_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <StringDetect String='"' attribute="Error" context="#pop#pop"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- html close -->
      <context name="Html_Close_Tag" attribute="HTML Tag">
        <StringDetect String=">" attribute="HTML Tag" context="#pop#pop"/>
        <StringDetect String="/>" attribute="HTML Tag" context="#pop#pop"/>
      </context>
      <context name="Html_Find_Elem" attribute="HTML Tag">
        <DetectIdentifier/>
        <DetectSpaces/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7011 -->
        <IncludeRules context="Find_Comment"/>
      </context>

      <!-- A["<tag attr="...">"]
        stop on " (except attribute), newline
      -->
      <context name="Find_Md_Html_DQ_SingleLine_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_DQ_SingleLine"/>
      </context>

      <context name="Html_DQ_SingleLine" attribute="HTML Tag">
        <StringDetect String="/" context="Html_DQ_SingleLine_Close"/>
        <DetectIdentifier context="Html_DQ_SingleLine_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_DQ_SingleLine_Attrs" attribute="HTML Attribute"
               lineEndContext="#pop#pop">
        <StringDetect String='="' context="Html_DQ_SingleLine_AttrValue"/>
        <IncludeRules context="Html_DQ_SingleLine_Close"/>
      </context>
      <context name="Html_DQ_SingleLine_AttrValue" attribute="HTML Attribute"
               lineEndContext="#pop#pop#pop">
        <DetectIdentifier/>
        <StringDetect String='"' context="#pop"/>
        <StringDetect String=">" attribute="Error" context="#pop#pop#pop"/>
        <StringDetect String="/>" attribute="Error" context="#pop#pop#pop"/>
        <IncludeRules context="Find_Entities"/>
      </context>
      <context name="Html_DQ_SingleLine_Close" attribute="HTML Tag" lineEndContext="#pop#pop">
        <IncludeRules context="Html_Close_Tag"/>
        <StringDetect String='"' attribute="Error" context="#pop#pop"/>
        <DetectIdentifier/>
        <DetectSpaces/>
      </context>

      <!-- A[<tag attr="...">]
        stop on " (except attribute), {, }, [, ], (, ), |, @
      -->
      <context name="Find_Md_Html_Text_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_Text"/>
      </context>

      <context name="Html_Text" attribute="HTML Tag">
        <StringDetect String="/" context="Html_Text_Close"/>
        <DetectIdentifier context="Html_Text_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_Text_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_Text_AttrValue"/>
        <IncludeRules context="Html_Text_Close"/>
      </context>
      <context name="Html_Text_AttrValue" attribute="HTML Attribute">
        <AnyChar String='{}[]()|@' context="#pop#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_DQ_AttrValue"/>
      </context>
      <context name="Html_Text_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <AnyChar String='{}[]()"|@' context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A[/<tag attr="...">/]
        stop on {, }, [, ], (, ), /], \]
      -->
      <context name="Find_Md_Html_Text[//]_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_Text[//]"/>
      </context>

      <context name="Html_Text[//]" attribute="HTML Tag">
        <StringDetect String="/]" context="#pop" lookAhead="1"/>
        <StringDetect String="\]" context="#pop" lookAhead="1"/>
        <StringDetect String="/" context="Html_Text[//]_Close"/>
        <DetectIdentifier context="Html_Text[//]_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_Text[//]_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_Text[//]_AttrValue"/>
        <IncludeRules context="Html_Text[//]_Close"/>
      </context>
      <context name="Html_Text[//]_AttrValue" attribute="HTML Attribute">
        <AnyChar String='{}[]()' context="#pop#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_DQ_AttrValue"/>
      </context>
      <context name="Html_Text[//]_Close" attribute="HTML Tag">
        <StringDetect String="/]" context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Close_Tag"/>
        <StringDetect String="\]" context="#pop#pop" lookAhead="1"/>
        <AnyChar String='{}[]()' context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A["`<tag attr="...">`"]
        stop on {, }, [, ], (, ), `
      -->
      <context name="Find_Md_Html_Md_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_Md"/>
      </context>

      <context name="Html_Md" attribute="HTML Tag">
        <StringDetect String="/" context="Html_Md_Close"/>
        <DetectIdentifier context="Html_Md_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_Md_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_Md_AttrValue"/>
        <IncludeRules context="Html_Md_Close"/>
      </context>
      <context name="Html_Md_AttrValue" attribute="HTML Attribute">
        <AnyChar String='{}[]()`' context="#pop#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_DQ_AttrValue"/>
      </context>
      <context name="Html_Md_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <AnyChar String='{}[]()"`' context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A[`<tag attr="...">`]
        stop on `
      -->
      <context name="Find_Md_Html_Backtick_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_Backtick"/>
      </context>

      <context name="Html_Backtick" attribute="HTML Tag">
        <StringDetect String="/" context="Html_Backtick_Close"/>
        <DetectIdentifier context="Html_Backtick_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_Backtick_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_Backtick_AttrValue"/>
        <IncludeRules context="Html_Backtick_Close"/>
      </context>
      <context name="Html_Backtick_AttrValue" attribute="HTML Attribute">
        <StringDetect String="`" context="#pop#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_DQ_AttrValue"/>
      </context>
      <context name="Html_Backtick_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <StringDetect String="`" context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A -x B : <tag attr="...">
        stop on newline, ;, :, &
      -->
      <context name="Find_Md_Html_ClassLabel_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_ClassLabel"/>
      </context>

      <context name="Html_ClassLabel" attribute="HTML Tag">
        <StringDetect String="/" context="Html_ClassLabel_Close"/>
        <DetectIdentifier context="Html_ClassLabel_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_ClassLabel_Attrs" attribute="HTML Attribute"
               lineEndContext="#pop#pop">
        <StringDetect String='="' context="Html_ClassLabel_AttrValue"/>
        <IncludeRules context="Html_ClassLabel_Close"/>
      </context>
      <context name="Html_ClassLabel_AttrValue" attribute="HTML Attribute"
               lineEndContext="#pop#pop#pop">
        <DetectIdentifier/>
        <StringDetect String='"' context="#pop"/>
        <AnyChar String="&class_syms_no_label;" context="#pop#pop#pop" lookAhead="1"/>
      </context>
      <context name="Html_ClassLabel_Close" attribute="HTML Tag" lineEndContext="#pop#pop">
        <IncludeRules context="Html_Close_Tag"/>
        <DetectIdentifier/>
        <DetectSpaces/>
        <AnyChar String="&class_syms_no_label;" context="#pop#pop" lookAhead="1"/>
      </context>

      <!-- s1 - -> s2 : <tag attr="...">
        stop on newline, :
      -->
      <context name="Find_Md_Html_StateText_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_StateText"/>
      </context>

      <context name="Html_StateText" attribute="HTML Tag">
        <StringDetect String="/" context="Html_StateText_Close"/>
        <DetectIdentifier context="Html_StateText_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_StateText_Attrs" attribute="HTML Attribute"
               lineEndContext="#pop#pop">
        <StringDetect String='="' context="Html_StateText_AttrValue"/>
        <IncludeRules context="Html_StateText_Close"/>
      </context>
      <context name="Html_StateText_AttrValue" attribute="HTML Attribute"
               lineEndContext="#pop#pop#pop">
        <DetectIdentifier/>
        <StringDetect String='"' context="#pop"/>
        <AnyChar String=":" attribute="Error" context="#pop#pop#pop"/>
      </context>
      <context name="Html_StateText_Close" attribute="HTML Tag" lineEndContext="#pop#pop">
        <IncludeRules context="Html_Close_Tag"/>
        <DetectIdentifier/>
        <DetectSpaces/>
        <AnyChar String=":" attribute="Error" context="#pop#pop"/>
      </context>

      <!-- A@{label: <tag attr="...">}
        stop on " (except attribute), {, }, [, ]
      -->
      <context name="Find_Md_Html_NewShape_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_NewShape"/>
      </context>

      <context name="Html_NewShape" attribute="HTML Tag">
        <StringDetect String="/" context="Html_NewShape_Close"/>
        <DetectIdentifier context="Html_NewShape_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_NewShape_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_NewShape_AttrValue"/>
        <IncludeRules context="Html_NewShape_Close"/>
      </context>
      <context name="Html_NewShape_AttrValue" attribute="HTML Attribute">
        <AnyChar String='{}[]' context="#pop#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_DQ_AttrValue"/>
      </context>
      <context name="Html_NewShape_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <AnyChar String='{}[]"' context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A@{label: '<tag attr="...">'}
        stop on " (except attribute), {, }, [, ], '
      -->
      <context name="Find_Md_Html_NewShapeSQ_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag"
                 context="#pop!Html_NewShapeSQ"/>
      </context>

      <context name="Html_NewShapeSQ" attribute="HTML Tag">
        <StringDetect String="/" context="Html_NewShapeSQ_Close"/>
        <DetectIdentifier context="Html_NewShapeSQ_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_NewShapeSQ_Attrs" attribute="HTML Attribute">
        <IncludeRules context="Html_NewShapeSQ_Close"/>
        <IncludeRules context="Find_Entities"/>
      </context>
      <context name="Html_NewShapeSQ_Close" attribute="HTML Tag">
        <IncludeRules context="Html_Close_Tag"/>
        <AnyChar String="{}[]'&quot;" context="#pop#pop" lookAhead="1"/>
        <IncludeRules context="Html_Find_Elem"/>
      </context>

      <!-- A - - <tag attr="..."> - - - B
        stop on - -
      -->
      <context name="Find_Md_Html_LinkLine_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_LinkLine"/>
      </context>

      <context name="Html_LinkLine" attribute="HTML Tag">
        <StringDetect String="/" context="Html_LinkLine_Close"/>
        <DetectIdentifier context="Html_LinkLine_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_LinkLine_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_LinkLine_AttrValue"/>
        <IncludeRules context="Html_LinkLine_Close"/>
      </context>
      <context name="Html_LinkLine_AttrValue" attribute="HTML Attribute">
        <IncludeRules context="Html_DQ_AttrValue"/>
        <StringDetect String="--" attribute="Error"
                      context="#pop#pop#pop#pop#pop!Flowchart_LinkLine_TextEnd"/>
      </context>
      <context name="Html_LinkLine_Close" attribute="HTML Tag">
        <IncludeRules context="Html_DQ_Close"/>
        <StringDetect String="--" attribute="Error"
                      context="#pop#pop#pop#pop!Flowchart_LinkLine_TextEnd"/>
      </context>

      <!-- A == <tag attr="..."> ==> B
        stop on =
      -->
      <context name="Find_Md_Html_LinkThick_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_LinkThick"/>
      </context>

      <context name="Html_LinkThick" attribute="HTML Tag">
        <StringDetect String="/" context="Html_LinkThick_Close"/>
        <DetectIdentifier context="Html_LinkThick_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_LinkThick_Attrs" attribute="HTML Attribute">
        <IncludeRules context="Html_LinkThick_Close"/>
      </context>
      <context name="Html_LinkThick_Close" attribute="HTML Tag">
        <IncludeRules context="Html_DQ_Close"/>
        <StringDetect String="=" lookAhead="1" context="#pop#pop"/>
      </context>

      <!-- A -. <tag attr="..."> .- B
        stop on .
      -->
      <context name="Find_Md_Html_LinkDotted_ThenPop" attribute="Normal">
        <RegExpr String="&prefix_html_tag;" attribute="HTML Tag" context="#pop!Html_LinkDotted"/>
      </context>

      <context name="Html_LinkDotted" attribute="HTML Tag">
        <StringDetect String="/" context="Html_LinkDotted_Close"/>
        <DetectIdentifier context="Html_LinkDotted_Attrs" attribute="HTML Tag"/>
      </context>
      <context name="Html_LinkDotted_Attrs" attribute="HTML Attribute">
        <StringDetect String='="' context="Html_LinkDotted_AttrValue"/>
        <IncludeRules context="Html_LinkDotted_Close"/>
      </context>
      <context name="Html_LinkDotted_AttrValue" attribute="HTML Attribute">
        <IncludeRules context="Html_DQ_AttrValue"/>
        <StringDetect String="." attribute="Error"
                      context="#pop#pop#pop#pop#pop!Flowchart_LinkDotted_TextEnd"/>
      </context>
      <context name="Html_LinkDotted_Close" attribute="HTML Tag">
        <IncludeRules context="Html_DQ_Close"/>
        <StringDetect String="." attribute="Error"
                      context="#pop#pop#pop#pop!Flowchart_LinkDotted_TextEnd"/>
      </context>
      <!--
      @} Html
      -->
      <!--
      @} Quoted Text + Markdown Formatting
      -->

      <!--
      @} Flowchart
      -->


      <!--
      @{ Sequence Diagram
      -->

      <context name="SequenceDiag" attribute="Error" lineEndContext="SequenceDiag_Body">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=";" attribute="Symbol Separator" context="SequenceDiag_Body"/>
      </context>

      <context name="SequenceDiag_Body" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="SequenceDiag_Text"/>

        <RegExpr String="(\(\))?(--?(>>?|[x)]|[|][\\/]|//|\\\\)|&lt;&lt;--?>>|([\\/][|]|//|\\\\)--?)(\(\))?"
                 attribute="Link" context="SequenceDiag_AfterNode"/>

        <StringDetect String=";" attribute="Symbol Separator"/>
        <IncludeRules context="Find_Comment"/>

        <AnyChar String="&lt;&gt;+-()#," attribute="Error"/>

        <RegExpr String="&seq_node;" attribute="Node"/>

        <WordDetect String="end" attribute="Keyword" endRegion="kwblock"/>
        <WordDetect String="participant" attribute="Keyword"
                    context="SequenceDiag_KwParticipant"/>
        <WordDetect String="box" attribute="Keyword" beginRegion="kwblock"
                    context="SequenceDiag_Text!SequenceDiag_Color"/>
        <WordDetect String="link" attribute="Keyword" context="SequenceDiag_KwLink"/>
        <WordDetect String="links" attribute="Keyword" context="SequenceDiag_KwLinks"/>
        <WordDetect String="create" attribute="Keyword" context="SequenceDiag_KwCreate"/>
        <WordDetect String="destroy" attribute="Keyword" context="SequenceDiag_Node"/>
        <WordDetect String="activate" attribute="Keyword" context="SequenceDiag_Node"/>
        <WordDetect String="deactivate" attribute="Keyword" context="SequenceDiag_Node"/>
        <WordDetect String="Note" attribute="Keyword" context="SequenceDiag_KwNote"/>
        <WordDetect String="loop" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="alt" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="opt" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="else" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock" endRegion="kwblock"/>
        <WordDetect String="par" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="and" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock" endRegion="kwblock"/>
        <WordDetect String="critical" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="option" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock" endRegion="kwblock"/>
        <WordDetect String="break" attribute="Keyword" context="SequenceDiag_Text"
                    beginRegion="kwblock"/>
        <WordDetect String="rect" attribute="Keyword" beginRegion="kwblock"
                    context="SequenceDiag_Text!SequenceDiag_Color"/>
        <WordDetect String="autonumber" attribute="Keyword"/>

        <IncludeRules context="Find_Accessibility"/>

        <!-- because mermaid... -->
        <StringDetect String="sequenceDiagram" attribute="Error" context="#pop"/>
      </context>

      <context name="SequenceDiag_AfterNode" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <AnyChar String="+-" attribute="Keyword" context="#pop"/>
      </context>

      <context name="SequenceDiag_Text" attribute="Text" lineEndContext="#pop">
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <IncludeRules context="SequenceDiag_Find_Text"/>
      </context>
      <context name="SequenceDiag_Find_Text" attribute="Text" lineEndContext="#pop">
        <DetectIdentifier/>
        <DetectSpaces/>
        <Int/>
        <StringDetect String="$$" attribute="Math Delimiter"/>
        <IncludeRules context="Find_Entity"/>
        <StringDetect String="#" attribute="Error"/>
        <IncludeRules context="Find_HTML_br"/>
      </context>

      <!--
      @{ participant
      -->
      <context name="SequenceDiag_KwParticipant" attribute="Node">
        <StringDetect String="@" lookAhead="1" context="SequenceDiag_MaybeYAMLConfig"/>
        <StringDetect String=" as " attribute="Keyword" context="#pop!SequenceDiag_Text"/>
        <IncludeRules context="SequenceDiag_Text"/>
      </context>
      <!--
      @} participant
      -->


      <!--
      @{ color
      -->
      <context name="SequenceDiag_Color" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces/>
        <StringDetect String="rgb("  attribute="Style Value" context="#pop!SequenceDiag_Rgb"/>
        <StringDetect String="rgba(" attribute="Style Value" context="#pop!SequenceDiag_Rgb"/>
        <DetectIdentifier attribute="Style Value" context="#pop"/>
      </context>

      <!-- box rgb(from hwb(120deg 10% 20%) r g calc(b + 200)) bla bla
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="SequenceDiag_Rgb" attribute="Style Value" lineEndContext="#pop#pop">
        <DetectSpaces/>
        <Int attribute="Number" context="Flowchart_CSSUnit"/>
        <StringDetect String="#" attribute="Error"/>
        <StringDetect String="(" attribute="Style Value" context="SequenceDiag_Rgb"/>
        <StringDetect String=")" attribute="Style Value" context="#pop"/>
        <StringDetect String=";" lookAhead="1" context="#pop"/>
        <DetectIdentifier/>
      </context>
      <!--
      @} color
      -->


      <!--
      @{ link <actor>: <link-label> @ <link-url>
      -->
      <context name="SequenceDiag_KwLink" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":" attribute="Node Separator"
                      context="SequenceDiag_KwLink_Label"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <context name="SequenceDiag_KwLink_Label" attribute="Text" lineEndContext="#pop#pop">
        <StringDetect String="@" attribute="ID Separator"
                      context="SequenceDiag_KwLink_URL"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <DetectSpaces/>
        <DetectIdentifier/>
      </context>
      <context name="SequenceDiag_KwLink_URL" attribute="Normal" lineEndContext="#pop#pop#pop">
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop#pop"/>
      </context>
      <!--
      @} link
      -->


      <!--
      @{ links <actor>: <json-formatted link-name link-url pairs>
      -->
      <context name="SequenceDiag_KwLinks" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":" attribute="Node Separator" context="SequenceDiag_JSON"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <!--
      @} links
      -->


      <!--
      @{ JSON
      -->
      <!-- only string value -->
      <context name="SequenceDiag_JSON" attribute="Error" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="SequenceDiag_JSON_Str"/>
        <StringDetect String=":" attribute="Property Separator"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" context="#pop#pop"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
      </context>
      <context name="SequenceDiag_JSON_Str" attribute="Quoted Text"
               lineEndContext="#pop#pop#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop#pop"/>
      </context>
      <!--
      @} JSON
      -->


      <!--
      @{ create participant Carl as dsidisidsid
      -->
      <context name="SequenceDiag_KwCreate" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="SequenceDiag_KwCreate_Node">
        <DetectSpaces/>
        <WordDetect String="actor" attribute="Keyword Parameter"/>
        <WordDetect String="participant" attribute="Keyword Parameter"/>
      </context>
      <context name="SequenceDiag_KwCreate_Node" attribute="Node" lineEndContext="#pop#pop">
        <StringDetect String=" as " attribute="Keyword" context="#pop#pop!SequenceDiag_Text"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <IncludeRules context="SequenceDiag_Find_Text"/>
      </context>
      <!--
      @} create
      -->


      <!--
      @{ node
      -->
      <context name="SequenceDiag_Node" attribute="Node" lineEndContext="#pop">
        <IncludeRules context="SequenceDiag_Text"/>
      </context>
      <!--
      @} node
      -->


      <!--
      @{ Note right of John: Text in note
      -->
      <context name="SequenceDiag_KwNote" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="SequenceDiag_KwNote_Actors">
        <DetectSpaces/>
        <WordDetect String="right of" attribute="Keyword Parameter"
                    context="SequenceDiag_KwNote_Actors"/>
        <WordDetect String="left of" attribute="Keyword Parameter"
                    context="SequenceDiag_KwNote_Actors"/>
        <WordDetect String="over" attribute="Keyword Parameter"
                    context="SequenceDiag_KwNote_Actors"/>
      </context>
      <!-- Note right of Alice,John: Text in note
                        ~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="SequenceDiag_KwNote_Actors" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":" attribute="Node Separator"
                      context="#pop#pop!SequenceDiag_Text"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
      </context>
      <!--
      @} Note
      -->


      <!--
      @{ JSONConfig
      participant Alice@{type: boundary}
                       ~~~~~~~~~~~~~~~~~
      -->
      <context name="SequenceDiag_MaybeYAMLConfig" attribute="Normal">
        <RegExpr String="(?&lt;=[^\s])@(?=[^:]*:)" attribute="Node Separator"
                 context="SequenceDiag_YAMLConfig"/>
        <StringDetect String="@" context="#pop"/>
      </context>

      <context name="SequenceDiag_YAMLConfig" attribute="Normal">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"
                      context="SequenceDiag_YAMLConfig_Prop"/>
        <RegExpr String="." attribute="Error" context="#pop#pop#pop"/>
      </context>
      <!-- YAML with a single property without any special character -->
      <context name="SequenceDiag_YAMLConfig_Prop" attribute="Error">
        <!-- https://github.com/mermaid-js/mermaid/issues/7044 -->
        <StringDetect String=": " attribute="Property Separator"
                      context="SequenceDiag_YAMLConfig_PropValue"/>
        <LineContinue char=":" attribute="Property Separator"
                      context="SequenceDiag_YAMLConfig_PropValue"/>
        <IncludeRules context="Find_DQuote_NoSpecial"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop#pop"/>
        <IncludeRules context="Find_Prop"/>
      </context>
      <!-- participant Alice@{ type: value }
                                    ~~~~~~~~
      -->
      <context name="SequenceDiag_YAMLConfig_PropValue" attribute="Error">
        <DetectSpaces attribute="Text"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop#pop#pop"/>
        <DetectIdentifier attribute="Text"/>
        <IncludeRules context="Find_DQuote_NoSpecial"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7037 -->
        <IncludeRules context="Find_SQuote_NoSpecial"/>
        <IncludeRules context="Find_Comment"/>
      </context>
      <!--
      @} JSONConfig
      -->

      <!--
      @} Sequence Diagram
      -->


      <!--
      @{ Class Diagram
      -->

      <context name="ClassDiag" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="ClassDiag_Class_Mem"/>

        <StringDetect String="--"      attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="&lt;--"  attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="*--"     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="o--"     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String=">--"     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="&lt;|--" attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="|&gt;--" attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="()--"    attribute="Link" context="ClassDiag_RelationType_Right"/>

        <StringDetect String=".."      attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="&lt;.."  attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="*.."     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="o.."     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String=">.."     attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="&lt;|.." attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="|&gt;.." attribute="Link" context="ClassDiag_RelationType_Right"/>
        <StringDetect String="().."    attribute="Link" context="ClassDiag_RelationType_Right"/>

        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="ClassDiag_KwClass_Name!ClassDiag_Annotation"/>

        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"/>

        <IncludeRules context="Find_Comment"/>
        <IncludeRules context="Flowchart_Find_UnicodeText"/>

        <AnyChar String="&lt;&gt;+()#,;" attribute="Error"/>

        <WordDetect String="class" attribute="Keyword" context="ClassDiag_KwClass"/>
        <IncludeRules context="ClassDiag_Name"/>

        <WordDetect String="namespace" attribute="Keyword"/>

        <!-- TODO Flowchart uses ';' as separator, but should be an error with ClassDiag -->
        <WordDetect String="note for"  attribute="Keyword" context="ClassDiag_KwNoteFor"/>
        <WordDetect String="note"      attribute="Keyword" context="ClassDiag_KwNote"/>
        <WordDetect String="click"     attribute="Keyword" context="Flowchart_KwClick"/>
        <WordDetect String="callback"  attribute="Keyword" context="Flowchart_KwClick"/>
        <WordDetect String="link"      attribute="Keyword" context="Flowchart_KwClick"/>
        <WordDetect String="classDef"  attribute="Keyword" context="Flowchart_KwClassDef"/>
        <WordDetect String="cssClass"  attribute="Keyword" context="ClassDiag_KwCssClass"/>
        <WordDetect String="style"     attribute="Keyword" context="Flowchart_KwStyle"/>
        <WordDetect String="direction" attribute="Keyword" context="Flowchart_KwDirection"/>

        <IncludeRules context="Find_Accessibility"/>

        <!-- because mermaid... -->
        <StringDetect String="classDiagram" attribute="Error"/>
      </context>

      <context name="ClassDiag_Name" attribute="Node" lineEndContext="#pop">
        <RegExpr String="&class_node;" attribute="Node"/>
      </context>


      <!-- A ..> B
               ~~~
      -->
      <context name="ClassDiag_RelationType_Right" attribute="Link" lineEndContext="#pop"
               fallthroughContext="ClassDiag_AfterLink">
        <StringDetect String="&lt;|"  attribute="Link" context="ClassDiag_AfterLink"/>
        <AnyChar String="*o&lt;&gt;"  attribute="Link" context="ClassDiag_AfterLink"/>
        <StringDetect String="|>"  attribute="Link" context="ClassDiag_AfterLink"/>
        <StringDetect String="()"  attribute="Link" context="ClassDiag_AfterLink"/>
      </context>

      <!-- A ..> B : LabelText
                ~~~~~~~~~~~~~~
      -->
      <context name="ClassDiag_AfterLink" attribute="Node" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Link Text Separator" context="ClassDiag_LabelText"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop#pop!Flowchart_UnicodeText"/>
        <IncludeRules context="ClassDiag_Name"/>
      </context>
      <!-- A ..> B : LabelText
                    ~~~~~~~~~~
      -->
      <context name="ClassDiag_LabelText" attribute="Link Text" lineEndContext="#pop#pop#pop"
               fallthroughContext="ClassDiag_LabelText_Special">
        <RegExpr String='([^&md_mmd_syms;&class_syms_no_label;]++|&md_mmd_no_md;)++'
                 attribute="Link Text" context="ClassDiag_LabelText_Special"/>
      </context>
      <context name="ClassDiag_LabelText_Special" attribute="Special Text Char"
               lineEndContext="#pop#pop#pop#pop">
        <AnyChar String="&class_syms_no_label;" attribute="Error" context="#pop#pop#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_ClassLabel_ThenPop"/>
      </context>


      <!--
      @{ Shape : +draw()
                ~~~~~~~~
      -->
      <context name="ClassDiag_Class_Mem" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="ClassDiag_Class_Field">
        <AnyChar String="+-#~" attribute="Keyword" context="ClassDiag_Class_Field"/>
        <DetectSpaces/>
      </context>
      <context name="ClassDiag_Class_Field" attribute="Member"
               lineEndContext="#pop#pop">
        <StringDetect String=")" attribute="Member"
                      context="#pop#pop!ClassDiag_Class_ReturnType"/>
        <IncludeRules context="ClassDiag_Class_Mem_Common"/>
      </context>
      <context name="ClassDiag_Class_ReturnType" attribute="Member Type" lineEndContext="#pop">
        <IncludeRules context="ClassDiag_Class_Mem_Common"/>
        <StringDetect String=":" attribute="Error"/>
      </context>

      <context name="ClassDiag_Class_Mem_Common" attribute="Member" lineEndContext="#pop">
        <DetectSpaces/>
        <DetectIdentifier/>
        <StringDetect String="$$" lookAhead="1"
                      context="ClassDiag_Class_Mem_AmbiguousMathClassifier"/>
        <StringDetect String="~" attribute="Generic Type Symbol"/>
        <LineContinue char="$" attribute="Keyword" context="#pop"/>
        <LineContinue char="*" attribute="Keyword" context="#pop"/>
      </context>
      <context name="ClassDiag_Class_Mem_AmbiguousMathClassifier" attribute="Normal">
        <RegExpr String="\$\$(?!$)" attribute="Math Delimiter" context="#pop"/>
        <StringDetect String="$" context="#pop"/>
      </context>
      <!--
      @} Shape : +draw()
      -->


      <!--
      @{ class Name
      -->
      <context name="ClassDiag_KwClass" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"
                      context="ClassDiag_KwClass_Block" beginRegion="block"/>
        <DetectSpaces attribute="Node"/>
        <IncludeRules context="ClassDiag_KwClass_Name"/>
        <StringDetect String="~" attribute="Generic Type Symbol"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="ClassDiag_ClassName"/>
        <StringDetect String="`" attribute="Quoted Text Delimiter"
                      context="ClassDiag_KwClass_BacktickName"/>
        <StringDetect String="[" attribute="Shape"
                      context="ClassDiag_KwClass_BoxedName"/>
      </context>
      <context name="ClassDiag_KwClass_Name" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectIdentifier attribute="Node"/>
        <Int attribute="Node"/>
        <StringDetect String="--" lookAhead="1" context="#pop"/>
        <StringDetect String=".." lookAhead="1" context="#pop"/>
        <AnyChar String="-." attribute="Node"/>
      </context>
      <!--
      class `Name`
             ~~~~~
      -->
      <context name="ClassDiag_KwClass_BacktickName" attribute="Quoted Text"
               fallthroughContext="ClassDiag_KwClass_BacktickName_Special">
        <StringDetect String="`" attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String="([^`&md_syms;]++|&md_sym_no_md;)++"
                 attribute="Quoted Text" context="ClassDiag_KwClass_BacktickName_Special"/>
      </context>
      <context name="ClassDiag_KwClass_BacktickName_Special" attribute="Quoted Text"
               lineEndContext="#pop">
        <StringDetect String="`" attribute="Quoted Text Delimiter" context="#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Backtick_ThenPop"/>
      </context>
      <!--
      class ["Name"]
             ~~~~~~~
      -->
      <context name="ClassDiag_KwClass_BoxedName" attribute="Error" fallthroughContext="#pop">
        <StringDetect String="]" attribute="Shape" context="#pop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="EmptyQuotedText"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="ClassDiag_KwClass_BoxedName_End!Flowchart_UnicodeText"/>
      </context>
      <!--
      class [ "Name" ]
                    ~~
      -->
      <context name="ClassDiag_KwClass_BoxedName_End" attribute="Error"
               fallthroughContext="#pop#pop">
        <StringDetect String="]" attribute="Shape" context="#pop#pop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="EmptyQuotedText"/>
      </context>
      <!--
      class Name { ... }
                  ~~~~~~
      -->
      <context name="ClassDiag_KwClass_Block" attribute="Member"
               fallthroughContext="ClassDiag_KwClass_Mem">
        <DetectSpaces attribute="Member"/>
        <AnyChar String="+-#~" attribute="Keyword" context="ClassDiag_KwClass_Mem"/>
        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="ClassDiag_KwClass_Mem!ClassDiag_Annotation"/>
        <IncludeRules context="Find_Comment"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop" endRegion="block"/>
      </context>

      <context name="ClassDiag_KwClass_Mem" attribute="Member" lineEndContext="#pop">
        <StringDetect String=")" attribute="Member"
                      context="#pop!ClassDiag_KwClass_ReturnType"/>
        <IncludeRules context="ClassDiag_KwClass_ReturnType"/>
      </context>
      <context name="ClassDiag_KwClass_ReturnType" attribute="Member Type"
               lineEndContext="#pop">
        <IncludeRules context="ClassDiag_Class_Mem_Common"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop#pop#pop" endRegion="block"/>
      </context>
      <!--
      @} class
      -->


      <!--
      @{ note "bla bla"
      -->
      <context name="ClassDiag_KwNote" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <IncludeRules context="Flowchart_Find_UnicodeText_ThenPop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>
      <!-- note for className "bla bla" -->
      <context name="ClassDiag_KwNoteFor" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <IncludeRules context="Flowchart_Find_UnicodeText_ThenPop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="ClassDiag_KwClass_Name"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>
      <!--
      @} note
      -->


      <!--
      @{ cssClass "nodeId1,nodeId2" className
      -->
      <context name="ClassDiag_KwCssClass" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="ClassDiag_KwCssClass_Classes"/>
        <DetectSpaces attribute="Normal"/>
        <RegExpr String="&css_class_name;" attribute="Class Name"/>
      </context>
      <context name="ClassDiag_KwCssClass_Classes" attribute="Node">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <StringDetect String="," attribute="Node Separator"/>
        <DetectIdentifier/>
      </context>
      <!--
      @} cssClass
      -->


      <!-- <<annotation>>
             ~~~~~~~~~~~~
      -->
      <context name="ClassDiag_Annotation" attribute="Annotation" fallthroughContext="#pop">
        <DetectIdentifier attribute="Annotation"/>
        <StringDetect String=">>" attribute="Annotation Delimiter" context="#pop"/>
      </context>


      <!-- class Name:::classname
                        ~~~~~~~~~
      -->
      <context name="ClassDiag_ClassName" attribute="Class Name" lineEndContext="#pop"
               fallthroughContext="ClassDiag_ClassName2">
        <DetectSpaces context="ClassDiag_ClassName2"/>
      </context>
      <context name="ClassDiag_ClassName2" attribute="Class Name" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <DetectIdentifier/>
        <Int/>
      </context>

      <!--
      @} Class Diagram
      -->


      <!--
      @{ State Diagram
      -->

      <context name="StateDiag" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="ClassDiag_Annotation"/>

        <StringDetect String="-->" attribute="Link"/>
        <StringDetect String="--" attribute="Concurrency"/>

        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="ClassDiag_ClassName"/>
        <StringDetect String=":" attribute="Link Text Separator" context="StateDiag_LinkText"/>

        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"/>

        <AnyChar String='-"' attribute="Error"/>

        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <StringDetect String="%" attribute="Comment" context="Comment"/>

        <RegExpr String="&state_node;" attribute="Node"/>

        <WordDetect String="note" attribute="Keyword" context="StateDiag_KwNote"/>
        <WordDetect String="state" attribute="Keyword" context="StateDiag_KwState"/>
        <WordDetect String="class" attribute="Keyword" context="StateDiag_KwClass"/>
        <WordDetect String="classDef"  attribute="Keyword" context="Flowchart_KwClassDef"/>
        <WordDetect String="direction" attribute="Keyword" context="Flowchart_KwDirection"/>

        <IncludeRules context="Find_Accessibility"/>

        <!-- because mermaid... -->
        <StringDetect String="stateDiagram" attribute="Error"/>
      </context>

      <!-- s1 - -> s2 : EvScrollLockPressed
                       ~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="StateDiag_LinkText" attribute="Link Text" lineEndContext="#pop"
               fallthroughContext="StateDiag_LinkText_Text">
        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <StringDetect String="%%" context="#pop!Comment"/>
      </context>
      <context name="StateDiag_LinkText_Text" attribute="Link Text" lineEndContext="#pop#pop"
               fallthroughContext="StateDiag_LinkText_Text_Special">
        <RegExpr String='([^&md_mmd_syms;;:]++|&md_mmd_no_md;)++'
                 attribute="Link Text" context="StateDiag_LinkText_Text_Special"/>
      </context>
      <context name="StateDiag_LinkText_Text_Special" attribute="Special Text Char"
               lineEndContext="#pop#pop#pop">
        <StringDetect String=";" context="#pop#pop#pop" lookAhead="1"/>
        <StringDetect String=":" attribute="Error" context="#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_StateText_ThenPop"/>
      </context>


      <!--
      @{ state s1 { ... } / state "..." as s1
      -->
      <context name="StateDiag_KwState" attribute="Node"
               fallthroughContext="StateDiag_KwState_State">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' lookAhead="1"
                      context="StateDiag_KwState_As!StateDiag_KwState_State_EmptyDQ!Flowchart_Find_UnicodeText!StateDiag_KwState_State_EmptyDQ"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop"/>
        <StringDetect String="}" attribute="Error" beginRegion="block" context="#pop"/>
        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="StateDiag_KwState_StateEnd!ClassDiag_Annotation"/>
        <RegExpr String="&mmd_ent;" attribute="Entity" context="StateDiag_KwState_State"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7105 -->
        <StringDetect String="#" attribute="Error"/>
      </context>
      <!-- state s1 { ... }
                 ~~~~
      -->
      <context name="StateDiag_KwState_State" attribute="Node" lineEndContext="#pop#pop">
        <AnyChar String="123456789-"/>
        <DetectIdentifier/>
        <DetectSpaces attribute="Normal" context="#pop!StateDiag_KwState_StateEnd"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop#pop"/>
        <StringDetect String="}" attribute="Error" beginRegion="block" context="#pop#pop"/>
        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="#pop!StateDiag_KwState_StateEnd!ClassDiag_Annotation"/>
        <RegExpr String="&lt;(/[a-z]+|[a-z]+/?)>&gt;" attribute="HTML Tag"/>
      </context>
      <context name="StateDiag_KwState_StateEnd" attribute="Error"
               lineEndContext="#pop#pop" fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop#pop"/>
        <StringDetect String="}" attribute="Error" beginRegion="block" context="#pop#pop"/>
        <StringDetect String="&lt;&lt;" attribute="Annotation Delimiter"
                      context="ClassDiag_Annotation"/>
      </context>
      <!-- state "" "..." "" as s1
                 ~~       ~~
      -->
      <context name="StateDiag_KwState_State_EmptyDQ" attribute="Node"
               lineEndContext="#pop" fallthroughContext="#pop">
        <StringDetect String='""' attribute="Comment"/>
        <DetectSpaces attribute="Normal"/>
      </context>
      <!-- state "..." as s1
                      ~~~
      -->
      <context name="StateDiag_KwState_As" attribute="Node" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="as" attribute="Keyword Parameter" context="#pop#pop"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <StringDetect String="%" attribute="Error" context="#pop#pop"/>
      </context>
      <!--
      @} state
      -->


      <!--
      @{ note right of State bla bla end note / note left of State : bla bla
              ~~~~~~~~~                              ~~~~~~~~
      -->
      <context name="StateDiag_KwNote" attribute="Node"
               fallthroughContext="StateDiag_KwNote_State!Spaces">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="right of" attribute="Keyword Parameter"
                    context="StateDiag_KwNote_State!Spaces"/>
        <WordDetect String="left of" attribute="Keyword Parameter"
                    context="StateDiag_KwNote_State!Spaces"/>
      </context>
      <!-- note right of State bla bla end note
                         ~~~~~
      -->
      <context name="StateDiag_KwNote_State" attribute="Text"
               fallthroughContext="StateDiag_KwNote_Note">
        <RegExpr String="&state_node;" attribute="Node" context="StateDiag_KwNote_Note"/>
      </context>
      <!-- note right of State bla bla end note / note right of State : bla bla
                              ~                                      ~~
      -->
      <context name="StateDiag_KwNote_Note" attribute="Text"
               fallthroughContext="StateDiag_KwNote_Block">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Text Separator" context="StateDiag_KwNote_Inline"/>
      </context>
      <!-- note right of State bla bla end note
                               ~~~~~~~~~~~~~~~~
      -->
      <context name="StateDiag_KwNote_Block" attribute="Text"
               fallthroughContext="StateDiag_KwNote_Block_Special">
        <IncludeRules context="Find_Comment_InText"/>
        <!-- end note: https://github.com/mermaid-js/mermaid/issues/7089 -->
        <RegExpr String='([^&md_syms;e]++|e(?!nd note\b)|&md_sym_no_md;)++'
                 attribute="Text" context="StateDiag_KwNote_Block_Special"/>
      </context>
      <context name="StateDiag_KwNote_Block_Special" attribute="Text" lineEndContext="#pop">
        <!-- https://github.com/mermaid-js/mermaid/issues/7089 -->
        <StringDetect String="end note" attribute="Keyword" context="#pop#pop#pop#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_DQ_ThenPop"/>
      </context>
      <!-- note right of State : bla bla
                                ~~~~~~~~
      -->
      <context name="StateDiag_KwNote_Inline" attribute="Text"
               lineEndContext="#pop#pop#pop#pop"
               fallthroughContext="StateDiag_KwNote_Inline_Special">
        <RegExpr String='([^&md_syms;:]++|&md_sym_no_md;)++'
                 attribute="Text" context="StateDiag_KwNote_Block_Special"/>
      </context>
      <context name="StateDiag_KwNote_Inline_Special" attribute="Text"
               lineEndContext="#pop#pop#pop#pop#pop">
        <StringDetect String=":" attribute="Error" context="#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_DQ_ThenPop"/>
      </context>
      <!--
      @} note
      -->


      <!-- @{ class nodeId1,nodeId2 className; -->
      <context name="StateDiag_KwClass" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="StateDiag_KwClass_Node"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
      </context>
      <context name="StateDiag_KwClass_Node" attribute="Normal" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal" context="Flowchart_KwClass_ClassName"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
        <DetectIdentifier attribute="Node"/>
      </context>
      <!-- @} class -->

      <!--
      @} State Diagram
      -->


      <!--
      @{ Entity Relationship Diagram
      -->

      <context name="erDiag" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String=":::" attribute="Class Name Delimiter" context="erDiag_ClassName"/>
        <StringDetect String=":" attribute="Link Text Separator" context="erDiag_LinkText"/>
        <StringDetect String="[" attribute="Shape" context="erDiag_NameAlias"/>

        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="erDiag_Attr"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="erDiag_QuotedText"/>

        <IncludeRules context="Find_Comment"/>

        <RegExpr String="&er_link;" attribute="Link" insensitive="1"/>
        <RegExpr String="&er_node;" attribute="Node" insensitive="1"/>

        <StringDetect String="one or zero"  attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="zero or one"  attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="one or many"  attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="many(1)"      attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="1+"           attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="zero or more" attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="zero or many" attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="many(0)"      attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="0+"           attribute="Cardinality Text" insensitive="1"/>
        <StringDetect String="only one"     attribute="Cardinality Text" insensitive="1"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7093 -->
        <StringDetect String="one"          attribute="Cardinality Text" insensitive="1"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7093 -->
        <AnyChar String="uU1"               attribute="Cardinality Text"/>

        <StringDetect String="to"            attribute="Relationship Text" insensitive="1"/>
        <StringDetect String="optionally to" attribute="Relationship Text" insensitive="1"/>

        <StringDetect String="style" attribute="Keyword" context="Flowchart_KwStyle"
                      insensitive="1"/>
        <StringDetect String="classDef" attribute="Keyword" context="Flowchart_KwClassDef"
                      insensitive="1"/>
        <StringDetect String="direction" attribute="Keyword" context="Flowchart_KwDirection"
                      insensitive="1"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <!-- because mermaid... -->
        <!-- <StringDetect String="erDiagram" attribute="Error"/> -->

        <DetectIdentifier attribute="Error"/>
      </context>

      <!-- AAA ||..|| BBB : bla bla
                           ~~~~~~~~
      -->
      <context name="erDiag_LinkText" attribute="Link Text"
               fallthroughContext="erDiag_LinkText_Text">
        <DetectSpaces/>
        <IncludeRules context="Find_Comment"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/5093 -->
        <RegExpr String="&er_kw;" lookAhead="1" context="#pop"/>
      </context>
      <context name="erDiag_LinkText_Text" attribute="Link Text" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <StringDetect String="*" attribute="Special Text Char"/>
        <RegExpr String="([^][&lt;&gt;/\\|`~%&amp;:';.{}$()=+?&quot;,@^|#*_\s]+|&md_no_underscore;)+"/>
        <StringDetect String="_" attribute="Special Text Char"/>
      </context>

      <!-- AAA[text] / AAA["text"]
               ~~~~~       ~~~~~~~
      -->
      <context name="erDiag_NameAlias" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="erDiag_NameAlias_UnquotedText">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="erDiag_NameAlias_End!erDiag_QuotedText"/>
        <IncludeRules context="erDiag_LinkText"/>
      </context>
      <!-- AAA[text]
               ~~~~~
      -->
      <context name="erDiag_NameAlias_UnquotedText" attribute="Text" lineEndContext="#pop#pop"
               fallthroughContext="#pop!erDiag_NameAlias_End">
        <StringDetect String="]" attribute="Shape" context="#pop#pop"/>
        <IncludeRules context="erDiag_LinkText_Text"/>
      </context>
      <!-- AAA[ text ]
                    ~~
      -->
      <context name="erDiag_NameAlias_End" attribute="Error" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="]" attribute="Shape" context="#pop#pop"/>
        <IncludeRules context="CharErrorAndPop2"/>
      </context>

      <!-- "text"
            ~~~~~
      -->
      <context name="erDiag_QuotedText" attribute="Quoted Text" lineEndContext="#pop"
               fallthroughContext="erDiag_QuotedText_Special">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <StringDetect String="~" attribute="Special Text Char"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String='([^&flowchart_qtext_syms;~]++|&flowchart_qtext_no_md;)++'
                 attribute="Quoted Text" context="erDiag_QuotedText_Special"/>
      </context>
      <context name="erDiag_QuotedText_Special" attribute="Quoted Text"
               lineEndContext="#pop#pop">
        <StringDetect String="~" attribute="Special Text Char" context="#pop"/>
        <IncludeRules context="Flowchart_UnicodeText_Special"/>
      </context>

      <!-- Ent:::classname,classname
                 ~~~~~~~~~~~~~~~~~~~
      -->
      <context name="erDiag_ClassName" attribute="Class Name" lineEndContext="#pop"
               fallthroughContext="erDiag_ClassName2">
        <DetectSpaces context="erDiag_ClassName2"/>
        <StringDetect String="," attribute="List Separator"/>
      </context>
      <context name="erDiag_ClassName2" attribute="Class Name" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <DetectIdentifier/>
        <AnyChar String="-"/>
        <Int/>
        <StringDetect String="," attribute="List Separator" context="#pop"/>
        <DetectSpaces context="#pop"/>
      </context>

      <!-- @{ Attribute -->
      <!-- Ent { string(ds) productCode PK "Dsds" }
                ~~~~~~~~~~~
      -->
      <context name="erDiag_Attr" attribute="Error">
        <DetectSpaces attribute="Member Type"/>
        <AnyChar String="*-[]()0123456789" attribute="Member Type"
                 context="#pop!erDiag_Attr_Type"/>
        <IncludeRules context="erDiag_Attr_NotIdent"/>
        <DetectIdentifier attribute="Member Type" context="#pop!erDiag_Attr_Type"/>
      </context>
      <context name="erDiag_Attr_NotIdent" attribute="Error">
        <IncludeRules context="erDiag_Attr_IdentEnd"/>
        <IncludeRules context="Find_Comment"/>
        <WordDetect String="PK" attribute="Keyword Parameter" context="erDiag_Attr_Key"
                    additionalDeliminator='-"' insensitive="1"/>
        <WordDetect String="FK" attribute="Keyword Parameter" context="erDiag_Attr_Key"
                    additionalDeliminator='-"' insensitive="1"/>
      </context>
      <context name="erDiag_Attr_IdentEnd" attribute="Error">
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!erDiag_Attr!erDiag_QuotedText"/>
        <StringDetect String=',' attribute="List Separator" context="erDiag_Attr_Key"/>
      </context>
      <!-- Ent { string(ds) productCode PK "Dsds" }
                 ~~~~~~~~~~
      -->
      <context name="erDiag_Attr_Type" attribute="Error"
               lineEndContext="#pop!erDiag_Attr_Name"
               fallthroughContext="#pop!erDiag_Attr_Name">
        <DetectSpaces attribute="Member Type" context="#pop!erDiag_Attr_Name"/>
        <DetectIdentifier attribute="Member Type"/>
        <AnyChar String="*-[]()0123456789" attribute="Member Type"/>
        <IncludeRules context="erDiag_Attr_IdentEnd"/>
      </context>
      <!-- Ent { string(ds) productCode PK "Dsds" }
                           ~~~~~~~~~~~~
      -->
      <context name="erDiag_Attr_Name" attribute="Error">
        <DetectSpaces attribute="Member"/>
        <AnyChar String="*-[]()0123456789" attribute="Member"
                 context="#pop!erDiag_Attr_Name2"/>
        <IncludeRules context="erDiag_Attr_NotIdent"/>
        <DetectIdentifier attribute="Member" context="#pop!erDiag_Attr_Name2"/>
      </context>
      <!-- Ent { string(ds) productCode PK "Dsds" }
                            ~~~~~~~~~~~
      -->
      <context name="erDiag_Attr_Name2" attribute="Error"
               lineEndContext="erDiag_Attr_Key"
               fallthroughContext="erDiag_Attr_Key">
        <DetectSpaces attribute="Member" context="erDiag_Attr_Key"/>
        <DetectIdentifier attribute="Member"/>
        <AnyChar String="*-[]()0123456789" attribute="Member"/>
        <IncludeRules context="erDiag_Attr_IdentEnd"/>
      </context>
      <!-- Ent { string(ds) productCode PK "Dsds" }
                                       ~~~~
      -->
      <context name="erDiag_Attr_Key" attribute="Normal"
               fallthroughContext="#pop#pop!erDiag_Attr">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=',' attribute="List Separator"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop#pop!erDiag_Attr!erDiag_QuotedText"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"
                      context="#pop#pop"/>
        <WordDetect String="PK" attribute="Keyword Parameter" additionalDeliminator='-"'
                    insensitive="1"/>
        <WordDetect String="FK" attribute="Keyword Parameter" additionalDeliminator='-"'
                    insensitive="1"/>
      </context>
      <!-- @} Attribute -->

      <!--
      @} Entity Relationship Diagram
      -->


      <!--
      @{ User Journey Diagram
      -->

      <context name="Journey" attribute="Normal">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String=":" attribute="Symbol Separator" context="Journey_Task_Score"/>
        <StringDetect String=";" attribute="Error"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <StringDetect String="%" attribute="Comment" context="Comment"/>

        <RegExpr String="&journey_task;" attribute="Node" insensitive="1"
                 context="Journey_Task"/>

        <WordDetect String="section" attribute="Keyword" insensitive="1"
                    context="Journey_KwSection!SpacesOrNewLine"/>
        <WordDetect String="title" attribute="Keyword" insensitive="1"
                    context="Journey_KwTitle!SpacesOrNewLine"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <!-- because mermaid... -->
        <StringDetect String="journey" attribute="Error"/>

        <RegExpr String="&mmd_ent;" attribute="Entity" context="Journey_Task"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7105 -->
        <StringDetect String="#" attribute="Error"/>
      </context>

      <!-- task name : score : text
             ~~~~~~~~~~~~~~~~~~~~~~
      task name is partially consumed if there # or ;
      -->
      <context name="Journey_Task" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":" attribute="Symbol Separator"
                      context="#pop!Journey_Task_Score"/>
        <IncludeRules context="Journey_KwSection"/>
      </context>
      <context name="Journey_Task_Score" attribute="Error" lineEndContext="#pop">
        <AnyChar String="-+0123456789." attribute="Number"/>
        <StringDetect String=":" attribute="Symbol Separator" context="Journey_Task_Text"/>
        <DetectSpaces attribute="Normal"/>
      </context>
      <context name="Journey_Task_Text" attribute="ID" lineEndContext="#pop#pop">
        <StringDetect String="," attribute="ID Separator"/>
        <IncludeRules context="Journey_KwSection"/>
      </context>

      <!-- section text
                   ~~~~
      -->
      <context name="Journey_KwSection" attribute="Section Text" lineEndContext="#pop">
        <DetectIdentifier/>
        <DetectSpaces/>
        <Int/>
        <IncludeRules context="Find_Entity"/>
        <!-- # -> https://github.com/mermaid-js/mermaid/issues/7105 -->
        <AnyChar String=";:#" attribute="Error"/>
      </context>

      <!-- title text
                 ~~~~
      -->
      <context name="Journey_KwTitle" attribute="Text" lineEndContext="#pop">
        <StringDetect String=":" attribute="Text"/>
        <IncludeRules context="Journey_KwSection"/>
        <StringDetect String="&lt;" attribute="Special Text Char"/>
      </context>

      <!--
      @} User Journey Diagram
      -->


      <!--
      @{ Gantt Diagram
      -->

      <context name="Gantt" attribute="Normal" fallthroughContext="Gantt_Task">
        <DetectSpaces attribute="Normal"/>

        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <AnyChar String="%" attribute="Comment" context="Comment"/>

        <RegExpr String="&gantt_task;" attribute="Node" insensitive="1"
                 context="Gantt_Task"/>

        <StringDetect String="section" attribute="Keyword" insensitive="1"
                      context="Gantt_KwSection!SpacesOrNewLine"/>
        <StringDetect String="excludes" attribute="Keyword" insensitive="1"
                      context="Gantt_KwExcludes!SpacesOrNewLine"/>
        <StringDetect String="axisFormat" attribute="Keyword" insensitive="1"
                      context="Text_NoSpecial!SpacesOrNewLine"/>
        <StringDetect String="dateFormat" attribute="Keyword" insensitive="1"
                      context="Text_NoSpecial!SpacesOrNewLine"/>
        <StringDetect String="tickInterval" attribute="Keyword" insensitive="1"
                      context="Gantt_KwTickInterval!SpacesOrNewLine"/>
        <StringDetect String="weekday" attribute="Keyword" insensitive="1"
                      context="Gantt_KwWeekday!SpacesOrNewLine"/>
        <StringDetect String="title" attribute="Keyword" insensitive="1"
                      context="Text_Simple!SpacesOrNewLine"/>
        <StringDetect String="weekend" attribute="Keyword" insensitive="1"
                      context="Gantt_KwWeekend!SpacesOrNewLine"/>
        <StringDetect String="todayMarker" attribute="Keyword" insensitive="1"
                      context="Gantt_KwTodayMarker!SpacesOrNewLine"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <!-- because mermaid... -->
        <StringDetect String="gantt" attribute="Error"/>
      </context>

      <!-- my task : metadata, id, date, date
             ~~~~~~~
      task name is partially consumed if there '#'
      -->
      <context name="Gantt_Task" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":" attribute="Symbol Separator" context="Gantt_Task_Metadata"/>
        <DetectSpaces/>
        <DetectIdentifier/>
        <Int/>
        <IncludeRules context="Find_Entity"/>
      </context>
      <!-- my task : metadata, id, date, date
                    ~~~~~~~~~~
      -->
      <context name="Gantt_Task_Metadata" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="Gantt_Task_ID">
        <DetectSpaces/>
        <StringDetect String="," attribute="List Separator" context="Gantt_Task_Date1"/>
        <WordDetect String="active" attribute="Keyword Parameter" context="Gantt_MetaSep"/>
        <WordDetect String="done" attribute="Keyword Parameter" context="Gantt_MetaSep"/>
        <WordDetect String="crit" attribute="Keyword Parameter" context="Gantt_MetaSep"/>
        <WordDetect String="milestone" attribute="Keyword Parameter" context="Gantt_MetaSep"/>
        <WordDetect String="vert" attribute="Keyword Parameter" context="Gantt_MetaSep"/>
      </context>
      <context name="Gantt_MetaSep" attribute="Normal" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop!Gantt_Task_ID">
        <DetectSpaces/>
        <StringDetect String="," attribute="List Separator" context="#pop"/>
      </context>
      <!-- my task : metadata, id, date, date
                              ~~~~
      -->
      <context name="Gantt_Task_ID" attribute="Normal" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop!Gantt_Task_Date1">
        <DetectSpaces/>
        <StringDetect String="," attribute="List Separator" context="#pop!Gantt_Task_Date1"/>
        <RegExpr String="[^,]+(?=,[^,]*,[^,]*)" attribute="ID"/>
      </context>
      <!-- my task : metadata, id, date, date
                                  ~~~~~~
      -->
      <context name="Gantt_Task_Date1" attribute="Normal" lineEndContext="#pop#pop#pop"
               fallthroughContext="Gantt_Task_Date1_Text">
        <DetectSpaces/>
        <WordDetect String="after" attribute="Keyword Parameter" context="Gantt_Task_Date1_Id"
                    insensitive="1"/>
        <WordDetect String="until" attribute="Keyword Parameter" context="Gantt_Task_Date2_Id"
                    insensitive="1"/>
      </context>
      <context name="Gantt_Task_Date1_Text" attribute="Normal"
               lineEndContext="#pop#pop#pop#pop">
        <Int context="Gantt_Task_Date_Suffix"/>
        <StringDetect String="," attribute="List Separator" context="Gantt_Task_Date2"/>
      </context>
      <context name="Gantt_Task_Date1_Id" attribute="ID" lineEndContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="List Separator" context="Gantt_Task_Date2"/>
      </context>
      <context name="Gantt_Task_Date_Suffix" attribute="Normal"
               lineEndContext="#pop#pop#pop#pop#pop" fallthroughContext="#pop">
        <StringDetect String="ms" attribute="Style Unit" context="#pop"/>
        <AnyChar String="smhdwMy" attribute="Style Unit" context="#pop"/>
      </context>
      <!-- my task : metadata, id, date, date
                                       ~~~~~~
      -->
      <context name="Gantt_Task_Date2" attribute="Normal" lineEndContext="#pop#pop#pop#pop#pop"
               fallthroughContext="Gantt_Task_Date2_Text">
        <DetectSpaces/>
        <WordDetect String="until" attribute="Keyword Parameter" insensitive="1"
                    context="#pop#pop!Gantt_Task_Date2_Id"/>
      </context>
      <context name="Gantt_Task_Date2_Text" attribute="Normal"
               lineEndContext="#pop#pop#pop#pop#pop#pop">
        <Int context="Gantt_Task_Date_Suffix"/>
        <StringDetect String="," attribute="Error"
                      context="#pop#pop#pop#pop#pop#pop!LineError"/>
      </context>
      <context name="Gantt_Task_Date2_Id" attribute="ID" lineEndContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="Error" context="#pop#pop#pop#pop!LineError"/>
      </context>

      <!-- section text
                   ~~~~
      -->
      <context name="Gantt_KwSection" attribute="Section Text" lineEndContext="#pop">
        <DetectIdentifier/>
        <DetectSpaces/>
        <Int/>
        <IncludeRules context="Find_Entity"/>
        <IncludeRules context="Find_HTML_br"/>
      </context>

      <!-- excludes date sunday
                    ~~~~~~~~~~~
      -->
      <context name="Gantt_KwExcludes" attribute="Normal" lineEndContext="#pop">
        <Int/>
        <AnyChar String="-:/"/>
        <StringDetect String="," attribute="List Separator" context="Gantt_Task_Date1"/>
        <DetectSpaces/>
        <WordDetect String="weekends"  attribute="Keyword Parameter" insensitive="1"/>
        <IncludeRules context="Gantt_KwWeekday"/>
        <DetectIdentifier/>
      </context>

      <!-- weekend friday
                   ~~~~~~
      -->
      <context name="Gantt_KwWeekend" attribute="Normal" fallthroughContext="#pop">
        <DetectSpaces/>
        <WordDetect String="friday"   attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="saturday" attribute="Keyword Parameter" insensitive="1"/>
        <DetectIdentifier attribute="Error" context="#pop"/>
      </context>

      <!-- weekday monday
                   ~~~~~~
      -->
      <context name="Gantt_KwWeekday" attribute="Normal" lineEndContext="#pop">
        <WordDetect String="monday"    attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="tuesday"   attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="wednesday" attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="thursday"  attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="friday"    attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="saturday"  attribute="Keyword Parameter" insensitive="1"/>
        <WordDetect String="sunday"    attribute="Keyword Parameter" insensitive="1"/>
      </context>

      <!-- title text
                 ~~~~
      -->
      <context name="Gantt_KwTodayMarker" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop!Flowchart_CSSProp">
        <WordDetect String="off" attribute="Keyword Parameter"/>
      </context>

      <!-- tickInterval 1day
                        ~~~~
      -->
      <context name="Gantt_KwTickInterval" attribute="Error" lineEndContext="#pop"
               fallthroughContext="#pop!LineError">
        <DetectSpaces attribute="Normal"/>
        <Int context="Gantt_KwTickInterval_Unit" attribute="Number"/>
      </context>
      <context name="Gantt_KwTickInterval_Unit" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <WordDetect String="millisecond" attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="second"      attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="minute"      attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="hour"        attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="day"         attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="week"        attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
        <WordDetect String="month"       attribute="Style Unit" context="#pop" additionalDeliminator="0123456789"/>
      </context>

      <!--
      @} Gantt Diagram
      -->


      <!--
      @{ Pie chart diagrams
      -->

      <context name="Pie" attribute="Normal" lineEndContext="Pie_Body"
               fallthroughContext="Pie_Body">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="showData" attribute="Keyword Parameter" context="Pie_Body"/>
      </context>

      <context name="Pie_Body" attribute="Normal">
        <DetectSpaces attribute="Normal"/>

        <AnyChar String=":" attribute="Node Separator" context="Pie_Number"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <IncludeRules context="Find_Comment"/>

        <AnyChar String="%.+-" attribute="Error"/>

        <StringDetect String="title" attribute="Keyword" context="Text_Simple!SpacesOrError"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <Int/>
        <DetectIdentifier/>
      </context>

      <context name="Pie_Number" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <RegExpr String="[0-9]+([.][0-9]+)?" attribute="Number" context="#pop!LineError!Spaces"/>
      </context>

      <!--
      @} Pie chart diagrams
      -->


      <!--
      @{ Quadrant Chart
      -->

      <context name="Quadrant" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Quadrant_Point_ClassName"/>
        <StringDetect String=":" attribute="Node Separator" context="Quadrant_Point_XY"/>
        <IncludeRules context="Find_Any_Comment"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Quadrant_Point_Name!Quadrant_Text_Q"/>
        <StringDetect String=";" attribute="Symbol Separator"/>
        <StringDetect String="-->" attribute="Link" context="Quadrant_Text"/>

        <RegExpr String="&quadrant_text;" attribute="Node" insensitive="1"
                 context="Quadrant_Point_Name"/>

        <StringDetect String="classDef" attribute="Keyword" context="Quadrant_KwClassDef"
                      insensitive="1"/>
        <StringDetect String="quadrantChart" attribute="Error" insensitive="1"/>
        <StringDetect String="quadrant-1" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="quadrant-2" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="quadrant-3" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="quadrant-4" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="x-axis" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="y-axis" attribute="Keyword" context="Quadrant_Text"
                      insensitive="1"/>
        <StringDetect String="title" attribute="Keyword" context="Text_Simple" insensitive="1"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>
      </context>

      <context name="Quadrant_Text" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop!Quadrant_Text_U">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!Quadrant_Text_U!Quadrant_Text_Q"/>
      </context>
      <!-- in "..." -->
      <context name="Quadrant_Text_Q" attribute="Quoted Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <StringDetect String="&lt;" attribute="Special Text Char"/>
        <IncludeRules context="Find_Entity"/>
      </context>
      <!-- outside or after "..." -->
      <context name="Quadrant_Text_U" attribute="Text" lineEndContext="#pop">
        <StringDetect String="-->" attribute="Link" context="#pop!Quadrant_Text"/>
        <IncludeRules context="Find_Any_Comment"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop"/>
        <AnyChar String="&quadrant_invalid_char;" attribute="Error"/>
        <RegExpr String="&quadrant_text;" insensitive="1"/>
        <StringDetect String="classDef" attribute="Keyword" insensitive="1"/>
        <StringDetect String="quadrantChart" attribute="Error" insensitive="1"/>
        <StringDetect String="quadrant-1" attribute="Keyword" insensitive="1"/>
        <StringDetect String="quadrant-2" attribute="Keyword" insensitive="1"/>
        <StringDetect String="quadrant-3" attribute="Keyword" insensitive="1"/>
        <StringDetect String="quadrant-4" attribute="Keyword" insensitive="1"/>
        <StringDetect String="x-axis" attribute="Keyword" insensitive="1"/>
        <StringDetect String="y-axis" attribute="Keyword" insensitive="1"/>
        <StringDetect String="title" attribute="Keyword" insensitive="1"/>
      </context>

      <!-- Point A:::class: [0.9, 0.0] radius: 12
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Quadrant_Point_Name" attribute="Node" lineEndContext="#pop">
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="#pop!Quadrant_Point_ClassName"/>
        <StringDetect String=":" attribute="Node Separator" context="#pop!Quadrant_Point_XY"/>
        <IncludeRules context="Quadrant_Text_U"/>
      </context>
      <!-- Point A:::class: [0.9, 0.0] radius: 12
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Quadrant_Point_ClassName" attribute="Error" lineEndContext="#pop">
        <AnyChar String=":[" attribute="Error" context="#pop!Quadrant_Point_XY"/>
        <DetectIdentifier attribute="Class Name" context="Quadrant_Point_AfterClassName"/>
        <StringDetect String=";" attribute="Error" context="#pop"/>
      </context>
      <context name="Quadrant_Point_AfterClassName" attribute="Error" lineEndContext="#pop#pop">
        <StringDetect String=":" attribute="Node Separator"
                      context="#pop#pop!Quadrant_Point_XY"/>
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=";" attribute="Error" context="#pop#pop"/>
        <RegExpr String="." attribute="Error" context="#pop#pop!Quadrant_Point_XY"/>
      </context>

      <!-- Point A:::class: [0.9, 0.0] radius: 12
                           ~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Quadrant_Point_XY" attribute="Normal" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <Float attribute="Number"/>
        <AnyChar String="01" attribute="Number"/>
        <StringDetect String="[" attribute="Shape"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String="]" attribute="Shape" context="Quadrant_CSS"/>
        <StringDetect String=";" attribute="Error" context="#pop"/>
      </context>

      <!-- classDef class1 color: #109060
                   ~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Quadrant_KwClassDef" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <DetectIdentifier attribute="Class Name" context="Quadrant_CSS"/>
      </context>

      <!-- Point A:::class: [0.9, 0.0] radius: 12 / classDef class1 color: #109060
                                      ~~~~~~~~~~~                  ~~~~~~~~~~~~~~~
      -->
      <context name="Quadrant_CSS" attribute="Normal" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="color" attribute="Style Property"/>
        <WordDetect String="radius" attribute="Style Property"/>
        <WordDetect String="stroke-width" attribute="Style Property"/>
        <WordDetect String="stroke-color" attribute="Style Property"/>
        <StringDetect String=":" attribute="Style Property Separator"
                      context="Quadrant_CSSValue"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop"/>
      </context>
      <context name="Quadrant_CSSValue" attribute="Error"
               lineEndContext="#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="List Separator" context="#pop"/>
        <Float attribute="Number" context="Flowchart_CSSUnit"/>
        <Int attribute="Number" context="Flowchart_CSSUnit"/>
        <RegExpr String="#[a-zA-Z0-9]{3}([a-zA-Z0-9]{3})?(?!;)"
                 attribute="Style Hexadeximal Color"/>
        <StringDetect String=";" attribute="Symbol Separator" context="#pop#pop#pop"/>
      </context>

      <!--
      @} Quadrant Chart
      -->


      <!--
      @{ Requirement Diagram
      -->

      <context name="Requirement" attribute="Error" lineEndContext="Requirement_Body">
      </context>

      <context name="Requirement_Body" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="Requirement_Element_Mem!SpacesAsError"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Requirement_ClassName!Requirement_ClassName_Special!Requirement_Consume_PartialNode"/>
        <IncludeRules context="Flowchart_Find_UnicodeText"/>
        <StringDetect String="->" attribute="Link"/>
        <StringDetect String="&lt;-" attribute="Link"
                      context="Requirement_Link_LeftEnd!Requirement_Relationship"/>
        <StringDetect String="-" attribute="Link"
                      context="Requirement_Link_RightEnd!Requirement_Relationship"/>

        <IncludeRules context="Requirement_Find_Comment"/>

        <AnyChar String="*$\#&amp;}&lt;>:%=," attribute="Error"/>
        <StringDetect String="_" attribute="Special Text Char"
                      context="Requirement_Node!Md_bi"/>
        <RegExpr String="&requirement_node;" attribute="Node" insensitive="1"
                 context="Requirement_Node!Requirement_Node_Special"/>

        <StringDetect String="element" attribute="Keyword" insensitive="1"
                      context="Requirement_Node!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="requirement" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="functionalRequirement" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="performanceRequirement" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="interfaceRequirement" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="physicalRequirement" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>
        <StringDetect String="designConstraint" attribute="Keyword" insensitive="1"
                      context="Requirement_KwRequirement!Requirement_Node_Special!Requirement_Consume_PartialNode"/>

        <StringDetect String="classDef" attribute="Keyword" insensitive="1"
                      context="Flowchart_CSSProp!Requirement_ClassList!Requirement_ClassList_Special!Requirement_Consume_PartialRef"/>
        <StringDetect String="style" attribute="Keyword" insensitive="1"
                      context="Flowchart_CSSProp!Requirement_NodeList!Requirement_NodeList_Special!Requirement_Consume_PartialRef"/>
        <StringDetect String="class" attribute="Keyword" insensitive="1"
                      context="Requirement_ClassList!Requirement_ClassList_Special!Requirement_Consume_PartialRef!Requirement_NoCssSep!Requirement_NodeList!Requirement_NodeList_Special!Requirement_Consume_PartialRef"/>

        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <DetectIdentifier attribute="Error"/>
      </context>

      <!-- mermaid bug: comment is not %% -->
      <context name="Requirement_Find_Comment" attribute="Node">
        <StringDetect String="%" attribute="Comment" context="Comment" firstNonSpace="1"/>
      </context>

      <!--
      node:::classname
      node - bla -> node
      node <- bla - node
        ~~
      -->
      <context name="Requirement_Node" attribute="Node" lineEndContext="#pop"
               fallthroughContext="Requirement_Node_Special">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop!Requirement_Element_Mem!SpacesAsError"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Requirement_ClassName!Requirement_ClassName_Special!Requirement_Consume_PartialNode"/>
        <AnyChar String=":=," attribute="Error"/>
        <RegExpr String="&requirement_node_in_node;" attribute="Node" insensitive="1"
                 context="Requirement_Node_Special"/>
      </context>

      <context name="Requirement_Node_Special" attribute="Node" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <AnyChar String="{:" lookAhead="1" context="#pop"/>
        <StringDetect String="->" attribute="Link" context="#pop#pop"/>
        <StringDetect String="&lt;-" attribute="Link"
                      context="#pop#pop!Requirement_Link_LeftEnd!Requirement_Relationship"/>
        <StringDetect String="-" attribute="Link"
                      context="#pop#pop!Requirement_Link_RightEnd!Requirement_Relationship"/>
        <AnyChar String="=,-&lt;>:{" attribute="Error" context="#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
      </context>

      <context name="Requirement_Consume_PartialNode" attribute="Normal"
               lineEndContext="#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Flowchart_Find_UnicodeText_ThenPop2"/>
        <StringDetect String="{" context="#pop#pop" lookAhead="1"/>
        <StringDetect String="_" attribute="Special Text Char" context="#pop#pop!Md_bi"/>
        <AnyChar String="*$\#&amp;}%:=," attribute="Error" context="#pop#pop"/>
        <RegExpr String="&requirement_node;" insensitive="1" context="#pop"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <IncludeRules context="CharErrorAndPop2"/>
      </context>

      <!-- node:::classname
                  ~~~~~~~~~
      -->
      <context name="Requirement_ClassName" attribute="Class Name"
               lineEndContext="#pop" fallthroughContext="Requirement_ClassName_Special">
        <StringDetect String="{" lookAhead="1" context="#pop"/>
        <StringDetect String=":" attribute="Error"/>
        <RegExpr String="&requirement_node_in_node;" attribute="Node" insensitive="1"
                 context="Requirement_ClassName_Special"/>
      </context>
      <context name="Requirement_ClassName_Special" attribute="Class Name"
               lineEndContext="#pop#pop" fallthroughContext="#pop">
        <IncludeRules context="Requirement_Node_Special"/>
      </context>

      <!-- node - type -> node
                 ~~~~~
      -->
      <context name="Requirement_Relationship" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="contains" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="copies" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="derives" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="satisfies" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="verifies" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="refines" attribute="Keyword Parameter" context="#pop"/>
        <WordDetect String="traces" attribute="Keyword Parameter" context="#pop"/>
      </context>

      <!-- node - type -> node
                      ~~~
      -->
      <context name="Requirement_Link_RightEnd" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="->" attribute="Link" context="#pop"/>
        <AnyChar String="&lt;-" attribute="Error" context="#pop"/>
        <DetectIdentifier/>
      </context>

      <!-- node <- type - node
                       ~~
      -->
      <context name="Requirement_Link_LeftEnd" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="->" attribute="Error" context="#pop"/>
        <StringDetect String="-" attribute="Link" context="#pop"/>
        <StringDetect String="&lt;-" attribute="Error" context="#pop"/>
        <DetectIdentifier/>
      </context>

      <!-- element ... { type: blabla
                        ~~~~~~~~~~~~~
      -->
      <context name="Requirement_Element_Mem" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="Requirement_Mem_Text"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"
                      context="#pop"/>
        <IncludeRules context="Requirement_Find_Comment"/>
        <WordDetect String="docref" attribute="Property" insensitive="1"/>
        <WordDetect String="type" attribute="Property" insensitive="1"/>
      </context>
      <!-- element ... { type: blabla
                              ~~~~~~~
      -->
      <context name="Requirement_Mem_Text" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Flowchart_Find_UnicodeText_ThenPop"/>
        <StringDetect String="_" attribute="Special Text Char"
                      context="Requirement_Mem_InText!Md_bi"/>
        <RegExpr String="&requirement_node;" attribute="Text" insensitive="1"
                 context="Requirement_Mem_InText!Requirement_Text_Special"/>
        <DetectIdentifier attribute="Error" context="Requirement_Mem_InText"/>
      </context>
      <context name="Requirement_Mem_InText" attribute="Error"
               lineEndContext="#pop#pop" fallthroughContext="Requirement_Text_Special">
        <AnyChar String="-&lt;>:{=," attribute="Error"/>
        <RegExpr String="&requirement_node_in_node;" attribute="Text" insensitive="1"
                 context="Requirement_Text_Special"/>
      </context>
      <context name="Requirement_Text_Special" attribute="Node" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <AnyChar String="=,-&lt;>:{" attribute="Error" context="#pop"/>
        <IncludeRules context="Find_MdText_Syms_ThenPop"/>
      </context>

      <!-- requirement ... {
                        ~~~
      -->
      <context name="Requirement_KwRequirement" attribute="Node" lineEndContext="#pop"
               fallthroughContext="Requirement_Node_Special">
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"
                      context="#pop!Requirement_Requirement_Mem!SpacesAsError"/>
        <IncludeRules context="Requirement_Node"/>
      </context>

      <!-- requirement ... { type: blabla
                            ~~~~~~~~~~~~~
      -->
      <context name="Requirement_Requirement_Mem" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="Requirement_Mem_Text"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"
                      context="#pop"/>
        <IncludeRules context="Requirement_Find_Comment"/>
        <WordDetect String="id" attribute="Property" insensitive="1"/>
        <WordDetect String="text" attribute="Property" insensitive="1"/>
        <WordDetect String="risk" attribute="Property" insensitive="1"
                    context="Requirement_KwRequirement_Risk!Requirement_Consume_Prop"/>
        <WordDetect String="verifymethod" attribute="Property" insensitive="1"
                    context="Requirement_KwRequirement_VerifyMethod!Requirement_Consume_Prop"/>
      </context>
      <!-- requirement ... { type: blabla
                                 ~
      -->
      <context name="Requirement_Consume_Prop" attribute="Error" fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="#pop"/>
      </context>
      <!-- requirement ... { risk: kw
                                  ~~~
      -->
      <context name="Requirement_KwRequirement_Risk" attribute="Error"
               lineEndContext="#pop" fallthroughContext="#pop!LineError">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="Low" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
        <WordDetect String="Medium" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
        <WordDetect String="High" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
      </context>
      <!-- requirement ... { verifymethod: kw
                                          ~~~
      -->
      <context name="Requirement_KwRequirement_VerifyMethod" attribute="Error"
               lineEndContext="#pop" fallthroughContext="#pop!LineError">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="Analysis" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
        <WordDetect String="Inspection" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
        <WordDetect String="Test" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
        <WordDetect String="Demonstration" attribute="Keyword Parameter" insensitive="1"
                    context="#pop!LineError"/>
      </context>

      <!-- style className,"className" fill:#314
                ~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Requirement_NodeList" attribute="Node" lineEndContext="#pop#pop"
               fallthroughContext="Requirement_NodeList_Special">
        <StringDetect String="," attribute="List Separator"
                      context="Requirement_NodeList_Special!Requirement_Consume_PartialRef"/>
        <IncludeRules context="Requirement_Style_Common"/>
        <RegExpr String="&requirement_node_in_ref;" attribute="Node" insensitive="1"
                 context="Requirement_NodeList_Special"/>
      </context>
      <context name="Requirement_Style_Common" attribute="Node">
        <DetectSpaces attribute="Normal" context="Requirement_NodeListOrPop"/>
        <StringDetect String=":" lookAhead="1" context="#pop"/>
        <AnyChar String="=-&lt;>{" attribute="Error"/>
      </context>

      <context name="Requirement_NodeList_Special" attribute="Node"
               lineEndContext="#pop#pop#pop" fallthroughContext="#pop">
        <AnyChar String=":," lookAhead="1" context="#pop"/>
        <IncludeRules context="Requirement_Text_Special"/>
      </context>

      <context name="Requirement_NodeListOrPop" attribute="Node" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop">
        <StringDetect String="," context="#pop" lookAhead="1"/>
      </context>
      <context name="Requirement_QNodeListOrPop" attribute="Node"
               lineEndContext="#pop#pop#pop#pop#pop"
               fallthroughContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="List Separator" context="#pop"/>
      </context>

      <context name="Requirement_Consume_PartialRef" attribute="Normal"
               lineEndContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Requirement_QNodeListOrPop!Flowchart_UnicodeText"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=":" context="#pop#pop" lookAhead="1"/>
        <StringDetect String="_" attribute="Special Text Char" context="#pop#pop!Md_bi"/>
        <AnyChar String="*$\#&amp;}%={" attribute="Error" context="#pop#pop"/>
        <RegExpr String="&requirement_ref;" insensitive="1" context="#pop"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <IncludeRules context="CharErrorAndPop2"/>
      </context>

      <!-- classDef className,"className" fill:#f9f
                    ~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="Requirement_ClassList" attribute="Class Name" lineEndContext="#pop#pop"
               fallthroughContext="Requirement_ClassList_Special">
        <StringDetect String="," attribute="List Separator"
                      context="Requirement_ClassList_Special!Requirement_Consume_PartialRef"/>
        <IncludeRules context="Requirement_Style_Common"/>
        <RegExpr String="&requirement_node_in_ref;" attribute="Class Name" insensitive="1"
                 context="Requirement_ClassList_Special"/>
      </context>

      <context name="Requirement_ClassList_Special" attribute="Class Name"
               lineEndContext="#pop#pop#pop" fallthroughContext="#pop">
        <AnyChar String=":," lookAhead="1" context="#pop"/>
        <IncludeRules context="Requirement_Text_Special"/>
      </context>

      <!-- class : ...
                 ~
      -->
      <context name="Requirement_NoCssSep" attribute="Error" lineEndContext="#pop#pop#pop#pop"
               fallthroughContext="#pop">
        <StringDetect String=":" attribute="Error"
                      context="Requirement_NodeList!Requirement_NodeList_Special!Requirement_Consume_PartialRef"/>
      </context>

      <!--
      @} Requirement Diagram
      -->


      <!--
      @{ GitGraph Diagram
      -->

      <context name="Git" attribute="Error" lineEndContext="Git_Body"
               fallthroughContext="Git_Body">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator" context="Git_Body"/>
        <WordDetect String="LR" attribute="Keyword Parameter"/>
        <WordDetect String="TB" attribute="Keyword Parameter"/>
        <WordDetect String="BT" attribute="Keyword Parameter"/>
        <IncludeRules context="Find_Any_Comment"/>
      </context>

      <context name="Git_Body" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Any_Comment"/>
        <IncludeRules context="Find_Quote_Simple"/>

        <WordDetect String="commit" attribute="Keyword" context="Git_KwCommit"/>
        <WordDetect String="branch" attribute="Keyword" context="Git_KwBranch"
                    additionalDeliminator="&quot;'"/>
        <WordDetect String="switch" attribute="Keyword" context="Git_KwSwitch"
                    additionalDeliminator="&quot;'"/>
        <WordDetect String="checkout" attribute="Keyword" context="Git_KwSwitch"
                    additionalDeliminator="&quot;'"/>
        <WordDetect String="merge" attribute="Keyword" context="Git_KwMerge"
                    additionalDeliminator="&quot;'"/>
        <WordDetect String="cherry-pick" attribute="Keyword" context="Git_KwCherryPick"/>

        <IncludeRules context="Find_Accessibility"/>
        <DetectIdentifier attribute="Error"/>
      </context>

      <!-- commit id:"ash" tag:"v1.0.0" type: REVERSE -->
      <context name="Git_KwCommit" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <IncludeRules context="Find_Any_Comment"/>
        <WordDetect String="id" attribute="Property"/>
        <WordDetect String="tag" attribute="Property"/>
        <WordDetect String="type" attribute="Property"/>
        <WordDetect String="NORMAL" attribute="Keyword Parameter"/>
        <WordDetect String="REVERSE" attribute="Keyword Parameter"/>
        <WordDetect String="HIGHLIGHT" attribute="Keyword Parameter"/>
        <DetectIdentifier/>
      </context>

      <!-- branch"develop" / branch develop order: 3 -->
      <context name="Git_KwBranch" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Git_KwBranchOrder!DQuote_Simple"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter"
                      context="Git_KwBranchOrder!SQuote_Simple"/>
        <IncludeRules context="Find_Any_Comment"/>
        <IncludeRules context="Git_Kw_Error"/>
        <IncludeRules context="Git_Value_Error"/>
        <DetectIdentifier context="Git_KwBranchOrder!Git_TextIdent" attribute="Text"/>
      </context>
      <context name="Git_KwBranchOrder" attribute="Error" lineEndContext="#pop#pop"
               fallthroughContext="Git_EndLine">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="order" attribute="Property"/>
        <StringDetect String=":" attribute="Property Separator"/>
        <Int attribute="Keyword Parameter"/>
        <DetectIdentifier attribute="Error"/>
      </context>

      <!-- switch"develop" / checkout develop -->
      <context name="Git_KwSwitch" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <IncludeRules context="Find_Any_Comment"/>
        <IncludeRules context="Git_Kw_Error"/>
        <IncludeRules context="Git_Value_Error"/>
        <DetectIdentifier context="Git_EndLine!Git_TextIdent" attribute="Text"/>
      </context>

      <!-- merge develop id: "my_custom_id" tag: "my_custom_tag" type: REVERSE -->
      <context name="Git_KwMerge" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!Git_KwCommit!DQuote_Simple"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter"
                      context="#pop!Git_KwCommit!SQuote_Simple"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <IncludeRules context="Find_Any_Comment"/>
        <WordDetect String="id" attribute="Property" context="#pop!Git_KwCommit"/>
        <WordDetect String="tag" attribute="Property" context="#pop!Git_KwCommit"/>
        <WordDetect String="type" attribute="Property" context="#pop!Git_KwCommit"/>
        <IncludeRules context="Git_Kw_Error"/>
        <WordDetect String="NORMAL" attribute="Keyword Parameter" context="#pop!Git_KwCommit"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="REVERSE" attribute="Keyword Parameter" context="#pop!Git_KwCommit"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="HIGHLIGHT" attribute="Keyword Parameter" context="#pop!Git_KwCommit"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <DetectIdentifier context="#pop!Git_KwCommit!Git_TextIdent" attribute="Text"/>
      </context>

      <!-- cherry-pick id:"MERGE" parent:"B" -->
      <context name="Git_KwCherryPick" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=":" attribute="Property Separator"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <IncludeRules context="Find_Any_Comment"/>
        <WordDetect String="id" attribute="Property"/>
        <WordDetect String="parent" attribute="Property"/>
        <DetectIdentifier/>
      </context>

      <context name="Git_TextIdent" attribute="Error" lineEndContext="#pop#pop">
        <AnyChar String="-" attribute="Text"/>
        <Int attribute="Text"/>
        <DetectIdentifier attribute="Text"/>
        <IncludeRules context="Find_Any_Comment"/>
        <DetectSpaces attribute="Normal" context="#pop"/>
      </context>

      <context name="Git_EndLine" attribute="Error" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Any_Comment"/>
      </context>

      <context name="Git_Kw_Error" attribute="Error">
        <WordDetect String="gitGraph" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="commit" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="branch" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="checkout" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="switch" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="merge" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="cherry-pick" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
      </context>
      <context name="Git_Value_Error" attribute="Error">
        <WordDetect String="NORMAL" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="REVERSE" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
        <WordDetect String="HIGHLIGHT" attribute="Error"
                    additionalDeliminator="@#$`&quot;'" weakDeliminator="-"/>
      </context>

      <!--
      @} GitGraph Diagram
      -->


      <!--
      @{ Mindmap
      -->

      <context name="Mindmap" attribute="Error" fallthroughContext="Mindmap_Node">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
        <StringDetect String=":::" attribute="Class Name Delimiter" context="Mindmap_Class"/>
        <StringDetect String="::icon(" attribute="Annotation Delimiter" context="Mindmap_Icon"/>
        <WordDetect String="mindmap" attribute="Error" insensitive="1"
                    additionalDeliminator="@#$`&quot;'" context="Mindmap_Node"/>
      </context>

      <context name="Mindmap_Node" attribute="Node" lineEndContext="#pop"
               fallthroughContext="Mindmap_Node_Special">
        <DetectSpaces/>
        <RegExpr String="([^&md_syms;{}\[\]()]++|&md_sym_no_md;)++" attribute="Node"
                 context="Mindmap_Node_Special"/>
      </context>
      <context name="Mindmap_Node_Special" attribute="Text" lineEndContext="#pop">
        <StringDetect String="[" attribute="Shape"
                      context="Mindmap_Text[]!Mindmap_End[]!Mindmap_QText"/>
        <StringDetect String="((" attribute="Shape"
                      context="Mindmap_Text(())!Mindmap_End(())!Mindmap_QText"/>
        <StringDetect String="))" attribute="Shape"
                      context="Mindmap_Text))((!Mindmap_End))((!Mindmap_QText"/>
        <StringDetect String="(" attribute="Shape"
                      context="Mindmap_Text()!Mindmap_End()!Mindmap_QText"/>
        <StringDetect String=")" attribute="Shape"
                      context="Mindmap_Text)(!Mindmap_End)(!Mindmap_QText"/>
        <StringDetect String="{{" attribute="Shape"
                      context="Mindmap_Text{{}}!Mindmap_End{{}}!Mindmap_QText"/>
        <AnyChar String="(){}[]" attribute="Error"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <context name="Mindmap_QText" attribute="Text" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <IncludeRules context="Flowchart_QText"/>
      </context>

      <context name="Mindmap_Text_Common" attribute="Text">
        <AnyChar String="()}]" attribute="Error"/>
        <IncludeRules context="Find_Comment_InText"/>
        <RegExpr String="([^&md_syms;}\]()]++|&md_sym_no_md;)++" attribute="Text"
                 context="Mindmap_Text_Common_Special"/>
      </context>
      <context name="Mindmap_Text_Common_Special" attribute="Text">
        <AnyChar String="()}]" lookAhead="1" context="#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <context name="Mindmap_TextEnd_Common" attribute="Text">
        <DetectSpaces attribute="Error" context="Mindmap_TextEnd_SymOrReset"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <Int attribute="Error" context="#pop#pop"/>
        <AnyChar String="(){}[]" context="#pop#pop" lookAhead="1"/>
      </context>
      <context name="Mindmap_TextEnd_SymOrReset" attribute="Text"
               lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <AnyChar String="()}]" context="#pop" lookAhead="1"/>
      </context>


      <!-- id[I am a square]
              ~~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text[]" attribute="Text">
        <StringDetect String="]" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id["I am a square"]
                             ~ -->
      <context name="Mindmap_End[]" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String="]" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>

      <!-- id(I am a rounded square)
              ~~~~~~~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text()" attribute="Text">
        <StringDetect String=")" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id(I am a rounded square)
              ~~~~~~~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_End()" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String=")" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>

      <!-- id((I am a circle))
              ~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text(())" attribute="Text">
        <StringDetect String="))" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id((I am a circle))
              ~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_End(())" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String="))" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>

      <!-- id)I am a cloud(
              ~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text)(" attribute="Text">
        <StringDetect String="(" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id)I am a cloud(
              ~~~~~~~~~~~~~ -->
      <context name="Mindmap_End)(" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String="(" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>

      <!-- id))I am a bang((
              ~~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text))((" attribute="Text">
        <StringDetect String="((" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id))I am a bang((
              ~~~~~~~~~~~~~~ -->
      <context name="Mindmap_End))((" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String="((" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>

      <!-- id{{I am a hexagon}}
              ~~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_Text{{}}" attribute="Text">
        <StringDetect String="}}" attribute="Shape" context="Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_Text_Common"/>
      </context>
      <!-- id{{I am a hexagon}}
              ~~~~~~~~~~~~~~~~~ -->
      <context name="Mindmap_End{{}}" attribute="Text" fallthroughContext="#pop#pop#pop#pop">
        <StringDetect String="}}" attribute="Shape" context="#pop!Mindmap_AfterNode"/>
        <IncludeRules context="Mindmap_TextEnd_Common"/>
      </context>


      <!-- id[I am a square]
                            ~~~ -->
      <context name="Mindmap_AfterNode" attribute="Error" lineEndContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <Int attribute="Error" context="#pop#pop"/>
        <AnyChar String="(){}[]" context="#pop#pop" lookAhead="1"/>
      </context>

      <!-- :::class1 class2 -->
      <context name="Mindmap_Class" attribute="Class Name" lineEndContext="#pop">
      </context>

      <!-- :::class1 class2 -->
      <context name="Mindmap_Icon" attribute="Annotation">
        <StringDetect String=")" attribute="Annotation Delimiter" context="#pop"/>
      </context>

      <!--
      @} Mindmap
      -->


      <!--
      @{ Timeline Diagram
      -->

      <context name="Timeline" attribute="Normal" fallthroughContext="Timeline_Period">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String=": " attribute="Node Separator" context="Timeline_Event"/>
        <StringDetect String=":" attribute="Error"/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7090 -->
        <StringDetect String="%" attribute="Comment" context="Comment" firstNonSpace="1"/>

        <WordDetect String="title" attribute="Keyword" context="Text_NoSpecial"
                    insensitive="1" weakDeliminator="!%&amp;()*+,-./:;&lt;=>?[\]^{|}~"/>
        <StringDetect String="section :" context="Timeline_Period" lookAhead="1"
                      insensitive="1" />
        <WordDetect String="section" attribute="Keyword" context="Timeline_KwSection"
                    weakDeliminator="!%&amp;()*+,-./:;&lt;=>?[\]^{|}~" insensitive="1"/>
      </context>

      <!-- {time period} : {event} : {event} -->
      <context name="Timeline_Period" attribute="Node" lineEndContext="#pop">
        <StringDetect String=": " attribute="Node Separator" context="#pop!Timeline_Event"/>
        <StringDetect String=":" attribute="Error"/>
        <IncludeRules context="Find_HTML_simple_br"/>
        <IncludeRules context="Find_Entity"/>
      </context>

      <context name="Timeline_Event" attribute="Text" lineEndContext="#pop">
        <IncludeRules context="Timeline_Period"/>
      </context>

      <context name="Timeline_KwSection" attribute="Section Text" lineEndContext="#pop">
        <IncludeRules context="Timeline_Period"/>
      </context>

      <!--
      @} Timeline Diagram
      -->


      <!--
      @{ ZenUML
      -->

      <!-- help !!! https://github.com/mermaid-js/mermaid/issues/7154 -->
      <context name="ZenUML" attribute="Normal" fallthroughContext="Timeline_Period">
        <DetectSpaces attribute="Normal"/>

        <StringDetect String=":" attribute="Node Separator" context="ZenUML_LinkText"/>
        <StringDetect String="." attribute="Link" context="ZenUML_Method"/>
        <StringDetect String="(" attribute="Link" context="ZenUML_Message"/>
        <StringDetect String="->" attribute="Link"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter" beginRegion="block"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter" endRegion="block"/>
        <StringDetect String="//" attribute="Diagram Comment" context="ZenUML_Comment"/>
        <StringDetect String="@" attribute="Annotation" context="ZenUML_Actor"/>

        <RegExpr String="&zenuml_node;" attribute="Node"/>
        <StringDetect String="return" attribute="Keyword" context="Text_Simple"/>
        <StringDetect String="if" attribute="Keyword"/>
        <StringDetect String="else" attribute="Keyword"/>
        <StringDetect String="while" attribute="Keyword"/>
        <StringDetect String="opt" attribute="Keyword"/>
        <StringDetect String="par" attribute="Keyword"/>
        <StringDetect String="new" attribute="Keyword"/>
        <StringDetect String="try" attribute="Keyword"/>
        <StringDetect String="catch" attribute="Keyword"/>
        <StringDetect String="finally" attribute="Keyword"/>
        <StringDetect String="as" attribute="Keyword Parameter"/>
        <StringDetect String="title" attribute="Keyword" context="Text_Simple"/>
      </context>

      <context name="ZenUML_Actor" attribute="Normal" fallthroughContext="#pop">
        <DetectIdentifier attribute="Annotation" context="#pop"/>
        <Int attribute="Annotation"/>
      </context>

      <context name="ZenUML_LinkText" attribute="Link Text" lineEndContext="#pop">
      </context>

      <context name="ZenUML_Method" attribute="Link Text" lineEndContext="#pop">
        <AnyChar String="{}" context="#pop" lookAhead="1"/>
      </context>

      <context name="ZenUML_Message" attribute="Link Text" lineEndContext="#pop">
        <StringDetect String=")" attribute="Link" context="#pop"/>
        <AnyChar String="(){}" context="#pop" lookAhead="1"/>
      </context>

      <context name="ZenUML_Comment" attribute="Diagram Comment" lineEndContext="#pop"
               fallthroughContext="ZenUML_Comment_Special">
        <RegExpr String="&md_strict_text;" attribute="Diagram Comment"
                 context="ZenUML_Comment_Special"/>
      </context>
      <context name="ZenUML_Comment_Special" attribute="Diagram Comment"
               lineEndContext="#pop#pop">
        <IncludeRules context="Find_MdText_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_DQ_SingleLine_ThenPop"/>
      </context>

      <!--
      @} ZenUML
      -->


      <!--
      @{ Sankey diagram
      -->

      <context name="Sankey" attribute="Error" lineEndContext="Sankey_Body">
      </context>

      <context name="Sankey_Body" attribute="Normal" fallthroughContext="Sankey_Node1">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
      </context>

      <!-- Pumped ds heat,"Heating and cooling, ""commercial""",70.672 -->
      <context name="Sankey_Node1" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="Sankey_Node2!Sankey_Node">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Sankey_Node2!Sankey_QNode" column="0"/>
      </context>
      <context name="Sankey_Node2" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="Sankey_Value!Sankey_Node">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Sankey_Value!Sankey_QNode"/>
      </context>
      <context name="Sankey_Value" attribute="Error" lineEndContext="#pop#pop#pop">
        <AnyChar String="0123456789." attribute="Number"/>
        <DetectSpaces attribute="Normal"/>
      </context>

      <context name="Sankey_Node" attribute="Node" lineEndContext="#pop">
        <StringDetect String=',' attribute="List Separator" context="#pop"/>
        <StringDetect String='"' attribute="Error"/>
      </context>

      <context name="Sankey_QNode" attribute="Quoted Text">
        <StringDetect String='""' attribute="Special Text Char"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="Sankey_QNode_End"/>
      </context>

      <context name="Sankey_QNode_End" attribute="Error" lineEndContext="#pop#pop#pop">
        <StringDetect String=',' attribute="List Separator" context="#pop#pop"/>
      </context>

      <!--
      @} Sankey diagram
      -->


      <!--
      @{ XY Chart
      -->

      <context name="XYChart" attribute="Error" lineEndContext="XYChart_Body"
               fallthroughContext="XYChart_Body">
        <DetectSpaces attribute="Normal"/>
        <WordDetect String="vertical" attribute="Keyword Parameter" context="XYChart_Body"
                    insensitive="1"/>
        <WordDetect String="horizontal" attribute="Keyword Parameter" context="XYChart_Body"
                    insensitive="1"/>
      </context>

      <context name="XYChart_Body" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
        <StringDetect String="[" attribute="Normal"
                      context="XYChart_XAxis!XYChart_XAxis_Legend!XYChart_XAxis_Legend_Label!XYChart_Text!Spaces"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="DQuote_NoSpecial"/>
        <StringDetect String="title" attribute="Keyword" insensitive="1"
                      context="XYChart_Text!XYChart_QText!XYChart_IdentError3"/>
        <StringDetect String="x-axis" attribute="Keyword" insensitive="1"
                      context="XYChart_XAxis!XYChart_IdentError2"/>
        <StringDetect String="y-axis" attribute="Keyword" insensitive="1"
                      context="XYChart_YAxis!XYChart_IdentError2"/>
        <StringDetect String="bar" attribute="Keyword" insensitive="1"
                      context="XYChart_Bar!XYChart_IdentError2"/>
        <StringDetect String="line" attribute="Keyword" insensitive="1"
                      context="XYChart_Bar!XYChart_IdentError2"/>
        <IncludeRules context="Find_Accessibility_Insensitive"/>

        <DetectIdentifier/>
        <Int/>
      </context>

      <!-- keywordXXX
                  ~~~ #pop * 2 -->
      <context name="XYChart_IdentError2" attribute="Text" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Normal" context="#pop"/>
        <DetectIdentifier attribute="Error" context="#pop#pop"/>
        <Int attribute="Error"/>
      </context>

      <!-- keywordXXX
                  ~~~ #pop * 3 -->
      <context name="XYChart_IdentError3" attribute="Text" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Normal" context="#pop"/>
        <DetectIdentifier attribute="Error" context="#pop#pop#pop"/>
        <Int attribute="Error"/>
      </context>

      <!-- y-axis title min - -> max -->
      <context name="XYChart_YAxis" attribute="Text" lineEndContext="#pop"
               fallthroughContext="XYChart_YAxis_MinMax!XYChart_Axis_Title">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="XYChart_YAxis_MinMax!DQuote_NoSpecial"/>
      </context>

      <context name="XYChart_YAxis_MinMax" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <Int attribute="Number"/>
        <StringDetect String="-->" attribute="Link"/>
        <AnyChar String="-." attribute="Number"/>
      </context>

      <!--
      x-axis title min - -> max
      x-axis "title with space" [cat1, "cat2 with space", cat3]
      -->
      <context name="XYChart_XAxis" attribute="Text" lineEndContext="#pop"
               fallthroughContext="XYChart_XAxis_Legend!XYChart_Axis_Title">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="XYChart_XAxis_Legend!DQuote_NoSpecial"/>
      </context>

      <context name="XYChart_XAxis_Legend" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop!XYChart_YAxis_MinMax">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="[" attribute="Normal"
                      context="XYChart_XAxis_Legend_Label!XYChart_Text!XYChart_QText!Spaces"/>
      </context>

      <!-- x-axis "title with space" [cat1, "cat2 with space", cat3]
                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      -->
      <context name="XYChart_XAxis_Legend_Label" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="List Separator"
                      context="XYChart_Text!XYChart_QText!Spaces"/>
        <StringDetect String="]" attribute="Normal" context="#pop#pop#pop"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="DQuote_NoSpecial"/>
        <DetectIdentifier attribute="Error" context="XYChart_Text!XYChart_QText!Spaces"/>
        <RegExpr String="." attribute="Error" context="XYChart_Text!XYChart_QText!Spaces"/>
      </context>

      <!-- bar [2.3, 45, .98, -3.4]
              ~~ -->
      <context name="XYChart_Bar" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String="[" attribute="Normal"
                      context="XYChart_Bar_Values"/>
      </context>

      <!-- bar [2.3, 45, .98, -3.4]
                ~~~~~~~~~~~~~~~~~~~ -->
      <context name="XYChart_Bar_Values" attribute="Normal">
        <DetectSpaces attribute="Normal"/>
        <Int attribute="Number"/>
        <AnyChar String="-." attribute="Number"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String="]" attribute="Normal" context="#pop#pop"/>
      </context>

      <!-- y-axis title
                 ~~~~~~ -->
      <context name="XYChart_Axis_Title" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <RegExpr String="&xy_title;" attribute="Text" context="#pop" insensitive="1"/>
      </context>

      <!-- title text  /  x-axis title [cat1, "cat2 with space", cat3]
                 ~~~~                  ~~~~                     ~~~~ -->
      <context name="XYChart_Text" attribute="Text" lineEndContext="#pop">
        <RegExpr String="&xy_text;" attribute="Text" context="#pop" insensitive="1"/>
      </context>

      <!-- title "text"  /  x-axis title [cat1, "cat2 with space", cat3]
                 ~~~~~~                         ~~~~~~~~~~~~~~~~~ -->
      <context name="XYChart_QText" attribute="Text" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop#pop!DQuote_NoSpecial"/>
      </context>

      <!--
      @} XY Chart
      -->


      <!--
      @{ Block Diagram
      -->

      <context name="Block" attribute="Error" fallthroughContext="Block_Node!Block_Node_Spe">
        <DetectSpaces attribute="Normal"/>

        <AnyChar String='([&lt;>{-:' lookAhead="1" context="Block_Node!Block_Node_Spe"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="Block_QString"/>
        <AnyChar String="})" attribute="Error"/>

        <IncludeRules context="Find_Comment"/>

        <RegExpr String="&block_node;++" attribute="Node" context="Block_Node!Block_Node_Spe"/>

        <StringDetect String="space" attribute="Keyword"/>
        <StringDetect String="columns" attribute="Keyword" context="Block_KwColumns"/>
        <StringDetect String="block" attribute="Keyword" beginRegion="block"/>
        <StringDetect String="end" attribute="Keyword" endRegion="block"/>
        <StringDetect String="style" attribute="Keyword" context="Flowchart_KwStyle"/>
        <StringDetect String="classDef" attribute="Keyword" context="Flowchart_KwClassDef"/>
        <StringDetect String="class" attribute="Keyword" context="Flowchart_KwClass"/>

        <!-- no Find_Accessibility -->
      </context>


      <context name="Block_Node" attribute="Error" lineEndContext="#pop"
               fallthroughContext="Block_Node_Spe">
        <RegExpr String="&block_in_node;++&block_node;*+" attribute="Node"
                 context="Block_Node_Spe"/>
      </context>

      <!-- columns 2 -->
      <context name="Block_QString" attribute="Quoted Text"
               fallthroughContext="Block_QString_Special">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Find_Any_Comment"/>
        <RegExpr String='([^&lt;&amp;#"]++|&prefix_ent_no_ent;|&prefix_html_tag_no_tag;)++'
                 attribute="Quoted Text" context='Block_QString_Special'/>
      </context>
      <context name="Block_QString_Special" attribute="Quoted Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop#pop"/>
        <IncludeRules context="Find_Entities"/>
        <IncludeRules context="Find_Md_Html_DQ_SingleLine_ThenPop"/>
      </context>

      <context name="Block_Node_Spe" attribute="Error" lineEndContext="#pop#pop">
        <DetectSpaces attribute="Normal" context="#pop#pop"/>

        <StringDetect String="---" attribute="Link" context="#pop#pop"/>
        <StringDetect String="-->" attribute="Link" context="#pop#pop"/>
        <StringDetect String="--" attribute="Link" context="#pop#pop"/>

        <StringDetect String="([" attribute="Shape" context="Block_Shape([])!Block_InShape"/>
        <StringDetect String="(((" attribute="Shape" context="Block_Shape((()))!Block_InShape"/>
        <StringDetect String="((" attribute="Shape" context="Block_Shape(())!Block_InShape"/>
        <StringDetect String="(" attribute="Shape" context="Block_Shape()!Block_InShape"/>
        <StringDetect String="[[" attribute="Shape" context="Block_Shape[[]]!Block_InShape"/>
        <StringDetect String="[(" attribute="Shape" context="Block_Shape[()]!Block_InShape"/>
        <StringDetect String="[/" attribute="Shape" context="Block_Shape[//]!Block_InShape"/>
        <StringDetect String="[\" attribute="Shape" context="Block_Shape[//]!Block_InShape"/>
        <AnyChar String="[>" attribute="Shape" context="Block_Shape[]!Block_InShape"/>
        <StringDetect String="{{" attribute="Shape" context="Block_Shape{{}}!Block_InShape"/>
        <StringDetect String="{" attribute="Shape" context="Block_Shape{}!Block_InShape"/>
        <StringDetect String="&lt;[" attribute="Shape"
                      context="Block_Shape&lt;[]>!Block_InShape"/>

        <StringDetect String=":" attribute="Keyword Property Separator"
                      context="#pop#pop!Block_Size"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop#pop!Block_QString"/>
        <AnyChar String="-&lt;)}" attribute="Error" context="#pop#pop"/>
        <IncludeRules context="Find_Entities_ThenPop"/>
        <IncludeRules context="CharErrorAndPop2"/>
      </context>


      <!-- id(["..."])
               ~ -->
      <context name="Block_InShape" attribute="Error" fallthroughContext="#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!Block_QString"/>
        <DetectSpaces attribute="Error"/>
      </context>

      <context name="Block_Shape_Common" attribute="Error">
        <DetectSpaces attribute="Error"/>
        <AnyChar String="}])" attribute="Error" context="#pop#pop#pop"/>
      </context>

      <!-- id(["..."])
                    ~~ -->
      <context name="Block_Shape([])" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="])" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id((("...")))
                     ~~~ -->
      <context name="Block_Shape((()))" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String=")))" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id(("..."))
                    ~~ -->
      <context name="Block_Shape(())" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="))" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id("...")
                   ~ -->
      <context name="Block_Shape()" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String=")" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id[["..."]]
                    ~~ -->
      <context name="Block_Shape[[]]" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="]]" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id[("...")]
                    ~~ -->
      <context name="Block_Shape[()]" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String=")]" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id([/"..."/]
                     ~~ -->
      <context name="Block_Shape[//]" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="/]" attribute="Shape" context="#pop#pop#pop"/>
        <StringDetect String="\]" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id["..."]
                   ~ -->
      <context name="Block_Shape[]" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="]" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id{{"..."}}
                    ~~ -->
      <context name="Block_Shape{{}}" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="}}" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id{"..."}
                    ~~ -->
      <context name="Block_Shape{}" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="}" attribute="Shape" context="#pop#pop#pop"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>

      <!-- id<["..."]>(x,down)
                    ~~ -->
      <context name="Block_Shape&lt;[]>" attribute="Error" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop#pop">
        <StringDetect String="]>" attribute="Shape" context="Block_ArrowDir"/>
        <IncludeRules context="Block_Shape_Common"/>
      </context>
      <!-- id<["..."]>(x,down)
                      ~ -->
      <context name="Block_ArrowDir" attribute="Error" fallthroughContext="#pop#pop#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="(" attribute="Shape" context="Block_ArrowDir_Kw"/>
      </context>
      <!-- id<["..."]>(x,down)
                       ~ -->
      <context name="Block_ArrowDir_Kw" attribute="Error" lineEndContext="#pop#pop#pop#pop#pop"
               fallthroughContext="#pop#pop#pop#pop#pop">
        <StringDetect String=")" attribute="Shape" context="#pop#pop#pop#pop#pop"/>
        <StringDetect String="," attribute="List Separator" context="Spaces"/>
        <AnyChar String="xy" attribute="Text"/>
        <StringDetect String="left" attribute="Text"/>
        <StringDetect String="right" attribute="Text"/>
        <StringDetect String="down" attribute="Text"/>
        <StringDetect String="up" attribute="Text"/>
        <DetectIdentifier attribute="Error"/>
        <DetectSpaces attribute="Error"/>
      </context>


      <!-- columns 2 -->
      <context name="Block_KwColumns" attribute="Error" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <Int attribute="Number" context="#pop"/>
      </context>

      <!-- block:group1:2 ... end
                        ~ -->
      <context name="Block_Size" attribute="Error" lineEndContext="#pop"
               fallthroughContext="#pop">
        <Int attribute="Number" context="#pop"/>
      </context>

      <!--
      @} Block Diagram
      -->


      <!--
      @{ Packet Diagram
      -->

      <!-- 16-31: "Destination Port"  /  +31: "Destination Port" -->
      <context name="Packet" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <AnyChar String='+-' attribute="Normal"/>
        <Int attribute="Node"/>
        <StringDetect String=":" attribute="Node Separator"/>
        <IncludeRules context="Find_Quote_Simple"/>

        <IncludeRules context="Find_Any_Comment"/>

        <WordDetect String="title" attribute="Keyword" context="Packet_KwTitle"/>
        <IncludeRules context="Find_Accessibility"/>
      </context>

      <!-- title bla bla -->
      <context name="Packet_KwTitle" attribute="Text" lineEndContext="#pop">
        <DetectSpaces attribute="Text" context="Packet_KwTitle_Text"/>
        <IncludeRules context="Find_Any_Comment"/>
        <RegExpr String="." attribute="Error" context="Packet_KwTitle_Text"/>
      </context>
      <context name="Packet_KwTitle_Text" attribute="Text" lineEndContext="#pop#pop">
        <DetectSpaces/>
        <DetectIdentifier/>
        <Int/>
        <AnyChar String="&lt;&gt;&amp;" attribute="Special Text Char"/>
        <IncludeRules context="Find_Any_Comment"/>
        <IncludeRules context="Find_Entity"/>
      </context>

      <!--
      @} Packet Diagram
      -->


      <!--
      @{ Kanban Diagram
      -->

      <context name="Kanban" attribute="Error" fallthroughContext="Kanban_Node!Kanban_Node_Spe">
        <DetectSpaces attribute="Normal"/>
        <AnyChar String="[(" attribute="Shape" context="Kanban_Box"/>
        <StringDetect String="@{" attribute="Annotation Delimiter" context="Kanban_Annotation"/>
        <StringDetect String="{" attribute="Error" context="Kanban_Annotation"/>
        <AnyChar String=")]}@" attribute="Error"/>
        <IncludeRules context="Find_Comment"/>
        <IncludeRules context="EmptyQuotedText"/>
        <IncludeRules context="Flowchart_Find_MdText"/>
        <IncludeRules context="Flowchart_Find_UnicodeText"/>
        <RegExpr String="(?!kanban\b)&kanban_node;" attribute="Node"
                 context="Kanban_Node!Kanban_Node_Spe"/>
        <!-- no Find_Accessibility -->
      </context>

      <context name="Kanban_Node" attribute="Node" lineEndContext="#pop">
        <AnyChar String="[(" attribute="Shape" context="#pop!Kanban_Box"/>
        <AnyChar String="[({})]@" lookAhead="1" context="#pop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
        <RegExpr String="&kanban_node;" attribute="Node" context="Kanban_Node_Spe"/>
      </context>

      <context name="Kanban_Node_Spe" attribute="Text" lineEndContext="#pop#pop">
        <AnyChar String="[(" attribute="Shape" context="#pop#pop!Kanban_Box"/>
        <AnyChar String="[({})]@" lookAhead="1" context="#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <!-- id["..."] / id[...]
              ~~~~~       ~~~ -->
      <context name="Kanban_Box" attribute="Text" fallthroughContext="Kanban_Box_Text">
        <StringDetect String='"' lookAhead="1" context="Kanban_Box_End!Flowchart_QText"/>
      </context>
      <!-- id[...]
              ~~~ -->
      <context name="Kanban_Box_Text" attribute="Text" fallthroughContext="Kanban_Text_Spe">
        <AnyChar String=")]" attribute="Shape" context="#pop#pop"/>
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Comment"/>
        <RegExpr String="&kanban_qtext;" context="Kanban_Text_Spe"/>
      </context>
      <context name="Kanban_Text_Spe" attribute="Text" lineEndContext="#pop">
        <AnyChar String=")]" attribute="Shape" context="#pop#pop#pop"/>
        <AnyChar String="}@" attribute="Error" context="#pop#pop#pop"/>
        <AnyChar String="([" attribute="Error" context="#pop#pop"/>
        <IncludeRules context="Find_Md_Syms_ThenPop"/>
        <IncludeRules context="Find_Md_Html_Text_ThenPop"/>
      </context>

      <context name="Kanban_Box_End" attribute="Text" lineEndContext="#pop">
        <AnyChar String=")]" attribute="Shape" context="#pop#pop"/>
        <DetectSpaces attribute="Error"/>
        <AnyChar String="[({})]@&md_syms;" lookAhead="1" context="#pop#pop"/>
        <IncludeRules context="CharErrorAndPop2"/>
      </context>

      <!-- id[...]@{...}
                    ~~~~ -->
      <context name="Kanban_Annotation" attribute="Error" lineEndContext="#pop">
        <StringDetect String="}" attribute="Annotation Delimiter" context="#pop"/>
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="," attribute="List Separator"/>
        <StringDetect String=": " attribute="Property Separator"
                      context="Kanban_Annotation_Value"/>
        <IncludeRules context="Find_SQuote_NoSpecial"/>
        <IncludeRules context="Find_DQuote_NoSpecial"/>
        <WordDetect String="assigned" attribute="Keyword"/>
        <WordDetect String="ticket" attribute="Keyword"/>
        <WordDetect String="priority" attribute="Keyword" context="Kanban_Annotation_Priority"/>
      </context>
      <context name="Kanban_Annotation_Value" attribute="Text" lineEndContext="#pop#pop"
               fallthroughContext="Kanban_Annotation_Text">
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter"
                      context="#pop!SQuote_NoSpecial"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="#pop!DQuote_NoSpecial"/>
      </context>
      <context name="Kanban_Annotation_Text" attribute="Text" lineEndContext="#pop#pop#pop">
        <AnyChar String=',"[]{}' lookAhead="1" context="#pop#pop"/>
        <StringDetect String=": " attribute="Property Separator" context="#pop"/>
      </context>

      <!-- @{priority: ...}
                     ~~~~~ -->
      <context name="Kanban_Annotation_Priority" attribute="Error" lineEndContext="#pop#pop"
               fallthroughContext="#pop">
        <StringDetect String=": " attribute="Property Separator"
                      context="Kanban_Annotation_Priority_Value"/>
        <DetectSpaces attribute="Normal"/>
      </context>
      <context name="Kanban_Annotation_Priority_Value" attribute="Error"
               lineEndContext="#pop#pop#pop" fallthroughContext="#pop#pop">
        <DetectSpaces attribute="Normal"/>
        <AnyChar String=',[]{}' lookAhead="1" context="#pop#pop"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter"
                      context="Kanban_Annotation_Priority_SQValue"/>
        <StringDetect String='"' attribute="Quoted Text Delimiter"
                      context="Kanban_Annotation_Priority_DQValue"/>
        <IncludeRules context="Kanban_Annotation_Priority_KwValue"/>
      </context>
      <context name="Kanban_Annotation_Priority_SQValue" attribute="Error"
               lineEndContext="#pop#pop#pop#pop">
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="#pop#pop#pop"/>
        <IncludeRules context="Kanban_Annotation_Priority_KwValue"/>
      </context>
      <context name="Kanban_Annotation_Priority_DQValue" attribute="Error"
               lineEndContext="#pop#pop#pop#pop">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop#pop#pop"/>
        <IncludeRules context="Kanban_Annotation_Priority_KwValue"/>
      </context>
      <context name="Kanban_Annotation_Priority_KwValue" attribute="Error">
        <StringDetect String="Very High" attribute="Keyword Parameter"/>
        <StringDetect String="High" attribute="Keyword Parameter"/>
        <StringDetect String="Very Low" attribute="Keyword Parameter"/>
        <StringDetect String="Low" attribute="Keyword Parameter"/>
        <DetectIdentifier attribute="Error"/>
      </context>

      <!--
      @} Kanban Diagram
      -->


      <!--
      @{ Architecture Diagram
      -->

      <context name="Archi" attribute="Error" fallthroughContext="Kanban_Node!Kanban_Node_Spe">
        <DetectSpaces attribute="Normal"/>
        <IncludeRules context="Find_Any_Comment"/>

        <StringDetect String=":" attribute="Symbol Separator" context="Archi_EdgeDir"/>

        <StringDetect String="(" attribute="Shape" context="Archi_Icon"/>
        <StringDetect String="[" attribute="Quoted Text Delimiter" context="Archi_Text"/>
        <StringDetect String="{" attribute="Annotation Delimiter" context="Archi_Group"/>

        <StringDetect String="--" attribute="Link" context="Archi_Edge"/>
        <StringDetect String="&lt;--" attribute="Link" context="Archi_Edge"/>

        <WordDetect String="group" attribute="Keyword"/>
        <WordDetect String="in" attribute="Keyword"/>
        <WordDetect String="service" attribute="Keyword"/>
        <WordDetect String="junction" attribute="Keyword"/>

        <IncludeRules context="Find_Accessibility"/>

        <!-- https://github.com/mermaid-js/mermaid/issues/7022 -->
        <AnyChar String="LRTB" attribute="Error" context="Archi_Node"/>
        <AnyChar String="&archi_id_ch;" attribute="Node" context="Archi_Node"/>
      </context>

      <context name="Archi_Node" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <AnyChar String="&archi_id_ch;"/>
      </context>

      <!-- id1:L - - R:id2
               ~ -->
      <context name="Archi_EdgeDir" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Normal"/>
        <AnyChar String="LRTB" attribute="Keyword Parameter" context="#pop"/>
      </context>

      <!-- id1:L - - R:id2
                 ~~~~~~ -->
      <context name="Archi_Edge" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <AnyChar String="LRTB" attribute="Keyword Parameter"/>
        <StringDetect String=":" attribute="Symbol Separator" context="#pop"/>
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="&gt;" attribute="Link"/>
      </context>

      <!-- service db(database)[Database] in api
                      ~~~~~~~~~ -->
      <context name="Archi_Icon" attribute="Style Value" lineEndContext="#pop"
               fallthroughContext="#pop">
        <AnyChar String="&archi_id_ch;"/>
        <StringDetect String=")" attribute="Shape" context="#pop"/>
      </context>

      <!-- service db(database)[Database] in api
                                ~~~~~~~~~ -->
      <context name="Archi_Text" attribute="Text" lineEndContext="#pop"
               fallthroughContext="#pop">
        <!-- https://github.com/mermaid-js/mermaid/issues/6607 -->
        <AnyChar String="0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"/>
        <StringDetect String="_" lookAhead="1" context="Archi_Text_MaybeMd"/>
        <StringDetect String="]" attribute="Quoted Text Delimiter" context="#pop"/>
      </context>
      <context name="Archi_Text_MaybeMd" attribute="Text">
        <RegExpr String="&md_no_underscore;" context="#pop"/>
        <StringDetect String="_" attribute="Special Text Char" context="Archi_Text_Md"/>
      </context>
      <context name="Archi_Text_Md" attribute="Text" lineEndContext="#pop#pop#pop"
               fallthroughContext="#pop#pop">
        <StringDetect String="_" attribute="Special Text Char"/>
      </context>

      <!-- id1{group}:L - - L:id{group}
               ~~~~~~            ~~~~~~ -->
      <context name="Archi_Group" attribute="Annotation" lineEndContext="#pop"
               fallthroughContext="#pop">
        <StringDetect String="}" attribute="Annotation Delimiter" context="#pop"/>
        <StringDetect String="group" attribute="Annotation"/>
        <DetectIdentifier attribute="Error"/>
      </context>

      <!--
      @} Architecture Diagram
      -->


      <!--
      @{ Radar Diagram
      -->

      <context name="Radar" attribute="Error">
        <DetectSpaces attribute="Normal"/>

        <AnyChar String="[]" attribute="Shape"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <StringDetect String="{" attribute="Curly Bracket Block Delimiter"
                      context="Radar_Values" beginRegion="block"/>
        <StringDetect String="," attribute="List Separator"/>

        <IncludeRules context="Find_Any_Comment"/>

        <WordDetect String="axis" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="curve" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="max" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="min" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="graticule" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="ticks" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="showLegend" attribute="Keyword" weakDeliminator="-"/>
        <WordDetect String="title" attribute="Keyword" weakDeliminator="-"
                    context="Text_Simple!SpacesOrError"/>
        <WordDetect String="circle" attribute="Keyword Parameter" weakDeliminator="-"/>
        <WordDetect String="polygon" attribute="Keyword Parameter" weakDeliminator="-"/>
        <StringDetect String="true" attribute="Keyword Parameter"/>
        <StringDetect String="false" attribute="Keyword Parameter"/>

        <IncludeRules context="Find_Accessibility"/>

        <Int attribute="Number"/>

        <AnyChar String="-" attribute="Error"/>
        <AnyChar String="&radar_id_ch;" attribute="Node" context="Radar_Node"/>
      </context>

      <context name="Radar_Node" attribute="Node" lineEndContext="#pop"
               fallthroughContext="#pop">
        <AnyChar String="&radar_id_ch;"/>
      </context>
      <context name="Radar_Prop" attribute="Property" lineEndContext="#pop"
               fallthroughContext="#pop">
        <AnyChar String="&radar_id_ch;"/>
      </context>

      <context name="Radar_Values" attribute="Normal" fallthroughContext="#pop">
        <Int attribute="Number"/>
        <StringDetect String="," attribute="List Separator"/>
        <DetectSpaces attribute="Normal"/>
        <StringDetect String="." attribute="Number"/>
        <StringDetect String=":" attribute="Property Separator"/>
        <StringDetect String="}" attribute="Curly Bracket Block Delimiter"
                      context="#pop" endRegion="block"/>
        <IncludeRules context="Find_Any_Comment"/>

        <WordDetect String="axis" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="curve" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="max" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="min" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="graticule" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="ticks" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="showLegend" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="title" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="circle" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="polygon" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="accTitle" attribute="Error" weakDeliminator="-"/>
        <WordDetect String="accDescr" attribute="Error" weakDeliminator="-"/>
        <StringDetect String="true" attribute="Error"/>
        <StringDetect String="false" attribute="Error"/>

        <AnyChar String="-" attribute="Error"/>
        <AnyChar String="&radar_id_ch;" attribute="Property" context="Radar_Prop"/>
      </context>

      <!--
      @} Radar Diagram
      -->


      <!--
      @{ Treemap Diagram
      -->

      <context name="Treemap" attribute="Error">
        <DetectSpaces attribute="Normal"/>
        <Int attribute="Number"/>
        <IncludeRules context="Find_Quote_Simple"/>
        <StringDetect String="." attribute="Number"/>
        <StringDetect String=":::" attribute="Class Name Delimiter"
                      context="Treemap_ClassName"/>
        <StringDetect String=":" attribute="Node Separator"/>

        <WordDetect String="classDef" attribute="Keyword" context="Flowchart_KwClassDef"/>

        <IncludeRules context="Find_Accessibility"/>
      </context>

      <context name="Treemap_ClassName" attribute="Error" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectIdentifier attribute="Class Name" context="#pop"/>
      </context>

      <!--
      @} Treemap Diagram
      -->


      <!-- @{ Md -->
      <!-- **xy**   __xy__   \*   \=   $$sin f$$   &lt;   #lt;
           ~~  ~~   ~~  ~~   ~~   ~    ~~     ~~   ~~~~   ~~~~ -->
      <context name="Find_Md_Syms_ThenPop" attribute="Normal" lineEndContext="#pop">
        <AnyChar String="*_" attribute="Special Text Char" context="#pop!Md_bi"/>
        <StringDetect String="\" attribute="Special Text Char" context="Md_Escape"/>
        <StringDetect String="$$" attribute="Math Delimiter" context="#pop"/>
        <IncludeRules context="Find_Entities_ThenPop"/>
      </context>
      <!-- \*
            ~ -->
      <context name="Md_Escape" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <AnyChar String="*_\" context="#pop#pop"/>
      </context>

      <!-- *xy* / _xy_ / \* / $$sin f$$ / &lt;
           ~  ~   ~  ~   ~    ~~     ~~   ~~~~ -->
      <context name="Find_MdText_Syms_ThenPop" attribute="Normal" lineEndContext="#pop">
        <AnyChar String="*_" attribute="Special Text Char" context="#pop!Md_bi"/>
        <StringDetect String="\" attribute="Special Text Char" context="MdText_Escape"/>
        <StringDetect String="$$" attribute="Math Delimiter" context="#pop"/>
        <IncludeRules context="Find_Entities_ThenPop"/>
      </context>
      <!-- \*
            ~ -->
      <context name="MdText_Escape" attribute="Normal" lineEndContext="#pop#pop"
               fallthroughContext="#pop#pop">
        <AnyChar String="*_\" attribute="Text" context="#pop#pop"/>
      </context>

      <!-- *xy* / _xy_
           ~  ~   ~  ~ -->
      <context name="Md_bi" attribute="Normal" lineEndContext="#pop" fallthroughContext="#pop">
        <AnyChar String="*_" attribute="Special Text Char"/>
      </context>
      <!-- @} Md -->


      <!-- @{ kw (\s | \n) bla bla
                 ~~~~~~~~~
      context="BlaBla!SpacesOrNewLine"
      -->
      <context name="SpacesOrNewLine" attribute="Normal"
               lineEndContext="SpacesOrNewLine_NewLine">
        <DetectSpaces attribute="Normal" context="#pop"/>
      </context>
      <context name="SpacesOrNewLine_NewLine" attribute="Normal"
               fallthroughContext="#pop#pop"
               lineEmptyContext="#pop#pop#pop">
        <DetectSpaces attribute="Normal" context="#pop#pop"/>
      </context>
      <!-- @} kw (\s | \n) bla bla -->


      <!-- @{ kw \s bla bla
                 ~~
      -->
      <context name="SpacesOrError" attribute="Normal" lineEndContext="#pop">
        <DetectSpaces attribute="Normal" context="#pop"/>
        <IncludeRules context="CharErrorAndPop"/>
      </context>
      <!--
      @} kw \s bla bla
      -->


      <!-- @{ spaces -->
      <context name="Spaces" attribute="Normal" lineEndContext="#pop" fallthroughContext="#pop">
        <DetectSpaces attribute="Normal" context="#pop"/>
      </context>

      <context name="LineErrorExceptSpaces" attribute="Error" lineEndContext="#pop">
        <DetectSpaces attribute="Normal"/>
      </context>

      <context name="SpacesAsError" attribute="Normal" lineEndContext="#pop"
               fallthroughContext="#pop">
        <DetectSpaces attribute="Error" context="#pop"/>
      </context>
      <!-- @} spaces -->


      <!-- @{ entities -->
      <!-- #lt; -->
      <context name="Find_Entity" attribute="Normal">
        <RegExpr String="(&mmd_ent;)+" attribute="Entity"/>
      </context>

      <!-- #lt; / &lt; -->
      <context name="Find_Entities" attribute="Normal">
        <RegExpr String="(&html_ent;|&mmd_ent;)+" attribute="Entity"/>
      </context>
      <context name="Find_Entities_ThenPop" attribute="Normal">
        <RegExpr String="(&html_ent;|&mmd_ent;)+" attribute="Entity" context="#pop"/>
      </context>
      <!-- @} entities -->


      <!-- @{ <br> <br/> -->
      <context name="Find_HTML_br" attribute="Normal">
        <RegExpr String="&lt;br\s*/?>" attribute="HTML Tag"/>
      </context>

      <context name="Find_HTML_simple_br" attribute="Normal">
        <StringDetect String="&lt;br>" attribute="HTML Tag"/>
      </context>
      <!-- @} <br> <br/> -->


      <!--
      @{ "..." / '...'
      -->
      <context name="Find_DQuote_NoSpecial" attribute="Normal">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="DQuote_NoSpecial"/>
      </context>
      <context name="DQuote_NoSpecial" attribute="Quoted Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
      </context>

      <context name="Find_SQuote_NoSpecial" attribute="Normal">
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="SQuote_NoSpecial"/>
      </context>
      <context name="SQuote_NoSpecial" attribute="Quoted Text">
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="#pop"/>
      </context>

      <!-- with mermaid entity (#lt;) and escape for \ -->
      <context name="Find_Quote_Simple" attribute="Normal">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="DQuote_Simple"/>
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="SQuote_Simple"/>
      </context>
      <context name="DQuote_Simple" attribute="Quoted Text">
        <StringDetect String='"' attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Quote_Simple_Common"/>
      </context>
      <context name="SQuote_Simple" attribute="Quoted Text">
        <StringDetect String="'" attribute="Quoted Text Delimiter" context="#pop"/>
        <IncludeRules context="Quote_Simple_Common"/>
      </context>
      <context name="Quote_Simple_Common" attribute="Quoted Text">
        <DetectIdentifier/>
        <DetectSpaces/>
        <Int/>
        <IncludeRules context="Find_Comment"/>
        <LineContinue char="\" attribute="Error" context="#pop"/>
        <StringDetect String="\" attribute="Special Text Char" context="Quote_Simple_Espace"/>
        <IncludeRules context="Find_Entity"/>
      </context>
      <context name="Quote_Simple_Espace" attribute="Quoted Text" fallthroughContext="#pop">
        <AnyChar String="&quot;'\" attribute="Quoted Text" context="#pop"/>
        <AnyChar String="0" attribute="Error" context="#pop"/>
        <AnyChar String="btnvfr" attribute="Special Text Char" context="#pop"/>
      </context>
      <!--
      @} "..." / '...'
      -->


      <!--
      @{ text
      -->
      <context name="Text_NoSpecial" attribute="Text" lineEndContext="#pop">
      </context>

      <!-- with mermaid entity (#lt;) and bad html tag -->
      <context name="Text_Simple" attribute="Text" lineEndContext="#pop">
        <DetectIdentifier/>
        <DetectSpaces/>
        <Int/>
        <StringDetect String="&lt;" attribute="Special Text Char"/>
        <IncludeRules context="Find_Entity"/>
      </context>
      <!--
      @} text
      -->


      <!--
      @{ Comment
      -->
      <context name="Find_Comment" attribute="Comment">
        <!-- empty comment is not a comment: https://github.com/mermaid-js/mermaid/pull/7008
        this error is ignored
        -->
        <StringDetect String="%%" attribute="Comment" context="Comment" firstNonSpace="1"/>
        <!-- block comment: https://github.com/mermaid-js/mermaid/pull/7028 -->
      </context>

      <context name="Find_Comment_InText" attribute="Normal">
        <DetectSpaces/>
        <!-- https://github.com/mermaid-js/mermaid/issues/7011 -->
        <IncludeRules context="Find_Comment"/>
      </context>

      <context name="Find_Any_Comment" attribute="Normal">
        <StringDetect String="%%" attribute="Comment" context="Comment"/>
      </context>

      <context name="Comment" attribute="Comment" lineEndContext="#pop">
        <DetectSpaces/>
        <LineContinue attribute="Comment"/>
        <IncludeRules context="##Comments"/>
        <DetectIdentifier/>
      </context>

      <context name="FakeComment" attribute="Comment" lineEndContext="#pop">
      </context>
      <!--
      @} Comment
      -->


      <!--
      @{ Error
      -->
      <context name="LineError" attribute="Error" lineEndContext="#pop">
      </context>

      <context name="CharErrorAndPop" attribute="Error" lineEndContext="#pop">
        <RegExpr String="." attribute="Error" context="#pop"/>
      </context>

      <context name="CharErrorAndPop2" attribute="Error" lineEndContext="#pop">
        <RegExpr String="." attribute="Error" context="#pop#pop"/>
      </context>
      <!--
      @} Error
      -->

    </contexts>

    <itemDatas>
      <itemData name="Normal" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Error" defStyleNum="dsError" spellChecking="0"/>
      <itemData name="Shape" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/>
      <itemData name="Keyword Parameter" defStyleNum="dsConstant" spellChecking="0"/>
      <itemData name="Keyword Property Separator" defStyleNum="dsAttribute" spellChecking="0"/>
      <itemData name="Node" defStyleNum="dsDataType"/>
      <itemData name="Node Separator" defStyleNum="dsDataType" spellChecking="0" bold="1"/>
      <itemData name="Symbol Separator" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="List Separator" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Text" defStyleNum="dsVerbatimString"/>
      <itemData name="Text Separator" defStyleNum="dsNormal"/>
      <itemData name="Quoted Text" defStyleNum="dsString"/>
      <itemData name="Quoted Text Delimiter" defStyleNum="dsString" spellChecking="0"/>
      <itemData name="Markdown Text" defStyleNum="dsString"/>
      <itemData name="Markdown Text Delimiter" defStyleNum="dsString" spellChecking="0"/>
      <itemData name="Special Text Char" defStyleNum="dsSpecialChar" spellChecking="0"/>
      <itemData name="Math Delimiter" defStyleNum="dsImport" spellChecking="0"/>
      <itemData name="HTML Tag" defStyleNum="dsSpecialChar" spellChecking="0"/>
      <itemData name="HTML Attribute" defStyleNum="dsOthers" spellChecking="0"/>
      <itemData name="Link" defStyleNum="dsPreprocessor" spellChecking="0"/>
      <itemData name="Link Text" defStyleNum="dsVerbatimString"/>
      <itemData name="Link Text Separator" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Link Text Delimiter" defStyleNum="dsVerbatimString" spellChecking="0" bold="1"/>
      <itemData name="Union" defStyleNum="dsKeyword" spellChecking="0"/>
      <itemData name="Entity" defStyleNum="dsDecVal" spellChecking="0"/>
      <itemData name="Class Name" defStyleNum="dsFunction" spellChecking="0"/>
      <itemData name="Class Name Delimiter" defStyleNum="dsFunction" spellChecking="0" bold="1"/>
      <itemData name="ID" defStyleNum="dsFunction" spellChecking="0"/>
      <itemData name="ID Separator" defStyleNum="dsFunction" spellChecking="0" bold="1"/>

      <itemData name="Number" defStyleNum="dsDecVal" spellChecking="0"/>
      <itemData name="Style Property" defStyleNum="dsAttribute" spellChecking="0"/>
      <itemData name="Style Property Separator" defStyleNum="dsAttribute" spellChecking="0" bold="1"/>
      <itemData name="Style Value" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Style Unit" defStyleNum="dsDataType" spellChecking="0"/>
      <itemData name="Style Hexadeximal Color" defStyleNum="dsImport" spellChecking="0"/>

      <itemData name="Curly Bracket Block Delimiter" defStyleNum="dsDataType" spellChecking="0" bold="1"/>
      <itemData name="Property" defStyleNum="dsAttribute" spellChecking="0"/>
      <itemData name="Property Separator" defStyleNum="dsAttribute" spellChecking="0" bold="1"/>
      <itemData name="Property Number" defStyleNum="dsVerbatimString" spellChecking="0"/>
      <itemData name="Property Boolean" defStyleNum="dsImport" spellChecking="0"/>

      <itemData name="Annotation" defStyleNum="dsAttribute" spellChecking="0"/>
      <itemData name="Annotation Delimiter" defStyleNum="dsAttribute" spellChecking="0" bold="1"/>
      <!-- gantt, journey, timeline -->
      <itemData name="Section Text" defStyleNum="dsDocumentation" spellChecking="0"/>
      <!-- classDiagram -->
      <itemData name="Generic Type Symbol" defStyleNum="dsFunction" spellChecking="0"/>
      <!-- classDiagram, erDiagram -->
      <itemData name="Member" defStyleNum="dsNormal" spellChecking="0"/>
      <itemData name="Member Type" defStyleNum="dsNormal" spellChecking="0"/>
      <!-- stateDiagram -->
      <itemData name="Concurrency" defStyleNum="dsFunction" spellChecking="0"/>
      <!-- erDiagram -->
      <itemData name="Cardinality Text" defStyleNum="dsPreprocessor" spellChecking="0"/>
      <itemData name="Relationship Text" defStyleNum="dsPreprocessor" spellChecking="0" bold="1"/>
      <!-- ZenUML -->
      <itemData name="Diagram Comment" defStyleNum="dsDocumentation"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="%%" position="afterwhitespace"/>
    </comments>
  </general>
</language>
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
