textpow 0.10.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +30 -0
  4. data/{History.txt → History.rdoc} +10 -0
  5. data/{README.txt → MIT-LICENSE.txt} +0 -30
  6. data/README.rdoc +82 -0
  7. data/Rakefile +42 -49
  8. data/bin/plist2syntax +0 -0
  9. data/bin/plist2yaml +0 -0
  10. data/examples/benchmark_js.rb +13 -0
  11. data/examples/jquery.js +9046 -0
  12. data/lib/textpow.rb +43 -3
  13. data/lib/textpow/debug_processor.rb +35 -35
  14. data/lib/textpow/recording_processor.rb +13 -0
  15. data/lib/textpow/score_manager.rb +60 -60
  16. data/lib/textpow/syntax.rb +303 -262
  17. data/lib/textpow/syntax/broken/markdown.syntax +519 -0
  18. data/lib/textpow/syntax/broken/php.syntax +1253 -0
  19. data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
  20. data/lib/textpow/syntax/old/YAML.yaml +160 -0
  21. data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
  22. data/lib/textpow/syntax/source.actionscript.syntax +97 -0
  23. data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
  24. data/lib/textpow/syntax/source.active4d.syntax +276 -0
  25. data/lib/textpow/syntax/source.ada.syntax +33 -0
  26. data/lib/textpow/syntax/source.antlr.syntax +151 -0
  27. data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
  28. data/lib/textpow/syntax/source.apache-config.syntax +191 -0
  29. data/lib/textpow/syntax/source.applescript.syntax +384 -0
  30. data/lib/textpow/syntax/source.asp.syntax +70 -0
  31. data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
  32. data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
  33. data/lib/textpow/syntax/source.c++.syntax +186 -0
  34. data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
  35. data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
  36. data/lib/textpow/syntax/source.c.syntax +414 -0
  37. data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
  38. data/lib/textpow/syntax/source.cm.syntax +32 -0
  39. data/lib/textpow/syntax/source.coffee.syntax +216 -0
  40. data/lib/textpow/syntax/source.context-free.syntax +176 -0
  41. data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
  42. data/lib/textpow/syntax/source.css.syntax +195 -0
  43. data/lib/textpow/syntax/source.d.syntax +142 -0
  44. data/lib/textpow/syntax/source.diff.syntax +81 -0
  45. data/lib/textpow/syntax/source.dot.syntax +47 -0
  46. data/lib/textpow/syntax/source.dylan.syntax +62 -0
  47. data/lib/textpow/syntax/source.eiffel.syntax +78 -0
  48. data/lib/textpow/syntax/source.erlang.syntax +922 -0
  49. data/lib/textpow/syntax/source.fortran.syntax +141 -0
  50. data/lib/textpow/syntax/source.fscript.syntax +80 -0
  51. data/lib/textpow/syntax/source.fxscript.syntax +142 -0
  52. data/lib/textpow/syntax/source.gri.syntax +83 -0
  53. data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
  54. data/lib/textpow/syntax/source.haskell.syntax +88 -0
  55. data/lib/textpow/syntax/source.icalendar.syntax +32 -0
  56. data/lib/textpow/syntax/source.inform.syntax +48 -0
  57. data/lib/textpow/syntax/source.ini.syntax +55 -0
  58. data/lib/textpow/syntax/source.io.syntax +81 -0
  59. data/lib/textpow/syntax/source.java-props.syntax +20 -0
  60. data/lib/textpow/syntax/source.java.syntax +211 -0
  61. data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
  62. data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
  63. data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
  64. data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
  65. data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
  66. data/lib/textpow/syntax/source.js.syntax +256 -0
  67. data/lib/textpow/syntax/source.js.yui.syntax +176 -0
  68. data/lib/textpow/syntax/source.json.syntax +136 -0
  69. data/lib/textpow/syntax/source.lex.syntax +219 -0
  70. data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
  71. data/lib/textpow/syntax/source.lilypond.syntax +492 -0
  72. data/lib/textpow/syntax/source.lisp.syntax +61 -0
  73. data/lib/textpow/syntax/source.logo.syntax +29 -0
  74. data/lib/textpow/syntax/source.logtalk.syntax +152 -0
  75. data/lib/textpow/syntax/source.lua.syntax +86 -0
  76. data/lib/textpow/syntax/source.makefile.syntax +36 -0
  77. data/lib/textpow/syntax/source.matlab.syntax +142 -0
  78. data/lib/textpow/syntax/source.mel.syntax +92 -0
  79. data/lib/textpow/syntax/source.mips.syntax +66 -0
  80. data/lib/textpow/syntax/source.ml.syntax +121 -0
  81. data/lib/textpow/syntax/source.modula-3.syntax +47 -0
  82. data/lib/textpow/syntax/source.nant-build.syntax +53 -0
  83. data/lib/textpow/syntax/source.objc++.syntax +18 -0
  84. data/lib/textpow/syntax/source.objc.syntax +233 -0
  85. data/lib/textpow/syntax/source.ocaml.syntax +764 -0
  86. data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
  87. data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
  88. data/lib/textpow/syntax/source.open-gl.syntax +14 -0
  89. data/lib/textpow/syntax/source.pascal.syntax +77 -0
  90. data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
  91. data/lib/textpow/syntax/source.perl.syntax +1113 -0
  92. data/lib/textpow/syntax/source.php.cake.syntax +55 -0
  93. data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
  94. data/lib/textpow/syntax/source.postscript.syntax +114 -0
  95. data/lib/textpow/syntax/source.processing.syntax +106 -0
  96. data/lib/textpow/syntax/source.prolog.syntax +40 -0
  97. data/lib/textpow/syntax/source.python.django.syntax +21 -0
  98. data/lib/textpow/syntax/source.python.syntax +868 -0
  99. data/lib/textpow/syntax/source.qmake.syntax +114 -0
  100. data/lib/textpow/syntax/source.quake-config.syntax +32 -0
  101. data/lib/textpow/syntax/source.r-console.syntax +16 -0
  102. data/lib/textpow/syntax/source.r.syntax +81 -0
  103. data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
  104. data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
  105. data/lib/textpow/syntax/source.regexp.syntax +50 -0
  106. data/lib/textpow/syntax/source.remind.syntax +253 -0
  107. data/lib/textpow/syntax/source.rez.syntax +80 -0
  108. data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
  109. data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
  110. data/lib/textpow/syntax/source.ruby.syntax +1035 -0
  111. data/lib/textpow/syntax/source.s5.syntax +69 -0
  112. data/lib/textpow/syntax/source.sass.syntax +45 -0
  113. data/lib/textpow/syntax/source.scheme.syntax +347 -0
  114. data/lib/textpow/syntax/source.scilab.syntax +41 -0
  115. data/lib/textpow/syntax/source.scss.syntax +527 -0
  116. data/lib/textpow/syntax/source.shell.syntax +384 -0
  117. data/lib/textpow/syntax/source.slate.syntax +149 -0
  118. data/lib/textpow/syntax/source.smarty.syntax +63 -0
  119. data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
  120. data/lib/textpow/syntax/source.sql.syntax +237 -0
  121. data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
  122. data/lib/textpow/syntax/source.strings.syntax +39 -0
  123. data/lib/textpow/syntax/source.swig.syntax +57 -0
  124. data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
  125. data/lib/textpow/syntax/source.tcl.syntax +152 -0
  126. data/lib/textpow/syntax/source.yaml.syntax +160 -0
  127. data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
  128. data/lib/textpow/syntax/text.bbcode.syntax +287 -0
  129. data/lib/textpow/syntax/text.bibtex.syntax +151 -0
  130. data/lib/textpow/syntax/text.blog.html.syntax +41 -0
  131. data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
  132. data/lib/textpow/syntax/text.blog.syntax +27 -0
  133. data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
  134. data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
  135. data/lib/textpow/syntax/text.haml.syntax +88 -0
  136. data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
  137. data/lib/textpow/syntax/text.html.asp.syntax +27 -0
  138. data/lib/textpow/syntax/text.html.basic.syntax +362 -0
  139. data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
  140. data/lib/textpow/syntax/text.html.django.syntax +36 -0
  141. data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
  142. data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
  143. data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
  144. data/lib/textpow/syntax/text.html.mason.syntax +119 -0
  145. data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
  146. data/lib/textpow/syntax/text.html.mt.syntax +162 -0
  147. data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
  148. data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
  149. data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
  150. data/lib/textpow/syntax/text.html.textile.syntax +215 -0
  151. data/lib/textpow/syntax/text.html.tt.syntax +121 -0
  152. data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
  153. data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
  154. data/lib/textpow/syntax/text.log.latex.syntax +50 -0
  155. data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
  156. data/lib/textpow/syntax/text.man.syntax +17 -0
  157. data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
  158. data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
  159. data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
  160. data/lib/textpow/syntax/text.plain.syntax +32 -0
  161. data/lib/textpow/syntax/text.plist.syntax +635 -0
  162. data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
  163. data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
  164. data/lib/textpow/syntax/text.setext.syntax +147 -0
  165. data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
  166. data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
  167. data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
  168. data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
  169. data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
  170. data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
  171. data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
  172. data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
  173. data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
  174. data/lib/textpow/syntax/text.tex.math.syntax +49 -0
  175. data/lib/textpow/syntax/text.tex.syntax +86 -0
  176. data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
  177. data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
  178. data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
  179. data/lib/textpow/syntax/text.xml.syntax +180 -0
  180. data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
  181. data/lib/textpow/version.rb +3 -0
  182. data/spec/fixtures/objeck.plist +107 -0
  183. data/spec/fixtures/utf8.txt +1 -0
  184. data/spec/spec_helper.rb +2 -0
  185. data/spec/textpow/score_manager_spec.rb +20 -0
  186. data/spec/textpow/syntax_files_spec.rb +26 -0
  187. data/spec/textpow/syntax_spec.rb +225 -0
  188. data/spec/textpow_spec.rb +57 -0
  189. data/textpow.gemspec +19 -0
  190. metadata +246 -68
  191. data/Manifest.txt +0 -13
  192. data/mm/manual.mm +0 -266
  193. data/test/test_textpow.rb +0 -25
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: PmWiki
3
+ fileTypes:
4
+ - pmwiki
5
+ scopeName: text.pmwiki
6
+ uuid: B991CA22-EE93-410C-A4EB-7578D9CE6C8D
7
+ patterns:
8
+ - name: keyword.control.line-break.pmwiki
9
+ match: \\\\$
10
+ - name: keyword.control.line-break.pmwiki
11
+ match: \[\[<<\]\]
12
+ - name: keyword.control.continue-line.pmwiki
13
+ match: \\$
14
+ - name: markup.raw.monospace.pmwiki
15
+ begin: ^\s+
16
+ end: $
17
+ patterns:
18
+ - include: text.pmwiki
19
+ - name: meta.indented-paragraph.pmwiki
20
+ captures:
21
+ "1":
22
+ name: keyword.control.indented-paragraph.pmwiki
23
+ begin: ^(-+>)
24
+ end: $
25
+ patterns:
26
+ - include: text.pmwiki
27
+ - name: markup.heading.pmwiki
28
+ captures:
29
+ "1":
30
+ name: keyword.control.heading.pmwiki
31
+ begin: ^(!+)
32
+ end: $
33
+ - name: markup.list.unnumbered.pmwiki
34
+ captures:
35
+ "1":
36
+ name: keyword.control.bullet-list.pmwiki
37
+ begin: ^(\*+)
38
+ end: $
39
+ patterns:
40
+ - include: text.pmwiki
41
+ - name: markup.list.numbered.pmwiki
42
+ captures:
43
+ "1":
44
+ name: keyword.control.number-list.pmwiki
45
+ begin: ^(#+)
46
+ end: $
47
+ patterns:
48
+ - include: text.pmwiki
49
+ - name: meta.term-definition.pmwiki
50
+ captures:
51
+ "1":
52
+ name: keyword.control.term-definition.pmwiki
53
+ "2":
54
+ name: entity.name.type.term.pmwiki
55
+ "3":
56
+ name: keyword.control.term-definition.pmwiki
57
+ "4":
58
+ name: string.unquoted.definition.pmwiki
59
+ match: ^(:+)(.*)(:)(.*)$
60
+ - name: meta.separator.pmwiki
61
+ match: ^-{4,}.*$
62
+ - name: markup.italic.emphasis.pmwiki
63
+ begin: "''"
64
+ end: "''(?!')"
65
+ patterns:
66
+ - include: text.pmwiki
67
+ - name: markup.bold.strong.pmwiki
68
+ begin: "'''"
69
+ end: "'''"
70
+ patterns:
71
+ - include: text.pmwiki
72
+ - name: markup.raw.monospace.pmwiki
73
+ begin: "@@"
74
+ end: "@@"
75
+ patterns:
76
+ - include: text.pmwiki
77
+ - name: meta.style.larger.pmwiki
78
+ begin: \[\+
79
+ end: \+\]
80
+ patterns:
81
+ - include: text.pmwiki
82
+ - name: meta.style.smaller.pmwiki
83
+ begin: \[-
84
+ end: -\]
85
+ patterns:
86
+ - include: text.pmwiki
87
+ - name: 'meta.normal-word.pmwiki'
88
+ match: '`\w+'
89
+ - name: markup.underline.pmwiki
90
+ match: \b\\u\w+\\u\w+
91
+ - name: meta.link.inline.pmwiki
92
+ begin: \[\[#
93
+ contentName: string.other.link.title.pmwiki
94
+ end: \]\]
95
+ - name: meta.link.inline.pmwiki
96
+ captures:
97
+ "1":
98
+ name: markup.underline.link.pmwiki
99
+ "2":
100
+ name: keyword.control.link.pmwiki
101
+ "3":
102
+ name: string.other.link.title.pmwiki
103
+ match: \[\[(.*?)\s*(\||->)\s*(.*?)\]\]
104
+ - name: meta.link.inline.pmwiki
105
+ captures:
106
+ "1":
107
+ name: markup.underline.link.pmwiki
108
+ match: \[\[(.*?)\]\]
109
+ - name: markup.raw.verbatim-text.pmwiki
110
+ begin: \[=
111
+ end: =\]
112
+ - include: text.html.basic
113
+ keyEquivalent: ^~P
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: reStructuredText
3
+ fileTypes:
4
+ - rst
5
+ - rest
6
+ scopeName: text.restructuredtext
7
+ repository:
8
+ inline:
9
+ patterns:
10
+ - captures:
11
+ "2":
12
+ name: meta.directive.restructuredtext
13
+ "3":
14
+ name: punctuation.definition.directive.restructuredtext
15
+ "4":
16
+ name: punctuation.separator.key-value.restructuredtext
17
+ begin: ^([ \t]*)((\.\.)\sraw(::)) html
18
+ end: ^(?!\1[ \t])
19
+ patterns:
20
+ - include: text.html.basic
21
+ comment: directives.html
22
+ - name: meta.other.directive.restructuredtext
23
+ captures:
24
+ "1":
25
+ name: punctuation.definition.directive.restructuredtext
26
+ "2":
27
+ name: punctuation.separator.key-value.restructuredtext
28
+ match: (\.\.)\s[A-z][A-z0-9-_]+(::)\s*$
29
+ comment: directives
30
+ - name: meta.raw.block.restructuredtext
31
+ captures:
32
+ "2":
33
+ name: markup.raw.restructuredtext
34
+ "3":
35
+ name: punctuation.definition.raw.restructuredtext
36
+ begin: ^([ \t]*).*?((::))
37
+ end: ^(?=\1[^\s]+)
38
+ patterns:
39
+ - name: markup.raw.restructuredtext
40
+ match: .+
41
+ comment: verbatim blocks
42
+ - name: meta.startraw.restructuredtext
43
+ match: "::"
44
+ comment: directives
45
+ - name: markup.bold.restructuredtext
46
+ captures:
47
+ "1":
48
+ name: punctuation.definition.italic.restructuredtext
49
+ "2":
50
+ name: punctuation.definition.italic.restructuredtext
51
+ match: (\*\*)[^*]+(\*\*)
52
+ comment: strong emphasis
53
+ - name: markup.italic.restructuredtext
54
+ captures:
55
+ "1":
56
+ name: punctuation.definition.italic.restructuredtext
57
+ "2":
58
+ name: punctuation.definition.italic.restructuredtext
59
+ match: (\*)\w[^*]\w+(\*)
60
+ comment: emphasis
61
+ - name: meta.link.reference.def.restructuredtext
62
+ captures:
63
+ "1":
64
+ name: punctuation.definition.link.restructuredtext
65
+ "2":
66
+ name: punctuation.definition.string.restructuredtext
67
+ "3":
68
+ name: string.other.link.title.restructuredtext
69
+ "4":
70
+ name: punctuation.separator.key-value.restructuredtext
71
+ "5":
72
+ name: markup.underline.link.restructuredtext
73
+ match: (\.\.)\s+(_)([\w\s]+)(:)\s+(.*)
74
+ comment: replacement
75
+ - name: markup.underline.substitution.restructuredtext
76
+ captures:
77
+ "1":
78
+ name: punctuation.definition.substitution.restructuredtext
79
+ match: (\|)[^|]+(\|_{0,2})
80
+ comment: substitution
81
+ - name: meta.link.reference
82
+ captures:
83
+ "1":
84
+ name: string.other.link.title.restructuredtext
85
+ "2":
86
+ name: punctuation.definition.link.restructuredtext
87
+ match: \b(\w+)(_)\b
88
+ comment: links `...`_ or `...`__
89
+ - name: meta.link.reference
90
+ captures:
91
+ "1":
92
+ name: punctuation.definition.link.restructuredtext
93
+ "2":
94
+ name: string.other.link.title.restructuredtext
95
+ "3":
96
+ name: punctuation.definition.link.restructuredtext
97
+ match: (`)([\w\s]+)(`_)
98
+ comment: links `...`_ or `...`__
99
+ - name: meta.link.inline.restructuredtext
100
+ captures:
101
+ "6":
102
+ name: punctuation.definition.link.restructuredtext
103
+ "1":
104
+ name: punctuation.definition.link.restructuredtext
105
+ "2":
106
+ name: string.other.link.title.restructuredtext
107
+ "3":
108
+ name: punctuation.definition.location.restructuredtext
109
+ "4":
110
+ name: markup.underline.link.restructuredtext
111
+ "5":
112
+ name: punctuation.definition.location.restructuredtext
113
+ match: (`)([\w\s]+)\s+(<)(.*?)(>)(`_)
114
+ comment: "links `...`_ "
115
+ - name: meta.link.footnote.def.restructuredtext
116
+ captures:
117
+ "6":
118
+ name: punctuation.definition.constant.restructuredtext
119
+ "7":
120
+ name: punctuation.definition.constant.restructuredtext
121
+ "8":
122
+ name: string.other.footnote.restructuredtext
123
+ "1":
124
+ name: punctuation.definition.link.restructuredtext
125
+ "2":
126
+ name: constant.other.footnote.link.restructuredtext
127
+ "3":
128
+ name: punctuation.definition.constant.restructuredtext
129
+ match: ^(\.\.)\s+((\[)(((#?)[\w\s]*?)|\*)(\]))\s+(.*)
130
+ comment: replacement
131
+ - name: meta.link.footnote.numeric.restructuredtext
132
+ captures:
133
+ "1":
134
+ name: constant.other.footnote.link
135
+ "2":
136
+ name: punctuation.definition.constant.restructuredtext
137
+ "3":
138
+ name: punctuation.definition.constant.restructuredtext
139
+ "4":
140
+ name: punctuation.definition.constant.restructuredtext
141
+ match: ((\[)[0-9]+(\]))(_)
142
+ comment: "footnote reference: [0]_"
143
+ - name: meta.link.footnote.auto.restructuredtext
144
+ captures:
145
+ "1":
146
+ name: constant.other.footnote.link
147
+ "2":
148
+ name: punctuation.definition.constant.restructuredtext
149
+ "3":
150
+ name: punctuation.definition.constant.restructuredtext
151
+ "4":
152
+ name: punctuation.definition.constant.restructuredtext
153
+ match: ((\[#)[A-z0-9_]*(\]))(_)
154
+ comment: footnote reference [#]_ or [#foo]_
155
+ - name: meta.link.footnote.symbol.auto.restructuredtext
156
+ captures:
157
+ "1":
158
+ name: constant.other.footnote.link.restructuredtext
159
+ "2":
160
+ name: punctuation.definition.constant.restructuredtext
161
+ "3":
162
+ name: punctuation.definition.constant.restructuredtext
163
+ "4":
164
+ name: punctuation.definition.constant.restructuredtext
165
+ match: ((\[)\*(\]))(_)
166
+ comment: footnote reference [*]_
167
+ - name: meta.link.citation.def.restructuredtext
168
+ captures:
169
+ "6":
170
+ name: string.other.citation.restructuredtext
171
+ "1":
172
+ name: punctuation.definition.link.restructuredtext
173
+ "2":
174
+ name: constant.other.citation.link.restructuredtext
175
+ "3":
176
+ name: punctuation.definition.constant.restructuredtext
177
+ "4":
178
+ name: punctuation.definition.constant.restructuredtext
179
+ "5":
180
+ name: punctuation.definition.constant.restructuredtext
181
+ match: ^(\.\.)\s+((\[)[A-z][A-z0-9]*(\]))(_)\s+(.*)
182
+ comment: replacement
183
+ - name: meta.link.citation.restructuredtext
184
+ captures:
185
+ "1":
186
+ name: constant.other.citation.link.restructuredtext
187
+ "2":
188
+ name: punctuation.definition.constant.restructuredtext
189
+ "3":
190
+ name: punctuation.definition.constant.restructuredtext
191
+ "4":
192
+ name: punctuation.definition.constant.restructuredtext
193
+ match: ((\[)[A-z][A-z0-9_-]*(\]))(_)
194
+ comment: citation reference
195
+ - name: markup.raw.restructuredtext
196
+ captures:
197
+ "0":
198
+ name: punctuation.definition.raw.restructuredtext
199
+ begin: "``"
200
+ end: "``"
201
+ comment: inline literal
202
+ - name: markup.other.command.restructuredtext
203
+ captures:
204
+ "1":
205
+ name: punctuation.definition.intepreted.restructuredtext
206
+ "2":
207
+ name: punctuation.definition.intepreted.restructuredtext
208
+ match: (`)[^`]+(`)(?!_)
209
+ comment: intepreted text
210
+ - name: entity.name.tag.restructuredtext
211
+ captures:
212
+ "1":
213
+ name: punctuation.definition.field.restructuredtext
214
+ "2":
215
+ name: punctuation.definition.field.restructuredtext
216
+ match: (:)[A-z][A-z0-9 =\s\t_]*(:)
217
+ comment: field list
218
+ - name: markup.other.table.restructuredtext
219
+ captures:
220
+ "0":
221
+ name: punctuation.definition.table.restructuredtext
222
+ match: \+-[+-]+
223
+ comment: table
224
+ - name: markup.other.table.restructuredtext
225
+ captures:
226
+ "0":
227
+ name: punctuation.definition.table.restructuredtext
228
+ match: \+=[+=]+
229
+ comment: table
230
+ - name: markup.heading.restructuredtext
231
+ captures:
232
+ "1":
233
+ name: punctuation.definition.heading.restructuredtext
234
+ match: (^(=|-|~|`|#|"|\^|\+|\*){3,}$){1,1}?
235
+ - name: comment.line.double-dot.restructuredtext
236
+ begin: ^(\.\.)
237
+ beginCaptures:
238
+ "1":
239
+ name: punctuation.definition.comment.restructuredtext
240
+ end: $\n?
241
+ comment: comment
242
+ uuid: 62DA9AD6-36E1-4AB7-BB87-E933AD9FD1A4
243
+ patterns:
244
+ - begin: ^([ \t]*)(?=\S)
245
+ contentName: meta.paragraph.restructuredtext
246
+ end: ^(?!\1(?=\S))
247
+ patterns:
248
+ - include: "#inline"
249
+ keyEquivalent: ^~R
250
+ comment: syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit
@@ -0,0 +1,147 @@
1
+ ---
2
+ name: Setext
3
+ fileTypes:
4
+ - etx
5
+ - etx.txt
6
+ firstLineMatch: setext
7
+ scopeName: text.setext
8
+ repository:
9
+ underline:
10
+ name: markup.underline.setext
11
+ captures:
12
+ "1":
13
+ name: punctuation.definition.underline.setext
14
+ "2":
15
+ name: punctuation.definition.underline.setext
16
+ "3":
17
+ name: punctuation.definition.underline.setext
18
+ "4":
19
+ name: punctuation.definition.underline.setext
20
+ match: \b(_)\w+(?<!_)(_)\b|\b(_).+(?<!_)(_)\b
21
+ hotword:
22
+ name: meta.link.reference.setext
23
+ captures:
24
+ "0":
25
+ name: constant.other.reference.link.setext
26
+ "1":
27
+ name: punctuation.definition.reference.setext
28
+ match: \b[-\w.]*\w(?<!_)(_)\b
29
+ inline:
30
+ patterns:
31
+ - include: "#italic"
32
+ - include: "#bold"
33
+ - include: "#underline"
34
+ - include: "#hotword"
35
+ - include: "#link"
36
+ - include: "#doc_separator"
37
+ bold:
38
+ name: markup.bold.setext
39
+ captures:
40
+ "1":
41
+ name: punctuation.definition.bold.setext
42
+ "2":
43
+ name: punctuation.definition.bold.setext
44
+ match: ([*]{2}).+?([*]{2})
45
+ link:
46
+ captures:
47
+ "1":
48
+ name: punctuation.definition.link.setext
49
+ "2":
50
+ name: markup.underline.link.setext
51
+ "3":
52
+ name: punctuation.definition.link.setext
53
+ match: (<)((?i:mailto|https?|ftp|news)://.*?)(>)
54
+ comment: Not actually part of setext, added for Tidbits.
55
+ doc_separator:
56
+ name: meta.separator.document.setext
57
+ captures:
58
+ "1":
59
+ name: punctuation.definition.separator.setext
60
+ match: \s*(\$\$)$\n?
61
+ italic:
62
+ name: markup.italic.setext
63
+ captures:
64
+ "1":
65
+ name: punctuation.definition.italic.setext
66
+ "2":
67
+ name: punctuation.definition.italic.setext
68
+ match: (~)\w+(~)
69
+ uuid: FB227CE6-DC4C-4632-BCA3-965AE0D8E419
70
+ patterns:
71
+ - include: "#inline"
72
+ - name: meta.header.setext
73
+ captures:
74
+ "1":
75
+ name: keyword.other.setext
76
+ "2":
77
+ name: punctuation.separator.key-value.setext
78
+ "3":
79
+ name: string.unquoted.setext
80
+ match: ^(Subject|Date|From)(:) (.+)
81
+ - name: markup.heading.1.setext
82
+ match: ^={3,}\s*$\n?
83
+ - name: markup.heading.2.setext
84
+ match: ^-{3,}\s*$\n?
85
+ - name: markup.quote.setext
86
+ captures:
87
+ "1":
88
+ name: punctuation.definition.quote.setext
89
+ begin: ^(>)\s
90
+ end: $
91
+ patterns:
92
+ - include: "#inline"
93
+ - name: markup.other.bullet.setext
94
+ captures:
95
+ "1":
96
+ name: punctuation.definition.bullet.setext
97
+ begin: ^([*])\s
98
+ end: $
99
+ patterns:
100
+ - include: "#inline"
101
+ - name: markup.raw.setext
102
+ endCaptures:
103
+ "0":
104
+ name: punctuation.definition.raw.end.setext
105
+ begin: "`"
106
+ beginCaptures:
107
+ "0":
108
+ name: punctuation.definition.raw.begin.setext
109
+ end: "`"
110
+ - name: meta.note.def.setext
111
+ captures:
112
+ "7":
113
+ name: punctuation.definition.string.end.setext
114
+ "1":
115
+ name: punctuation.definition.note.setext
116
+ "2":
117
+ name: constant.other.reference.note.setext
118
+ "3":
119
+ name: punctuation.definition.reference.setext
120
+ "4":
121
+ name: string.quoted.other.note.setext
122
+ "5":
123
+ name: punctuation.definition.string.begin.setext
124
+ match: ^(\.{2}) ((_)[-\w.]+) +((\()(.+(\))|.+))$
125
+ - name: meta.link.reference.def.setext
126
+ captures:
127
+ "1":
128
+ name: punctuation.definition.reference.setext
129
+ "2":
130
+ name: constant.other.reference.link.setext
131
+ "3":
132
+ name: punctuation.definition.reference.setext
133
+ "4":
134
+ name: markup.underline.link.setext
135
+ match: ^(\.{2}) ((_)[-\w.]+) +(.{2,})$
136
+ - name: comment.line.double-dot.setext
137
+ captures:
138
+ "1":
139
+ name: punctuation.definition.comment.setext
140
+ match: ^(\.{2}) (?![.]).+$\n?
141
+ - name: comment.block.logical_end_of_text.setext
142
+ captures:
143
+ "1":
144
+ name: punctuation.definition.comment.setext
145
+ begin: ^(\.{2})$
146
+ end: not(?<=possible)
147
+ keyEquivalent: ^~S