{ "comment": "syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit", "fileTypes": [ "rst", "rest" ], "keyEquivalent": "^~R", "name": "reStructuredText", "patterns": [ { "begin": "^([ \\t]*)(?=\\S)", "contentName": "meta.paragraph.restructuredtext", "end": "^(?!\\1(?=\\S))", "patterns": [ { "include": "#inline" } ] } ], "repository": { "inline": { "patterns": [ { "begin": "^([ \\t]*)((\\.\\.)\\sraw(::)) 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": "(\\.\\.)\\s[A-z][A-z0-9-_]+(::)\\s*$", "name": "meta.other.directive.restructuredtext" }, { "begin": "^([ \\t]*).*?((::))", "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": "(\\*\\*)[^*]+(\\*\\*)", "name": "markup.bold.restructuredtext" }, { "captures": { "1": { "name": "punctuation.definition.italic.restructuredtext" }, "2": { "name": "punctuation.definition.italic.restructuredtext" } }, "comment": "emphasis", "match": "(\\*)\\w[^*]\\w+(\\*)", "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": "(\\.\\.)\\s+(_)([\\w\\s]+)(:)\\s+(.*)", "name": "meta.link.reference.def.restructuredtext" }, { "captures": { "1": { "name": "punctuation.definition.substitution.restructuredtext" } }, "comment": "substitution", "match": "(\\|)[^|]+(\\|_{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(\\w+)(_)\\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": "(`)([\\w\\s]+)(`_)", "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": "(`)([\\w\\s]+)\\s+(<)(.*?)(>)(`_)", "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": "^(\\.\\.)\\s+((\\[)(((#?)[^]]*?)|\\*)(\\]))\\s+(.*)", "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": "((\\[)[0-9]+(\\]))(_)", "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": "((\\[#)[A-z0-9_]*(\\]))(_)", "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": "((\\[)\\*(\\]))(_)", "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": "^(\\.\\.)\\s+((\\[)[A-z][A-z0-9]*(\\]))(_)\\s+(.*)", "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": "((\\[)[A-z][A-z0-9_-]*(\\]))(_)", "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": "(`)[^`]+(`)(?!_)", "name": "markup.other.command.restructuredtext" }, { "captures": { "1": { "name": "punctuation.definition.field.restructuredtext" }, "2": { "name": "punctuation.definition.field.restructuredtext" } }, "comment": "field list", "match": "(:)[A-z][A-z0-9 =\\s\\t_]*(:)", "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": "(^(=|-|~|`|#|\"|\\^|\\+|\\*){3,}$){1,1}?", "name": "markup.heading.restructuredtext" }, { "begin": "^(\\.\\.)", "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" }