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,27 @@
1
+ ---
2
+ name: HTML (ASP)
3
+ fileTypes:
4
+ - asp
5
+ scopeName: text.html.asp
6
+ uuid: 27798CC6-6B1D-11D9-B8FA-000D93589AF6
7
+ foldingStartMarker: (<(?i:(head|table|div|style|script|ul|ol|form|dl))\b.*?>|\{)
8
+ patterns:
9
+ - name: source.asp.embedded.html
10
+ endCaptures:
11
+ "0":
12
+ name: punctuation.section.embedded.end.asp
13
+ begin: <%=?
14
+ beginCaptures:
15
+ "0":
16
+ name: punctuation.section.embedded.begin.asp
17
+ end: "%>"
18
+ patterns:
19
+ - name: comment.line.apostrophe.asp
20
+ captures:
21
+ "1":
22
+ name: punctuation.definition.comment.asp
23
+ match: (').*?(?=%>)
24
+ - include: source.asp
25
+ - include: text.html.basic
26
+ foldingStopMarker: (</(?i:(head|table|div|style|script|ul|ol|form|dl))>|\})
27
+ keyEquivalent: ^~A
@@ -0,0 +1,362 @@
1
+ ---
2
+ name: HTML
3
+ fileTypes:
4
+ - html
5
+ - htm
6
+ - shtml
7
+ - xhtml
8
+ - phtml
9
+ - php
10
+ - inc
11
+ - tmpl
12
+ - tpl
13
+ firstLineMatch: <!DOCTYPE|<(?i:html)
14
+ scopeName: text.html.basic
15
+ repository:
16
+ tag-stuff:
17
+ patterns:
18
+ - include: "#tag-id-attribute"
19
+ - include: "#tag-generic-attribute"
20
+ - include: "#string-double-quoted"
21
+ - include: "#string-single-quoted"
22
+ - include: "#embedded-code"
23
+ string-double-quoted:
24
+ name: string.quoted.double.html
25
+ endCaptures:
26
+ "0":
27
+ name: punctuation.definition.string.end.html
28
+ begin: "\""
29
+ beginCaptures:
30
+ "0":
31
+ name: punctuation.definition.string.begin.html
32
+ end: "\""
33
+ patterns:
34
+ - include: "#embedded-code"
35
+ - include: "#entities"
36
+ php:
37
+ patterns:
38
+ - name: source.php.embedded.line.empty.html
39
+ captures:
40
+ "1":
41
+ name: source.php.embedded.line.empty.whitespace.html
42
+ match: <\?(?i:php|=)?(\s*\?)>
43
+ - name: source.php.embedded.block.html
44
+ begin: (?:^\s*)(?=<\?(?i:php|=)?(?!.*\?>))
45
+ applyEndPatternLast: 1
46
+ end: (?<=\?>)(?:\s*$\n)?
47
+ patterns:
48
+ - include: source.php
49
+ comment: match only multi-line PHP with leading whitespace
50
+ - name: source.php.embedded.line.html
51
+ begin: (?=<\?(?i:php|=)?)
52
+ applyEndPatternLast: 1
53
+ end: (?<=\?>)
54
+ patterns:
55
+ - include: source.php
56
+ entities:
57
+ patterns:
58
+ - name: constant.character.entity.html
59
+ captures:
60
+ "1":
61
+ name: punctuation.definition.entity.html
62
+ "3":
63
+ name: punctuation.definition.entity.html
64
+ match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
65
+ - name: invalid.illegal.bad-ampersand.html
66
+ match: "&"
67
+ string-single-quoted:
68
+ name: string.quoted.single.html
69
+ endCaptures:
70
+ "0":
71
+ name: punctuation.definition.string.end.html
72
+ begin: "'"
73
+ beginCaptures:
74
+ "0":
75
+ name: punctuation.definition.string.begin.html
76
+ end: "'"
77
+ patterns:
78
+ - include: "#embedded-code"
79
+ - include: "#entities"
80
+ python:
81
+ name: source.python.embedded.html
82
+ begin: (?:^\s*)<\?python(?!.*\?>)
83
+ end: \?>(?:\s*$\n)?
84
+ patterns:
85
+ - include: source.python
86
+ tag-id-attribute:
87
+ name: meta.attribute-with-value.id.html
88
+ captures:
89
+ "1":
90
+ name: entity.other.attribute-name.id.html
91
+ "2":
92
+ name: punctuation.separator.key-value.html
93
+ begin: \b(id)\b\s*(=)
94
+ end: (?<='|")
95
+ patterns:
96
+ - name: string.quoted.double.html
97
+ endCaptures:
98
+ "0":
99
+ name: punctuation.definition.string.end.html
100
+ begin: "\""
101
+ contentName: meta.toc-list.id.html
102
+ beginCaptures:
103
+ "0":
104
+ name: punctuation.definition.string.begin.html
105
+ end: "\""
106
+ patterns:
107
+ - include: "#embedded-code"
108
+ - include: "#entities"
109
+ - name: string.quoted.single.html
110
+ endCaptures:
111
+ "0":
112
+ name: punctuation.definition.string.end.html
113
+ begin: "'"
114
+ contentName: meta.toc-list.id.html
115
+ beginCaptures:
116
+ "0":
117
+ name: punctuation.definition.string.begin.html
118
+ end: "'"
119
+ patterns:
120
+ - include: "#embedded-code"
121
+ - include: "#entities"
122
+ tag-generic-attribute:
123
+ name: entity.other.attribute-name.html
124
+ match: \b([a-zA-Z\-:]+)
125
+ ruby:
126
+ patterns:
127
+ - name: comment.block.erb
128
+ captures:
129
+ "0":
130
+ name: punctuation.definition.comment.erb
131
+ begin: <%+#
132
+ end: "%>"
133
+ - name: source.ruby.embedded.html
134
+ captures:
135
+ "0":
136
+ name: punctuation.section.embedded.ruby
137
+ begin: <%+(?!>)=?
138
+ end: -?%>
139
+ patterns:
140
+ - name: comment.line.number-sign.ruby
141
+ captures:
142
+ "1":
143
+ name: punctuation.definition.comment.ruby
144
+ match: (#).*?(?=-?%>)
145
+ - include: source.ruby
146
+ - name: source.ruby.nitro.embedded.html
147
+ captures:
148
+ "0":
149
+ name: punctuation.section.embedded.ruby.nitro
150
+ begin: <\?r(?!>)=?
151
+ end: -?\?>
152
+ patterns:
153
+ - name: comment.line.number-sign.ruby.nitro
154
+ captures:
155
+ "1":
156
+ name: punctuation.definition.comment.ruby.nitro
157
+ match: (#).*?(?=-?\?>)
158
+ - include: source.ruby
159
+ smarty:
160
+ patterns:
161
+ - captures:
162
+ "1":
163
+ name: source.smarty.embedded.html
164
+ "2":
165
+ name: support.function.built-in.smarty
166
+ begin: (\{(literal)\})
167
+ end: (\{/(literal)\})
168
+ - name: source.smarty.embedded.html
169
+ begin: "{{|{"
170
+ end: "}}|}"
171
+ disabled: 1
172
+ patterns:
173
+ - include: source.smarty
174
+ embedded-code:
175
+ patterns:
176
+ - include: "#ruby"
177
+ - include: "#php"
178
+ - include: "#smarty"
179
+ - include: "#python"
180
+ uuid: 17994EC8-6B1D-11D9-AC3A-000D93589AF6
181
+ foldingStartMarker: |-
182
+ (?x)
183
+ (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?>
184
+ |<!--(?!.*--\s*>)
185
+ |^<!--\ \#tminclude\ (?>.*?-->)$
186
+ |<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
187
+ |\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
188
+ |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
189
+ )
190
+ patterns:
191
+ - name: meta.tag.any.html
192
+ endCaptures:
193
+ "1":
194
+ name: punctuation.definition.tag.html
195
+ "2":
196
+ name: meta.scope.between-tag-pair.html
197
+ "3":
198
+ name: entity.name.tag.html
199
+ "4":
200
+ name: punctuation.definition.tag.html
201
+ begin: (<)([a-zA-Z0-9:]+)(?=[^>]*></\2>)
202
+ beginCaptures:
203
+ "1":
204
+ name: punctuation.definition.tag.html
205
+ "2":
206
+ name: entity.name.tag.html
207
+ end: (>(<)/)(\2)(>)
208
+ patterns:
209
+ - include: "#tag-stuff"
210
+ - name: meta.tag.preprocessor.xml.html
211
+ captures:
212
+ "1":
213
+ name: punctuation.definition.tag.html
214
+ "2":
215
+ name: entity.name.tag.xml.html
216
+ begin: (<\?)(xml)
217
+ end: (\?>)
218
+ patterns:
219
+ - include: "#tag-generic-attribute"
220
+ - include: "#string-double-quoted"
221
+ - include: "#string-single-quoted"
222
+ - name: comment.block.html
223
+ captures:
224
+ "0":
225
+ name: punctuation.definition.comment.html
226
+ begin: <!--
227
+ end: --\s*>
228
+ patterns:
229
+ - name: invalid.illegal.bad-comments-or-CDATA.html
230
+ match: --
231
+ - include: "#embedded-code"
232
+ - name: meta.tag.sgml.html
233
+ captures:
234
+ "0":
235
+ name: punctuation.definition.tag.html
236
+ begin: <!
237
+ end: ">"
238
+ patterns:
239
+ - name: meta.tag.sgml.doctype.html
240
+ captures:
241
+ "1":
242
+ name: entity.name.tag.doctype.html
243
+ begin: (DOCTYPE)
244
+ end: (?=>)
245
+ patterns:
246
+ - name: string.quoted.double.doctype.identifiers-and-DTDs.html
247
+ match: "\"[^\">]*\""
248
+ - name: constant.other.inline-data.html
249
+ begin: \[CDATA\[
250
+ end: "]](?=>)"
251
+ - name: invalid.illegal.bad-comments-or-CDATA.html
252
+ match: (\s*)(?!--|>)\S(\s*)
253
+ - include: "#embedded-code"
254
+ - name: source.css.embedded.html
255
+ captures:
256
+ "1":
257
+ name: punctuation.definition.tag.html
258
+ "2":
259
+ name: entity.name.tag.style.html
260
+ "3":
261
+ name: punctuation.definition.tag.html
262
+ begin: (?:^\s+)?(<)((?i:style))\b(?![^>]*/>)
263
+ end: (</)((?i:style))(>)(?:\s*\n)?
264
+ patterns:
265
+ - include: "#tag-stuff"
266
+ - begin: (>)
267
+ beginCaptures:
268
+ "1":
269
+ name: punctuation.definition.tag.html
270
+ end: (?=</(?i:style))
271
+ patterns:
272
+ - include: "#embedded-code"
273
+ - include: source.css
274
+ - name: source.js.embedded.html
275
+ endCaptures:
276
+ "2":
277
+ name: punctuation.definition.tag.html
278
+ begin: (?:^\s+)?(<)((?i:script))\b(?![^>]*/>)
279
+ beginCaptures:
280
+ "1":
281
+ name: punctuation.definition.tag.html
282
+ "2":
283
+ name: entity.name.tag.script.html
284
+ end: (?<=</(script|SCRIPT))(>)(?:\s*\n)?
285
+ patterns:
286
+ - include: "#tag-stuff"
287
+ - captures:
288
+ "1":
289
+ name: punctuation.definition.tag.html
290
+ "2":
291
+ name: entity.name.tag.script.html
292
+ begin: (?<!</(?:script|SCRIPT))(>)
293
+ end: (</)((?i:script))
294
+ patterns:
295
+ - name: comment.line.double-slash.js
296
+ captures:
297
+ "1":
298
+ name: punctuation.definition.comment.js
299
+ match: (//).*?((?=</script)|$\n?)
300
+ - name: comment.block.js
301
+ captures:
302
+ "0":
303
+ name: punctuation.definition.comment.js
304
+ begin: /\*
305
+ end: \*/|(?=</script)
306
+ - include: "#php"
307
+ - include: source.js
308
+ - name: meta.tag.structure.any.html
309
+ captures:
310
+ "1":
311
+ name: punctuation.definition.tag.html
312
+ "2":
313
+ name: entity.name.tag.structure.any.html
314
+ begin: (</?)((?i:body|head|html)\b)
315
+ end: (>)
316
+ patterns:
317
+ - include: "#tag-stuff"
318
+ - name: meta.tag.block.any.html
319
+ captures:
320
+ "1":
321
+ name: punctuation.definition.tag.html
322
+ "2":
323
+ name: entity.name.tag.block.any.html
324
+ begin: (</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\b)
325
+ end: (>)
326
+ patterns:
327
+ - include: "#tag-stuff"
328
+ - name: meta.tag.inline.any.html
329
+ captures:
330
+ "1":
331
+ name: punctuation.definition.tag.html
332
+ "2":
333
+ name: entity.name.tag.inline.any.html
334
+ begin: (</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\b)
335
+ end: (>)
336
+ patterns:
337
+ - include: "#tag-stuff"
338
+ - name: meta.tag.other.html
339
+ captures:
340
+ "1":
341
+ name: punctuation.definition.tag.html
342
+ "2":
343
+ name: entity.name.tag.other.html
344
+ begin: (</?)([a-zA-Z0-9:]+)
345
+ end: (>)
346
+ patterns:
347
+ - include: "#tag-stuff"
348
+ - include: "#entities"
349
+ - name: invalid.illegal.incomplete.html
350
+ match: <>
351
+ - name: invalid.illegal.bad-angle-bracket.html
352
+ match: <
353
+ foldingStopMarker: |-
354
+ (?x)
355
+ (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>
356
+ |^(?!.*?<!--).*?--\s*>
357
+ |^<!--\ end\ tminclude\ -->$
358
+ |<\?(?:php)?.*\bend(if|for(each)?|while)\b
359
+ |\{\{?/(if|foreach|capture|literal|foreach|php|section|strip)
360
+ |^[^{]*\}
361
+ )
362
+ keyEquivalent: ^~H
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: ColdFusion
3
+ fileTypes:
4
+ - cfm
5
+ - cfml
6
+ - cfc
7
+ bundleUUID: 1A09BE0B-E81A-4CB7-AF69-AFC845162D1F
8
+ scopeName: text.html.cfm
9
+ repository:
10
+ tag-stuff:
11
+ patterns:
12
+ - include: "#tag-id-attribute"
13
+ - include: "#tag-generic-attribute"
14
+ - include: "#string-double-quoted"
15
+ - include: "#string-single-quoted"
16
+ - include: "#embedded-code"
17
+ string-double-quoted:
18
+ name: string.quoted.double.cfml
19
+ begin: "\""
20
+ end: "\""
21
+ patterns:
22
+ - include: "#embedded-code"
23
+ - include: "#entities"
24
+ coldfusion-comment:
25
+ name: comment.block.cfml
26
+ begin: <!---
27
+ end: --->
28
+ patterns:
29
+ - include: "#coldfusion-comment"
30
+ entities:
31
+ patterns:
32
+ - name: constant.character.entity.html
33
+ match: "&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);"
34
+ - name: invalid.illegal.bad-ampersand.html
35
+ match: "&"
36
+ string-single-quoted:
37
+ name: string.quoted.single.cfml
38
+ begin: "'"
39
+ end: "'"
40
+ patterns:
41
+ - include: "#embedded-code"
42
+ - include: "#entities"
43
+ tag-id-attribute:
44
+ name: meta.attribute-with-value.id.cfml
45
+ captures:
46
+ "1":
47
+ name: entity.other.attribute-name.id.html
48
+ begin: \b(id)\b\s*=
49
+ end: (?<='|")
50
+ patterns:
51
+ - name: string.quoted.double.cfml
52
+ begin: "\""
53
+ contentName: meta.toc-list.id.cfml
54
+ end: "\""
55
+ patterns:
56
+ - include: "#embedded-code"
57
+ - include: "#entities"
58
+ - name: string.quoted.single.cfml
59
+ begin: "'"
60
+ contentName: meta.toc-list.id.cfml
61
+ end: "'"
62
+ patterns:
63
+ - include: "#embedded-code"
64
+ - include: "#entities"
65
+ tag-generic-attribute:
66
+ name: entity.other.attribute-name.cfml
67
+ match: \b([a-zA-Z\-:]+)
68
+ embedded-code:
69
+ patterns: []
70
+
71
+ uuid: 97CAD6F7-0807-4EB4-876E-DA9E9C1CEC14
72
+ foldingStartMarker: |-
73
+ (?x)
74
+ (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl|cfloop|cfif|cfswitch|cfcomponent)\b.*?>
75
+ |<!---(?!.*---\s*>)
76
+ )
77
+ patterns:
78
+ - name: meta.tag.cfoutput.cfml
79
+ captures:
80
+ "1":
81
+ name: entity.name.tag.cfoutput.cfml
82
+ begin: (?:^\s+)?<((?i:cfoutput))\b(?![^>]*/>)
83
+ end: </((?i:cfoutput))>(?:\s*\n)?
84
+ patterns:
85
+ - include: "#tag-stuff"
86
+ - name: meta.scope.output.cfml
87
+ begin: (?<=>)
88
+ end: (?=</(?i:cfoutput))
89
+ patterns:
90
+ - include: $self
91
+ - name: meta.tag.cfquery.cfml
92
+ captures:
93
+ "1":
94
+ name: entity.name.tag.cfquery.cfml
95
+ begin: (?:^\s+)?<((?i:cfquery))\b(?![^>]*/>)
96
+ end: </((?i:cfquery))>(?:\s*\n)?
97
+ patterns:
98
+ - include: "#tag-stuff"
99
+ - name: source.sql.embedded
100
+ begin: (?<=>)
101
+ end: (?=</(?i:cfquery))
102
+ patterns:
103
+ - include: source.sql
104
+ - name: meta.tag.any.cfml
105
+ begin: </?((?i:cf)([a-zA-Z0-9]+))(?=[^>]*>)
106
+ beginCaptures:
107
+ "1":
108
+ name: entity.name.tag.cfml
109
+ end: ">"
110
+ patterns:
111
+ - include: "#tag-stuff"
112
+ - include: "#coldfusion-comment"
113
+ - include: text.html.basic
114
+ foldingStopMarker: |-
115
+ (?x)
116
+ (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl|cfloop|cfif|cfswitch|cfcomponent)>
117
+ |^(?!.*?<!---).*?---\s*>
118
+ )
119
+ keyEquivalent: ^~@c