ultraviolet 0.10.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. data/.gitmodules +3 -0
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +28 -0
  4. data/Rakefile +18 -47
  5. data/Readme.md +89 -0
  6. data/bin/theme2latexrender +0 -0
  7. data/bin/theme2xhtmlrender +0 -0
  8. data/bin/uv +0 -0
  9. data/lib/uv.rb +78 -75
  10. data/lib/uv/render_processor.rb +128 -119
  11. data/lib/uv/utility.rb +62 -62
  12. data/lib/uv/version.rb +3 -0
  13. data/spec/spec_helper.rb +2 -0
  14. data/spec/ultraviolet_spec.rb +13 -0
  15. data/ultraviolet.gemspec +15 -0
  16. metadata +123 -271
  17. data/History.txt +0 -25
  18. data/Manifest.txt +0 -233
  19. data/README.txt +0 -52
  20. data/syntax/actionscript.syntax +0 -97
  21. data/syntax/active4d.syntax +0 -276
  22. data/syntax/active4d_html.syntax +0 -311
  23. data/syntax/active4d_ini.syntax +0 -50
  24. data/syntax/active4d_library.syntax +0 -21
  25. data/syntax/ada.syntax +0 -33
  26. data/syntax/antlr.syntax +0 -151
  27. data/syntax/apache.syntax +0 -191
  28. data/syntax/applescript.syntax +0 -384
  29. data/syntax/asp.syntax +0 -70
  30. data/syntax/asp_vb.net.syntax +0 -129
  31. data/syntax/bibtex.syntax +0 -151
  32. data/syntax/blog_html.syntax +0 -41
  33. data/syntax/blog_markdown.syntax +0 -42
  34. data/syntax/blog_text.syntax +0 -27
  35. data/syntax/blog_textile.syntax +0 -27
  36. data/syntax/build.syntax +0 -53
  37. data/syntax/bulletin_board.syntax +0 -287
  38. data/syntax/c++.syntax +0 -109
  39. data/syntax/c.syntax +0 -326
  40. data/syntax/cake.syntax +0 -55
  41. data/syntax/camlp4.syntax +0 -36
  42. data/syntax/cm.syntax +0 -32
  43. data/syntax/coldfusion.syntax +0 -119
  44. data/syntax/context_free.syntax +0 -176
  45. data/syntax/cs.syntax +0 -59
  46. data/syntax/css.syntax +0 -195
  47. data/syntax/css_experimental.syntax +0 -1925
  48. data/syntax/csv.syntax +0 -68
  49. data/syntax/d.syntax +0 -142
  50. data/syntax/diff.syntax +0 -81
  51. data/syntax/dokuwiki.syntax +0 -204
  52. data/syntax/dot.syntax +0 -47
  53. data/syntax/doxygen.syntax +0 -43
  54. data/syntax/dylan.syntax +0 -62
  55. data/syntax/eiffel.syntax +0 -78
  56. data/syntax/erlang.syntax +0 -922
  57. data/syntax/f-script.syntax +0 -80
  58. data/syntax/fortran.syntax +0 -141
  59. data/syntax/fxscript.syntax +0 -142
  60. data/syntax/greasemonkey.syntax +0 -34
  61. data/syntax/gri.syntax +0 -83
  62. data/syntax/groovy.syntax +0 -191
  63. data/syntax/gtd.syntax +0 -22
  64. data/syntax/gtdalt.syntax +0 -143
  65. data/syntax/haml.syntax +0 -88
  66. data/syntax/haskell.syntax +0 -88
  67. data/syntax/html-asp.syntax +0 -27
  68. data/syntax/html.syntax +0 -362
  69. data/syntax/html_django.syntax +0 -36
  70. data/syntax/html_for_asp.net.syntax +0 -424
  71. data/syntax/html_mason.syntax +0 -119
  72. data/syntax/html_rails.syntax +0 -40
  73. data/syntax/html_tcl.syntax +0 -26
  74. data/syntax/icalendar.syntax +0 -32
  75. data/syntax/inform.syntax +0 -48
  76. data/syntax/ini.syntax +0 -55
  77. data/syntax/installer_distribution_script.syntax +0 -77
  78. data/syntax/io.syntax +0 -81
  79. data/syntax/java.syntax +0 -211
  80. data/syntax/javaproperties.syntax +0 -20
  81. data/syntax/javascript.syntax +0 -256
  82. data/syntax/javascript_+_prototype.syntax +0 -72
  83. data/syntax/javascript_+_prototype_bracketed.syntax +0 -140
  84. data/syntax/jquery_javascript.syntax +0 -114
  85. data/syntax/json.syntax +0 -136
  86. data/syntax/languagedefinition.syntax +0 -708
  87. data/syntax/latex.syntax +0 -566
  88. data/syntax/latex_beamer.syntax +0 -41
  89. data/syntax/latex_log.syntax +0 -50
  90. data/syntax/latex_memoir.syntax +0 -64
  91. data/syntax/lexflex.syntax +0 -219
  92. data/syntax/lighttpd.syntax +0 -54
  93. data/syntax/lilypond.syntax +0 -492
  94. data/syntax/lisp.syntax +0 -61
  95. data/syntax/literate_haskell.syntax +0 -24
  96. data/syntax/logo.syntax +0 -29
  97. data/syntax/logtalk.syntax +0 -152
  98. data/syntax/lua.syntax +0 -86
  99. data/syntax/m.syntax +0 -142
  100. data/syntax/macports_portfile.syntax +0 -163
  101. data/syntax/mail.syntax +0 -118
  102. data/syntax/makefile.syntax +0 -36
  103. data/syntax/man.syntax +0 -17
  104. data/syntax/markdown.syntax +0 -543
  105. data/syntax/mediawiki.syntax +0 -567
  106. data/syntax/mel.syntax +0 -92
  107. data/syntax/mips.syntax +0 -66
  108. data/syntax/mod_perl.syntax +0 -50
  109. data/syntax/modula-3.syntax +0 -47
  110. data/syntax/moinmoin.syntax +0 -189
  111. data/syntax/mootools.syntax +0 -572
  112. data/syntax/movable_type.syntax +0 -162
  113. data/syntax/multimarkdown.syntax +0 -39
  114. data/syntax/objective-c++.syntax +0 -18
  115. data/syntax/objective-c.syntax +0 -233
  116. data/syntax/ocaml.syntax +0 -764
  117. data/syntax/ocamllex.syntax +0 -167
  118. data/syntax/ocamlyacc.syntax +0 -184
  119. data/syntax/opengl.syntax +0 -14
  120. data/syntax/pascal.syntax +0 -77
  121. data/syntax/perl.syntax +0 -1115
  122. data/syntax/php.syntax +0 -1253
  123. data/syntax/plain_text.syntax +0 -32
  124. data/syntax/pmwiki.syntax +0 -113
  125. data/syntax/postscript.syntax +0 -114
  126. data/syntax/processing.syntax +0 -106
  127. data/syntax/prolog.syntax +0 -40
  128. data/syntax/property_list.syntax +0 -635
  129. data/syntax/python.syntax +0 -868
  130. data/syntax/python_django.syntax +0 -21
  131. data/syntax/qmake_project.syntax +0 -114
  132. data/syntax/qt_c++.syntax +0 -26
  133. data/syntax/quake3_config.syntax +0 -32
  134. data/syntax/r.syntax +0 -81
  135. data/syntax/r_console.syntax +0 -16
  136. data/syntax/ragel.syntax +0 -201
  137. data/syntax/rd_r_documentation.syntax +0 -91
  138. data/syntax/regexp.syntax +0 -50
  139. data/syntax/regular_expressions_oniguruma.syntax +0 -107
  140. data/syntax/regular_expressions_python.syntax +0 -109
  141. data/syntax/release_notes.syntax +0 -46
  142. data/syntax/remind.syntax +0 -253
  143. data/syntax/restructuredtext.syntax +0 -250
  144. data/syntax/rez.syntax +0 -80
  145. data/syntax/ruby.syntax +0 -1035
  146. data/syntax/ruby_experimental.syntax +0 -145
  147. data/syntax/ruby_on_rails.syntax +0 -88
  148. data/syntax/s5.syntax +0 -69
  149. data/syntax/scheme.syntax +0 -347
  150. data/syntax/scilab.syntax +0 -41
  151. data/syntax/setext.syntax +0 -147
  152. data/syntax/shell-unix-generic.syntax +0 -384
  153. data/syntax/slate.syntax +0 -149
  154. data/syntax/smarty.syntax +0 -63
  155. data/syntax/sql.syntax +0 -237
  156. data/syntax/sql_rails.syntax +0 -18
  157. data/syntax/ssh-config.syntax +0 -33
  158. data/syntax/standard_ml.syntax +0 -121
  159. data/syntax/strings_file.syntax +0 -39
  160. data/syntax/subversion_commit_message.syntax +0 -36
  161. data/syntax/sweave.syntax +0 -84
  162. data/syntax/swig.syntax +0 -57
  163. data/syntax/tcl.syntax +0 -152
  164. data/syntax/template_toolkit.syntax +0 -121
  165. data/syntax/tex.syntax +0 -86
  166. data/syntax/tex_math.syntax +0 -49
  167. data/syntax/textile.syntax +0 -215
  168. data/syntax/tsv.syntax +0 -50
  169. data/syntax/twiki.syntax +0 -241
  170. data/syntax/txt2tags.syntax +0 -79
  171. data/syntax/vectorscript.syntax +0 -57
  172. data/syntax/xhtml_1.0.syntax +0 -4027
  173. data/syntax/xml.syntax +0 -180
  174. data/syntax/xml_strict.syntax +0 -92
  175. data/syntax/xsl.syntax +0 -60
  176. data/syntax/yaml.syntax +0 -160
  177. data/syntax/yui_javascript.syntax +0 -176
  178. data/test/test_uv.rb +0 -0
