# Encoding: UTF-8

{comment: 
  "syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit",
 fileTypes: ["rst", "rest"],
 keyEquivalent: "^~R",
 name: "reStructuredText",
 patterns: 
  [{begin: /^(?<_1>[ \t]*)(?=\S)/,
    contentName: "meta.paragraph.restructuredtext",
    end: "^(?!\\1(?=\\S))",
    patterns: [{include: "#inline"}]}],
 repository: 
  {inline: 
    {patterns: 
      [{begin: /^(?<_1>[ \t]*)(?<_2>(?<_3>\.\.)\sraw(?<_4>::)) html/,
        captures: 
         {2 => {name: "meta.directive.restructuredtext"},
          3 => {name: "punctuation.definition.directive.restructuredtext"},
          4 => {name: "punctuation.separator.key-value.restructuredtext"}},
        comment: "directives.html",
        end: "^(?!\\1[ \\t])",
        patterns: [{include: "text.html.basic"}]},
       {captures: 
         {1 => {name: "punctuation.definition.directive.restructuredtext"},
          2 => {name: "punctuation.separator.key-value.restructuredtext"}},
        comment: "directives",
        match: /(?<_1>\.\.)\s[A-z][A-z0-9_-]+(?<_2>::)\s*$/,
        name: "meta.other.directive.restructuredtext"},
       {begin: /^(?<_1>[ \t]*).*?(?<_2>(?<_3>::))/,
        captures: 
         {2 => {name: "markup.raw.restructuredtext"},
          3 => {name: "punctuation.definition.raw.restructuredtext"}},
        comment: "verbatim blocks",
        end: "^(?=\\1[^\\s]+)",
        name: "meta.raw.block.restructuredtext",
        patterns: [{match: /.+/, name: "markup.raw.restructuredtext"}]},
       {comment: "directives",
        match: /::/,
        name: "meta.startraw.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.italic.restructuredtext"},
          2 => {name: "punctuation.definition.italic.restructuredtext"}},
        comment: "strong emphasis",
        match: /(?<_1>\*\*)[^*]+(?<_2>\*\*)/,
        name: "markup.bold.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.italic.restructuredtext"},
          2 => {name: "punctuation.definition.italic.restructuredtext"}},
        comment: "emphasis",
        match: /(?<_1>\*)\w[^*]\w+(?<_2>\*)/,
        name: "markup.italic.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.link.restructuredtext"},
          2 => {name: "punctuation.definition.string.restructuredtext"},
          3 => {name: "string.other.link.title.restructuredtext"},
          4 => {name: "punctuation.separator.key-value.restructuredtext"},
          5 => {name: "markup.underline.link.restructuredtext"}},
        comment: "replacement",
        match: /(?<_1>\.\.)\s+(?<_2>_)(?<_3>[\w\s]+)(?<_4>:)\s+(?<_5>.*)/,
        name: "meta.link.reference.def.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.substitution.restructuredtext"}},
        comment: "substitution",
        match: /(?<_1>\|)[^|]+(?<_2>\|_{0,2})/,
        name: "markup.underline.substitution.restructuredtext"},
       {captures: 
         {1 => {name: "string.other.link.title.restructuredtext"},
          2 => {name: "punctuation.definition.link.restructuredtext"}},
        comment: "links `...`_ or `...`__",
        match: /\b(?<_1>\w+)(?<_2>_)\b/,
        name: "meta.link.reference"},
       {captures: 
         {1 => {name: "punctuation.definition.link.restructuredtext"},
          2 => {name: "string.other.link.title.restructuredtext"},
          3 => {name: "punctuation.definition.link.restructuredtext"}},
        comment: "links `...`_ or `...`__",
        match: /(?<_1>`)(?<_2>[\w\s]+)(?<_3>`_)/,
        name: "meta.link.reference"},
       {captures: 
         {1 => {name: "punctuation.definition.link.restructuredtext"},
          2 => {name: "string.other.link.title.restructuredtext"},
          3 => {name: "punctuation.definition.location.restructuredtext"},
          4 => {name: "markup.underline.link.restructuredtext"},
          5 => {name: "punctuation.definition.location.restructuredtext"},
          6 => {name: "punctuation.definition.link.restructuredtext"}},
        comment: "links `...`_ ",
        match: /(?<_1>`)(?<_2>[\w\s]+)\s+(?<_3><)(?<_4>.*?)(?<_5>>)(?<_6>`_)/,
        name: "meta.link.inline.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.link.restructuredtext"},
          2 => {name: "constant.other.footnote.link.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          6 => {name: "punctuation.definition.constant.restructuredtext"},
          7 => {name: "punctuation.definition.constant.restructuredtext"},
          8 => {name: "string.other.footnote.restructuredtext"}},
        comment: "replacement",
        match: 
         /^(?<_1>\.\.)\s+(?<_2>(?<_3>\[)(?<_4>(?<_5>(?<_6>#?)[^\]]*?)|\*)(?<_7>\]))\s+(?<_8>.*)/,
        name: "meta.link.footnote.def.restructuredtext"},
       {captures: 
         {1 => {name: "constant.other.footnote.link"},
          2 => {name: "punctuation.definition.constant.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          4 => {name: "punctuation.definition.constant.restructuredtext"}},
        comment: "footnote reference: [0]_",
        match: /(?<_1>(?<_2>\[)[0-9]+(?<_3>\]))(?<_4>_)/,
        name: "meta.link.footnote.numeric.restructuredtext"},
       {captures: 
         {1 => {name: "constant.other.footnote.link"},
          2 => {name: "punctuation.definition.constant.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          4 => {name: "punctuation.definition.constant.restructuredtext"}},
        comment: "footnote reference [#]_ or [#foo]_",
        match: /(?<_1>(?<_2>\[#)[A-z0-9_]*(?<_3>\]))(?<_4>_)/,
        name: "meta.link.footnote.auto.restructuredtext"},
       {captures: 
         {1 => {name: "constant.other.footnote.link.restructuredtext"},
          2 => {name: "punctuation.definition.constant.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          4 => {name: "punctuation.definition.constant.restructuredtext"}},
        comment: "footnote reference [*]_",
        match: /(?<_1>(?<_2>\[)\*(?<_3>\]))(?<_4>_)/,
        name: "meta.link.footnote.symbol.auto.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.link.restructuredtext"},
          2 => {name: "constant.other.citation.link.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          4 => {name: "punctuation.definition.constant.restructuredtext"},
          5 => {name: "punctuation.definition.constant.restructuredtext"},
          6 => {name: "string.other.citation.restructuredtext"}},
        comment: "replacement",
        match: 
         /^(?<_1>\.\.)\s+(?<_2>(?<_3>\[)[A-z][A-z0-9]*(?<_4>\]))(?<_5>_)\s+(?<_6>.*)/,
        name: "meta.link.citation.def.restructuredtext"},
       {captures: 
         {1 => {name: "constant.other.citation.link.restructuredtext"},
          2 => {name: "punctuation.definition.constant.restructuredtext"},
          3 => {name: "punctuation.definition.constant.restructuredtext"},
          4 => {name: "punctuation.definition.constant.restructuredtext"}},
        comment: "citation reference",
        match: /(?<_1>(?<_2>\[)[A-z][A-z0-9_-]*(?<_3>\]))(?<_4>_)/,
        name: "meta.link.citation.restructuredtext"},
       {begin: /``/,
        captures: {0 => {name: "punctuation.definition.raw.restructuredtext"}},
        comment: "inline literal",
        end: "``",
        name: "markup.raw.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.intepreted.restructuredtext"},
          2 => {name: "punctuation.definition.intepreted.restructuredtext"}},
        comment: "intepreted text",
        match: /(?<_1>`)[^`]+(?<_2>`)(?!_)/,
        name: "markup.other.command.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.field.restructuredtext"},
          2 => {name: "punctuation.definition.field.restructuredtext"}},
        comment: "field list",
        match: /(?<_1>:)[A-z][A-z0-9  =\s\t_]*(?<_2>:)/,
        name: "entity.name.tag.restructuredtext"},
       {captures: 
         {0 => {name: "punctuation.definition.table.restructuredtext"}},
        comment: "table",
        match: /\+-[+-]+/,
        name: "markup.other.table.restructuredtext"},
       {captures: 
         {0 => {name: "punctuation.definition.table.restructuredtext"}},
        comment: "table",
        match: /\+=[+=]+/,
        name: "markup.other.table.restructuredtext"},
       {captures: 
         {1 => {name: "punctuation.definition.heading.restructuredtext"}},
        match: /(?<_1>^(?<_2>=|-|~|`|#|"|\^|\+|\*){3,}$){1,1}?/,
        name: "markup.heading.restructuredtext"},
       {begin: /^(?<_1>\.\.)/,
        beginCaptures: 
         {1 => {name: "punctuation.definition.comment.restructuredtext"}},
        comment: "comment",
        end: "$\\n?",
        name: "comment.line.double-dot.restructuredtext"}]}},
 scopeName: "text.restructuredtext",
 uuid: "62DA9AD6-36E1-4AB7-BB87-E933AD9FD1A4"}
