Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8603d41ba9
Fetching contributors…

Cannot retrieve contributors at this time

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