@@ -1,567 +0,0 @@
1
- ---
2
- name: Mediawiki
3
- fileTypes:
4
- - mediawiki
5
- - wikipedia
6
- - wiki
7
- scopeName: text.html.mediawiki
8
- repository:
9
- comments:
10
- patterns:
11
- - name: comment.block.html.mediawiki
12
- begin: <!--
13
- end: --\s*>
14
- patterns:
15
- - name: invalid.illegal.bad-comments-or-CDATA.html.mediawiki
16
- match: --
17
- inline:
18
- patterns:
19
- - captures:
20
- "1":
21
- name: constant.other.date-time.mediawiki
22
- "2":
23
- name: invalid.illegal.too-many-tildes.mediawiki
24
- match: (~~~~~)(~{0,2})(?!~)
25
- - name: constant.other.signature.mediawiki
26
- match: ~~~~?
27
- comment: 3 ~s for sig, 4 for sig + timestamp
28
- - include: "#link"
29
- - include: "#style"
30
- - include: "#template"
31
- - include: "#block_html"
32
- - include: "#comments"
33
- template:
34
- patterns:
35
- - name: meta.template-parameter.mediawiki
36
- captures:
37
- "1":
38
- name: variable.parameter.template.numeric.mediawiki
39
- match: "{{{[ ]*([0-9]+)[ ]*}}}"
40
- - name: meta.template-parameter.mediawiki
41
- captures:
42
- "1":
43
- name: variable.parameter.template.named.mediawiki
44
- match: "{{{[ ]*(.*?)[ ]*}}}"
45
- - name: meta.template.parser-function.mediawiki
46
- endCaptures:
47
- "1":
48
- name: punctuation.fix_this_later.template.mediawiki
49
- begin: ({{)(?=[ ]*#)
50
- beginCaptures:
51
- "1":
52
- name: punctuation.fix_this_later.template.mediawiki
53
- "2":
54
- name: meta.function-call.template.mediawiki
55
- end: (}})
56
- patterns:
57
- - include: "#inline"
58
- comment: "\n\
59
- \t\t\t\t\t\tWhy oh why did mediawiki have to add these??\n\
60
- \t\t\t\t\t"
61
- - name: meta.template.mediawiki
62
- endCaptures:
63
- "1":
64
- name: punctuation.fix_this_later.template.mediawiki
65
- begin: ({{)([^{}\|]+)?
66
- beginCaptures:
67
- "1":
68
- name: punctuation.fix_this_later.template.mediawiki
69
- "2":
70
- name: meta.function-call.template.mediawiki
71
- end: (}})
72
- patterns:
73
- - include: "#comments"
74
- - begin: (\|)\s*(=)
75
- contentName: comment.block.template-hack.mediawiki
76
- beginCaptures:
77
- "1":
78
- name: punctuation.fix_this_later.pipe.mediawiki
79
- "2":
80
- name: punctuation.fix_this_later.equals-sign.mediawiki
81
- end: (?=[|}])
82
- - begin: (\|)(([^{}\|=]+)(=))?
83
- contentName: meta.value.template.mediawiki
84
- beginCaptures:
85
- "1":
86
- name: punctuation.fix_this_later.pipe.mediawiki
87
- "2":
88
- name: variable.parameter.template.mediawiki
89
- "3":
90
- name: punctuation.fix_this_later.equals-sign.mediawiki
91
- end: (?=[|}])
92
- patterns:
93
- - include: "#inline"
94
- - name: punctuation.fix_this_later.pipe.mediawiki
95
- match: \|
96
- comment: "\n\
97
- \t\t\t\t\t\tI am not sure I really like the scope of\n\
98
- \t\t\t\t\t\tmeta.function-call for templates, but it seems like\n\
99
- \t\t\t\t\t\tthe closest thing to what a template is really doing,\n\
100
- \t\t\t\t\t\twith parameters, etc.\n\
101
- \t\t\t\t\t"
102
- comment: "\n\
103
- \t\t\t\tThis repository item covers templates and parser functions.\n\
104
- \t\t\t"
105
- entities:
106
- patterns:
107
- - name: constant.character.entity.html.mediawiki
108
- match: "&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);"
109
- - name: invalid.illegal.bad-ampersand.html.mediawiki
110
- match: "&"
111
- comment: "\n\
112
- \t\t\t\tMediawiki supports Unicode, so these should not usually be\n\
113
- \t\t\t\tnecessary, but they do show up on pages from time to time.\n\
114
- \t\t\t"
115
- style_in_link:
116
- patterns:
117
- - name: markup.bold.mediawiki
118
- begin: "'''"
119
- end: "'''"
120
- patterns:
121
- - include: "#style_in_link"
122
- - name: markup.italic.mediawiki
123
- begin: "''"
124
- end: "''"
125
- patterns:
126
- - include: "#style_in_link"
127
- - captures:
128
- "1":
129
- name: meta.tag.inline.bold.html.mediawiki
130
- begin: (<(b|strong)>)
131
- contentName: markup.bold.html.mediawiki
132
- end: (</\2>)
133
- patterns:
134
- - include: "#style_in_link"
135
- - captures:
136
- "1":
137
- name: meta.tag.inline.italic.html.mediawiki
138
- begin: (<(i|em)>)
139
- contentName: markup.italic.html.mediawiki
140
- end: (</\2>)
141
- patterns:
142
- - include: "#style_in_link"
143
- - captures:
144
- "1":
145
- name: meta.tag.inline.strikethrough.html.mediawiki
146
- begin: (<(s|strike)>)
147
- contentName: markup.other.strikethrough.html.mediawiki
148
- end: (</\2>)
149
- patterns:
150
- - include: "#style_in_link"
151
- - captures:
152
- "1":
153
- name: meta.tag.inline.underline.html.mediawiki
154
- begin: (<(u)>)
155
- contentName: markup.underline.html.mediawiki
156
- end: (</\2>)
157
- patterns:
158
- - include: "#style_in_link"
159
- - captures:
160
- "1":
161
- name: meta.tag.inline.raw.html.mediawiki
162
- begin: (<(tt|code)>)
163
- contentName: markup.raw.html.mediawiki
164
- end: (</\2>)
165
- patterns:
166
- - include: "#style_in_link"
167
- - captures:
168
- "1":
169
- name: meta.tag.inline.any.html.mediawiki
170
- begin: (<(big|small|sub|sup)>)
171
- contentName: markup.other.inline-styles.html.mediawiki
172
- end: (</\2>)
173
- patterns:
174
- - include: "#style_in_link"
175
- - include: "#comments"
176
- block:
177
- patterns:
178
- - name: meta.redirect.mediawiki
179
- begin: ^\s*(?i)(#redirect)
180
- beginCaptures:
181
- "1":
182
- name: keyword.control.redirect.mediawiki
183
- end: \n
184
- patterns:
185
- - include: "#link"
186
- - name: markup.heading.mediawiki
187
- match: ^=+\s*$
188
- - name: markup.heading.mediawiki
189
- begin: ^(=+)(?=.*\1\s*$)
190
- end: \1\s*$\n?
191
- patterns:
192
- - name: invalid.illegal.extra-equals-sign.mediawiki
193
- match: (?<=^=|^==|^===|^====|^=====|^======)=+|=(?==*\s*$)
194
- - include: "#inline"
195
- comment: "\n\
196
- \t\t\t\t\t\tThis matches lines which begin and end with some\n\
197
- \t\t\t\t\t number of \xE2\x80\x9C=\xE2\x80\x9D marks. If they are mismatched, then\n\
198
- \t\t\t\t\t interior \xE2\x80\x9C=\xE2\x80\x9D marks will be treated as invalid.\n\
199
- \t\t\t\t "
200
- - name: meta.separator.mediawiki
201
- match: ^-{4,}[ \t]*($\n)?
202
- comment: "\n\
203
- \t\t\t\t\t\tA separator is made up of 4 or more -s alone on a\n\
204
- \t\t\t\t\t\tline by themselves.\n\
205
- \t\t\t\t\t"
206
- - name: markup.raw.block.mediawiki
207
- begin: ^ (?=\s*\S)
208
- end: ^(?=[^ ])
209
- patterns:
210
- - include: "#inline"
211
- comment: "\n\
212
- \t\t\t\t\t\tCode blocks start with one space. Wiki text and\n\
213
- \t\t\t\t\t\thtml are still interpreted in MediaWiki, unlike in\n\
214
- \t\t\t\t\t\tmediawiki.\n\
215
- \t\t\t\t\t"
216
- - name: markup.list.mediawiki
217
- begin: ^([#*:;])
218
- end: ^(?!\1)
219
- patterns:
220
- - include: "#inline"
221
- comment: "\n\
222
- \t\t\t\t\t\tThis is preliminary. Eventually it would be nice\n\
223
- \t\t\t\t\t\tto scope each type of list differently, and even to\n\
224
- \t\t\t\t\t\tdo scopes of nested lists. There are 4 main things\n\
225
- \t\t\t\t\t\twhich will be scoped as lists:\n\
226
- \t\t\t\t\t\t\n\
227
- \t\t\t\t\t\t - numbered lists (#)\n\
228
- \t\t\t\t\t\t - unnumbered lists (*)\n\
229
- \t\t\t\t\t\t - definition lists (; :)\n\
230
- \t\t\t\t\t\t - indented paragraphs, as used on talk pages (:)\n\
231
- \t\t\t\t\t\t\n\
232
- \t\t\t\t\t\tthis last one might not even be scoped as a list in\n\
233
- \t\t\t\t\t\tthe ideal case. It is fine as a list for now,\n\
234
- \t\t\t\t\t\thowever.\n\
235
- \t\t\t\t\t"
236
- - include: "#table"
237
- - include: "#comments"
238
- - name: meta.paragraph.mediawiki
239
- begin: ^(?![\t ;*#:=]|----|$)
240
- end: ^(?:\s*$|(?=[;*#:=]|----))
241
- patterns:
242
- - include: "#inline"
243
- comment: "\n\
244
- \t\t\t\t\t\tAnything that is not a code block, list, header, etc.\n\
245
- \t\t\t\t\t\tis a paragraph.\n\
246
- \t\t\t\t\t"
247
- table:
248
- patterns:
249
- - name: markup.other.table.mediawiki
250
- begin: ^{\|
251
- end: ^\|}
252
- patterns:
253
- - name: markup.other.table.row.mediawiki
254
- begin: ^\|-
255
- end: ^(?=\|-|\|})
256
- patterns:
257
- - include: "#inline"
258
- comment: "\n\
259
- \t\t\t\t\t\t\t\thopefully we can allow selection of a whole\n\
260
- \t\t\t\t\t\t\t\ttable row, and possibly later allow things\n\
261
- \t\t\t\t\t\t\t\tlike moving a whole row up/down, etc.\n\
262
- \t\t\t\t\t\t\t"
263
- - include: "#inline"
264
- comment: "\n\
265
- \t\t\t\t\t\twe are going to have to add the styling capabilities\n\
266
- \t\t\t\t\t\tto this section eventually. It is complicated,\n\
267
- \t\t\t\t\t\tthough, so I am putting it off.\n\
268
- \t\t\t\t\t"
269
- block_html:
270
- patterns:
271
- - captures:
272
- "1":
273
- name: meta.tag.inline.math.mediawiki
274
- begin: (<math>)
275
- contentName: source.math.tex.embedded.mediawiki
276
- end: (</math>)
277
- patterns:
278
- - include: text.tex.math
279
- - captures:
280
- "1":
281
- name: meta.tag.inline.ref.mediawiki
282
- begin: (<ref>)
283
- contentName: meta.reference.content.mediawiki
284
- end: (</ref>)
285
- patterns:
286
- - include: "#inline"
287
- - captures:
288
- "1":
289
- name: meta.tag.inline.ref.mediawiki
290
- begin: (<gallery>)
291
- contentName: meta.gallery.mediawiki
292
- end: (</gallery>)
293
- patterns:
294
- - name: meta.item.gallery.mediawiki
295
- begin: "(?x)\n\
296
- \t\t\t\t\t\t\t\t^(?!\\s*\\n)\t\t\t\t# not an empty line\n\
297
- \t\t\t\t\t\t\t\t( [ ]*(((i|I)mage)(:)) # spaces, image, colon\n\
298
- \t\t\t\t\t\t\t\t ([^\\[\\]|]+) # anything\n\
299
- \t\t\t\t\t\t\t\t (?<!\\s)[ ]* # spaces\n\
300
- \t\t\t\t\t\t\t\t)?\n\
301
- \t\t\t\t\t\t\t"
302
- beginCaptures:
303
- "6":
304
- name: constant.other.wiki-link.image.mediawiki
305
- "3":
306
- name: constant.other.namespace.image.mediawiki
307
- "5":
308
- name: punctuation.fix_this_later.colon.mediawiki
309
- end: \n
310
- patterns:
311
- - begin: ^(?!\|)|(\|)
312
- contentName: string.other.title.gallery.mediawiki
313
- beginCaptures:
314
- "1":
315
- name: punctuation.fix_this_later.pipe.mediawiki
316
- end: \n|(?=\|)
317
- patterns:
318
- - include: "#inline"
319
- - name: punctuation.fix_this_later.pipe.mediawiki
320
- match: \|
321
- comment: "\n\
322
- \t\t\t\tThe available block HTML tags supported are:\n\
323
- \t\t\t\t\n\
324
- \t\t\t\t * blockquote, center, pre, div, hr, p\n\
325
- \t\t\t\t * tables: table, th, tr, td, caption\n\
326
- \t\t\t\t * lists: ul, ol, li\n\
327
- \t\t\t\t * definition lists: dl, dt, dd\n\
328
- \t\t\t\t * headers: h1, h2, h3, h4, h5, h6\n\
329
- \t\t\t\t * br\n\
330
- \t\t\t"
331
- link:
332
- patterns:
333
- - name: meta.image.wiki.mediawiki
334
- endCaptures:
335
- "2":
336
- name: punctuation.fix_this_later.pipe.mediawiki
337
- "3":
338
- name: string.other.title.link.wiki-link.mediawiki
339
- begin: |-
340
- (?x:
341
- (\[\[) # opening brackets
342
- ( [ ]*(((i|I)mage)(:)) # spaces, image, colon
343
- ([^\[\]|]+) # anything
344
- (?<!\s)[ ]* # spaces
345
- )
346
- )
347
- applyEndPatternLast: 1
348
- beginCaptures:
349
- "6":
350
- name: punctuation.fix_this_later.colon.mediawiki
351
- "7":
352
- name: constant.other.wiki-link.image.mediawiki
353
- "1":
354
- name: punctuation.fix_this_later.brackets.mediwiki
355
- "4":
356
- name: constant.other.namespace.image.mediawiki
357
- end: |-
358
- (?x:
359
- ((\|)[ ]*( [^\[\]|]+ )[ ]*)? # pipe, spaces, anything, spaces
360
- (\]\]) # closing brackets
361
- )
362
- patterns:
363
- - captures:
364
- "1":
365
- name: punctuation.fix_this_later.pipe.mediawiki
366
- "2":
367
- name: keyword.control.image.formatting.mediawiki
368
- "3":
369
- name: keyword.control.image.alignment.mediawiki
370
- "4":
371
- name: constant.numeric.image.width.mediawiki
372
- "5":
373
- name: constant.other.unit.mediawiki
374
- match: "(?x)\n\
375
- \t\t\t\t\t\t\t\t(\\|)[ ]*\n\
376
- \t\t\t\t\t\t\t\t( (thumb|thumbnail|frame)\n\
377
- \t\t\t\t\t\t\t\t |(right|left|center|none)\n\
378
- \t\t\t\t\t\t\t\t |([0-9]+)(px)\n\
379
- \t\t\t\t\t\t\t\t)[ ]*\n\
380
- \t\t\t\t\t\t\t"
381
- - name: punctuation.fix_this_later.pipe.mediawiki
382
- match: \|
383
- - include: "#style_in_link"
384
- - name: meta.link.wiki.mediawiki
385
- endCaptures:
386
- "2":
387
- name: string.other.title.link.wiki-link.mediawiki
388
- begin: |-
389
- (?x:
390
- (\[\[) # opening brackets
391
- (:)? # colon to suppress image or category?
392
- ((\s+):[^\[\]]*(?=\]\]))? # a colon after spaces is invalid
393
- [ ]* # spaces
394
- ( (([^\[\]|]+)(:))? # namespace
395
- ([^\[\]|]+)(?<!\s)[ ]* # link name
396
- )?
397
- )
398
- beginCaptures:
399
- "7":
400
- name: constant.other.namespace.mediawiki
401
- "8":
402
- name: punctuation.fix_this_later.colon.mediawiki
403
- "9":
404
- name: constant.other.wiki-link.mediawiki
405
- "1":
406
- name: punctuation.fix_this_later.brackets.mediawiki
407
- "2":
408
- name: keyword.operator.wiki-link.suppress-image-or-category.mediawiki
409
- "4":
410
- name: invalid.illegal.whitespace.mediawiki
411
- end: |-
412
- (?x:
413
- (\|[ ]*([^\[\]|]+)[ ]*)? # pipe, spaces, anything, spaces
414
- (\]\]) # closing brackets
415
- )
416
- patterns:
417
- - include: "#style_in_link"
418
- - name: meta.link.inline.external.mediawiki
419
- begin: \[(\S+)\s*(?=[^\]]*\])
420
- contentName: string.other.title.link.external.mediawiki
421
- beginCaptures:
422
- "1":
423
- name: markup.underline.link.external.mediawiki
424
- end: \]
425
- patterns:
426
- - include: "#style_in_link"
427
- - name: markup.underline.link.external.mediawiki
428
- match: ((https?|ftp|file)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])
429
- style:
430
- patterns:
431
- - name: markup.bold.mediawiki
432
- begin: "'''"
433
- end: "'''"
434
- patterns:
435
- - include: "#inline"
436
- - name: markup.italic.mediawiki
437
- begin: "''"
438
- end: "''(?!'[^'])"
439
- patterns:
440
- - include: "#inline"
441
- - captures:
442
- "1":
443
- name: meta.tag.inline.bold.html.mediawiki
444
- begin: (<(b|strong)>)
445
- contentName: markup.bold.html.mediawiki
446
- end: (</\2>)
447
- patterns:
448
- - include: "#inline"
449
- - captures:
450
- "1":
451
- name: meta.tag.inline.italic.html.mediawiki
452
- begin: (<(i|em)>)
453
- contentName: markup.italic.html.mediawiki
454
- end: (</\2>)
455
- patterns:
456
- - include: "#inline"
457
- - captures:
458
- "1":
459
- name: meta.tag.inline.strikethrough.html.mediawiki
460
- begin: (<(s|strike)>)
461
- contentName: markup.other.strikethrough.html.mediawiki
462
- end: (</\2>)
463
- patterns:
464
- - include: "#inline"
465
- - captures:
466
- "1":
467
- name: meta.tag.inline.underline.html.mediawiki
468
- begin: (<(u)>)
469
- contentName: markup.underline.html.mediawiki
470
- end: (</\2>)
471
- patterns:
472
- - include: "#inline"
473
- - captures:
474
- "1":
475
- name: meta.tag.inline.raw.html.mediawiki
476
- begin: (<(tt|code)>)
477
- contentName: markup.raw.html.mediawiki
478
- end: (</\2>)
479
- patterns:
480
- - include: "#inline"
481
- - captures:
482
- "1":
483
- name: meta.tag.inline.any.html.mediawiki
484
- begin: (<(big|small|sub|sup)>)
485
- contentName: markup.other.inline-styles.html.mediawiki
486
- end: (</\2>)
487
- patterns:
488
- - include: "#inline"
489
- comment: "\n\
490
- \t\t\t\tTODO: We still need to add:\n\n\
491
- \t\t\t\t * font\n\
492
- \t\t\t\t * ruby, rb, rp, rt\n\
493
- \t\t\t\t * cite\n\
494
- \t\t\t\t\n\
495
- \t\t\t\tinline tags to this section, and make sure that the other\n\
496
- \t\t\t\ttags can accept attributes in the tag opening, etc. The\n\
497
- \t\t\t\tcurrent implementation is intended to be naive, but covering\n\
498
- \t\t\t\tthe majority of uses in mediawiki code.\n\
499
- \t\t\t\t\n\
500
- \t\t\t\tWe also need to add mediawiki-specific tags:\n\
501
- \t\t\t\t\n\
502
- \t\t\t\t * nowiki, noinclude, includeonly\n\
503
- \t\t\t\t\n\
504
- \t\t\t"
505
- uuid: 6AF21ADF-316A-47D1-A8B6-1BB38637DE9A
506
- foldingStartMarker: ^(=+)
507
- patterns:
508
- - include: "#block"
509
- - include: "#inline"
510
- foldingStopMarker: ^.*$(?=\n(=+)|(?!\n))
511
- keyEquivalent: ^~M
512
- comment: "\n\
513
- \t\tThis language grammar tries to handle Mediawiki syntax. Mediawiki\n\
514
- \t\tsyntax is a mess. This grammar will likely never quite work right.\n\
515
- \t\tThis is unsurprising as Mediawiki itself has never quite worked right.\n\
516
- \t\t\n\
517
- \t\t\t\t--Jacob\n\
518
- \t\t\n\
519
- \t\tTODO: lots of fixes still to do:\n\
520
- \t\t\n\
521
- \t\t 1. Add a bunch of HTML tags. See the #block and #style sections.\n\
522
- \t\t 3. Correctly scope all the parser functions and their contents.\n\
523
- \t\t This on will be complicated, as there are several: expr, if, etc.\n\
524
- \t\t 4. This is probably the biggest one: get all the lists to scope\n\
525
- \t\t correctly by type of list. Right now we just scope every list\n\
526
- \t\t as a list, and do not worry about what happens beyond that.\n\
527
- \t\t Eventually we want to do numbered and unnumbered separately, etc.\n\
528
- \t\t 5. Get some kind of folding by heading. Maybe it should just fold\n\
529
- \t\t to the next header, no matter which level it is. Then we can\n\
530
- \t\t make a contents just by folding everything. Not completely sure\n\
531
- \t\t\tthis is possible with current TM folding.\n\
532
- \t\t 7. Make sure that illegal things are correctly scoped illegal.\n\
533
- \t\t This is non-trivial, and has several parts\n\
534
- \t\t \n\
535
- \t\t - Bold/italic are based on brain-dead heuristics. I want to\n\
536
- \t\t be stricter than Mediawiki on this one. Also, we should\n\
537
- \t\t scope as illegal when for instance a new heading starts\n\
538
- \t\t before an italic has been closed.\n\
539
- \t\t - Templates... these will be pretty tough to do, as they can\n\
540
- \t\t be so flexible.\n\
541
- \t\t - \n\
542
- \t\t\n\
543
- \t\t 9. <timeline></timeline> tag. I am really not sure this one is\n\
544
- \t\t worth trying to do\n\
545
- \t\t10. Figure out a better scope for meta.function-call. Infininight\n\
546
- \t\t suggests entity.name.function.call, to be paralleled by\n\
547
- \t\t entity.name.function.definition. I am not completly sure I like\n\
548
- \t\t that solution, but it is probably better than meta.function-call\n\
549
- \t\t\n\
550
- \t\t\n\
551
- \t\tTODO items not closely related to the grammar:\n\
552
- \t\t\n\
553
- \t\t 2. Add a drop command for links/images, add keyboard shortcuts for\n\
554
- \t\t them too\n\
555
- \t\t 3. Make sure all the preference items are sorted out, for instance\n\
556
- \t\t smart typing pairs, indent patterns, etc.\n\
557
- \t\t 4. Commands to do bold/italic, and maybe things like big/small \n\
558
- \t\t 5. \n\
559
- \t\t\n\
560
- \t\tFINISHED:\n\
561
- \t\t 2. Add support for LaTeX math mode inside of <math></math> tags.\n\
562
- \t\t 1. Add a command for new list item. This one is trivial\n\
563
- \t\t 6. Get the symbol list working on headings. Trivial.\n\
564
- \t\t 8. <gallery></gallery> tag. This one adds some complication, but\n\
565
- \t\t is worth supporting.\n\
566
- \t\t \n\
567
- \t"