ultraviolet1x 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +16 -0
  4. data/History.txt +25 -0
  5. data/README.rdoc +29 -0
  6. data/README.txt +52 -0
  7. data/Rakefile +11 -0
  8. data/bin/theme2latexrender +122 -0
  9. data/bin/theme2xhtmlrender +156 -0
  10. data/bin/uv +140 -0
  11. data/broken_syntax/markdown.syntax +543 -0
  12. data/broken_syntax/php.syntax +1253 -0
  13. data/lib/uv/render_processor.rb +140 -0
  14. data/lib/uv/utility.rb +67 -0
  15. data/lib/uv/version.rb +3 -0
  16. data/lib/uv.rb +95 -0
  17. data/mm/manual.mm +840 -0
  18. data/render/latex/active4d.render +132 -0
  19. data/render/latex/all_hallows_eve.render +96 -0
  20. data/render/latex/amy.render +171 -0
  21. data/render/latex/blackboard.render +111 -0
  22. data/render/latex/brilliance_black.render +552 -0
  23. data/render/latex/brilliance_dull.render +561 -0
  24. data/render/latex/cobalt.render +162 -0
  25. data/render/latex/dawn.render +126 -0
  26. data/render/latex/eiffel.render +132 -0
  27. data/render/latex/espresso_libre.render +123 -0
  28. data/render/latex/idle.render +93 -0
  29. data/render/latex/iplastic.render +99 -0
  30. data/render/latex/lazy.render +96 -0
  31. data/render/latex/mac_classic.render +135 -0
  32. data/render/latex/magicwb_amiga.render +117 -0
  33. data/render/latex/pastels_on_dark.render +204 -0
  34. data/render/latex/slush_poppies.render +123 -0
  35. data/render/latex/spacecadet.render +81 -0
  36. data/render/latex/sunburst.render +186 -0
  37. data/render/latex/twilight.render +153 -0
  38. data/render/latex/zenburnesque.render +126 -0
  39. data/render/old/txt2tags.render +131 -0
  40. data/render/xhtml/active4d.render +140 -0
  41. data/render/xhtml/all_hallows_eve.render +104 -0
  42. data/render/xhtml/amy.render +179 -0
  43. data/render/xhtml/blackboard.render +119 -0
  44. data/render/xhtml/brilliance_black.render +560 -0
  45. data/render/xhtml/brilliance_dull.render +569 -0
  46. data/render/xhtml/cobalt.render +170 -0
  47. data/render/xhtml/dawn.render +134 -0
  48. data/render/xhtml/eiffel.render +140 -0
  49. data/render/xhtml/espresso_libre.render +131 -0
  50. data/render/xhtml/files/css/active4d.css +114 -0
  51. data/render/xhtml/files/css/all_hallows_eve.css +72 -0
  52. data/render/xhtml/files/css/amy.css +147 -0
  53. data/render/xhtml/files/css/blackboard.css +88 -0
  54. data/render/xhtml/files/css/brilliance_black.css +605 -0
  55. data/render/xhtml/files/css/brilliance_dull.css +599 -0
  56. data/render/xhtml/files/css/cobalt.css +149 -0
  57. data/render/xhtml/files/css/dawn.css +121 -0
  58. data/render/xhtml/files/css/eiffel.css +121 -0
  59. data/render/xhtml/files/css/espresso_libre.css +109 -0
  60. data/render/xhtml/files/css/idle.css +62 -0
  61. data/render/xhtml/files/css/iplastic.css +80 -0
  62. data/render/xhtml/files/css/lazy.css +73 -0
  63. data/render/xhtml/files/css/mac_classic.css +123 -0
  64. data/render/xhtml/files/css/magicwb_amiga.css +104 -0
  65. data/render/xhtml/files/css/pastels_on_dark.css +188 -0
  66. data/render/xhtml/files/css/slush_poppies.css +85 -0
  67. data/render/xhtml/files/css/spacecadet.css +51 -0
  68. data/render/xhtml/files/css/sunburst.css +180 -0
  69. data/render/xhtml/files/css/twilight.css +137 -0
  70. data/render/xhtml/files/css/zenburnesque.css +91 -0
  71. data/render/xhtml/idle.render +101 -0
  72. data/render/xhtml/iplastic.render +107 -0
  73. data/render/xhtml/lazy.render +104 -0
  74. data/render/xhtml/mac_classic.render +143 -0
  75. data/render/xhtml/magicwb_amiga.render +125 -0
  76. data/render/xhtml/pastels_on_dark.render +212 -0
  77. data/render/xhtml/slush_poppies.render +131 -0
  78. data/render/xhtml/spacecadet.render +89 -0
  79. data/render/xhtml/sunburst.render +194 -0
  80. data/render/xhtml/twilight.render +161 -0
  81. data/render/xhtml/zenburnesque.render +134 -0
  82. data/syntax/actionscript.syntax +97 -0
  83. data/syntax/active4d.syntax +276 -0
  84. data/syntax/active4d_html.syntax +311 -0
  85. data/syntax/active4d_ini.syntax +50 -0
  86. data/syntax/active4d_library.syntax +21 -0
  87. data/syntax/ada.syntax +33 -0
  88. data/syntax/antlr.syntax +151 -0
  89. data/syntax/apache.syntax +191 -0
  90. data/syntax/applescript.syntax +384 -0
  91. data/syntax/asp.syntax +70 -0
  92. data/syntax/asp_vb.net.syntax +129 -0
  93. data/syntax/bibtex.syntax +151 -0
  94. data/syntax/blog_html.syntax +41 -0
  95. data/syntax/blog_markdown.syntax +42 -0
  96. data/syntax/blog_text.syntax +27 -0
  97. data/syntax/blog_textile.syntax +27 -0
  98. data/syntax/buggy/nemerle.syntax +74 -0
  99. data/syntax/build.syntax +53 -0
  100. data/syntax/bulletin_board.syntax +287 -0
  101. data/syntax/c++.syntax +186 -0
  102. data/syntax/c.syntax +414 -0
  103. data/syntax/cake.syntax +55 -0
  104. data/syntax/camlp4.syntax +36 -0
  105. data/syntax/cm.syntax +32 -0
  106. data/syntax/coffeescript.syntax +216 -0
  107. data/syntax/coldfusion.syntax +119 -0
  108. data/syntax/context_free.syntax +176 -0
  109. data/syntax/cs.syntax +59 -0
  110. data/syntax/css.syntax +195 -0
  111. data/syntax/css_experimental.syntax +1925 -0
  112. data/syntax/csv.syntax +68 -0
  113. data/syntax/d.syntax +142 -0
  114. data/syntax/diff.syntax +81 -0
  115. data/syntax/dokuwiki.syntax +204 -0
  116. data/syntax/dot.syntax +47 -0
  117. data/syntax/doxygen.syntax +43 -0
  118. data/syntax/dylan.syntax +62 -0
  119. data/syntax/eiffel.syntax +78 -0
  120. data/syntax/erlang.syntax +922 -0
  121. data/syntax/f-script.syntax +80 -0
  122. data/syntax/fortran.syntax +141 -0
  123. data/syntax/fxscript.syntax +142 -0
  124. data/syntax/greasemonkey.syntax +34 -0
  125. data/syntax/gri.syntax +83 -0
  126. data/syntax/groovy.syntax +191 -0
  127. data/syntax/gtd.syntax +22 -0
  128. data/syntax/gtdalt.syntax +143 -0
  129. data/syntax/haml.syntax +88 -0
  130. data/syntax/haskell.syntax +88 -0
  131. data/syntax/html-asp.syntax +27 -0
  132. data/syntax/html.syntax +362 -0
  133. data/syntax/html_django.syntax +36 -0
  134. data/syntax/html_for_asp.net.syntax +424 -0
  135. data/syntax/html_mason.syntax +119 -0
  136. data/syntax/html_rails.syntax +40 -0
  137. data/syntax/html_tcl.syntax +26 -0
  138. data/syntax/icalendar.syntax +32 -0
  139. data/syntax/inform.syntax +48 -0
  140. data/syntax/ini.syntax +55 -0
  141. data/syntax/installer_distribution_script.syntax +77 -0
  142. data/syntax/io.syntax +81 -0
  143. data/syntax/java.syntax +211 -0
  144. data/syntax/javaproperties.syntax +20 -0
  145. data/syntax/javascript.syntax +256 -0
  146. data/syntax/javascript_+_prototype.syntax +72 -0
  147. data/syntax/javascript_+_prototype_bracketed.syntax +140 -0
  148. data/syntax/jquery_javascript.syntax +114 -0
  149. data/syntax/json.syntax +136 -0
  150. data/syntax/languagedefinition.syntax +708 -0
  151. data/syntax/latex.syntax +566 -0
  152. data/syntax/latex_beamer.syntax +41 -0
  153. data/syntax/latex_log.syntax +50 -0
  154. data/syntax/latex_memoir.syntax +64 -0
  155. data/syntax/lexflex.syntax +219 -0
  156. data/syntax/lighttpd.syntax +54 -0
  157. data/syntax/lilypond.syntax +492 -0
  158. data/syntax/lisp.syntax +61 -0
  159. data/syntax/literate_haskell.syntax +24 -0
  160. data/syntax/logo.syntax +29 -0
  161. data/syntax/logtalk.syntax +152 -0
  162. data/syntax/lua.syntax +86 -0
  163. data/syntax/m.syntax +142 -0
  164. data/syntax/macports_portfile.syntax +163 -0
  165. data/syntax/mail.syntax +118 -0
  166. data/syntax/makefile.syntax +36 -0
  167. data/syntax/man.syntax +17 -0
  168. data/syntax/mediawiki.syntax +567 -0
  169. data/syntax/mel.syntax +92 -0
  170. data/syntax/mips.syntax +66 -0
  171. data/syntax/mod_perl.syntax +50 -0
  172. data/syntax/modula-3.syntax +47 -0
  173. data/syntax/moinmoin.syntax +189 -0
  174. data/syntax/mootools.syntax +572 -0
  175. data/syntax/movable_type.syntax +162 -0
  176. data/syntax/multimarkdown.syntax +39 -0
  177. data/syntax/objective-c++.syntax +18 -0
  178. data/syntax/objective-c.syntax +233 -0
  179. data/syntax/ocaml.syntax +764 -0
  180. data/syntax/ocamllex.syntax +167 -0
  181. data/syntax/ocamlyacc.syntax +184 -0
  182. data/syntax/old/YAML.yaml +160 -0
  183. data/syntax/old/txt2tags.yaml +139 -0
  184. data/syntax/opengl.syntax +14 -0
  185. data/syntax/pascal.syntax +77 -0
  186. data/syntax/perl.syntax +1115 -0
  187. data/syntax/plain_text.syntax +32 -0
  188. data/syntax/pmwiki.syntax +113 -0
  189. data/syntax/postscript.syntax +114 -0
  190. data/syntax/processing.syntax +106 -0
  191. data/syntax/prolog.syntax +40 -0
  192. data/syntax/property_list.syntax +635 -0
  193. data/syntax/python.syntax +868 -0
  194. data/syntax/python_django.syntax +21 -0
  195. data/syntax/qmake_project.syntax +114 -0
  196. data/syntax/qt_c++.syntax +26 -0
  197. data/syntax/quake3_config.syntax +32 -0
  198. data/syntax/r.syntax +81 -0
  199. data/syntax/r_console.syntax +16 -0
  200. data/syntax/ragel.syntax +201 -0
  201. data/syntax/rd_r_documentation.syntax +91 -0
  202. data/syntax/regexp.syntax +50 -0
  203. data/syntax/regular_expressions_oniguruma.syntax +107 -0
  204. data/syntax/regular_expressions_python.syntax +109 -0
  205. data/syntax/release_notes.syntax +46 -0
  206. data/syntax/remind.syntax +253 -0
  207. data/syntax/restructuredtext.syntax +250 -0
  208. data/syntax/rez.syntax +80 -0
  209. data/syntax/ruby.syntax +1035 -0
  210. data/syntax/ruby_experimental.syntax +145 -0
  211. data/syntax/ruby_on_rails.syntax +88 -0
  212. data/syntax/s5.syntax +69 -0
  213. data/syntax/sass.syntax +45 -0
  214. data/syntax/scheme.syntax +347 -0
  215. data/syntax/scilab.syntax +41 -0
  216. data/syntax/setext.syntax +147 -0
  217. data/syntax/shell-unix-generic.syntax +384 -0
  218. data/syntax/slate.syntax +149 -0
  219. data/syntax/smarty.syntax +63 -0
  220. data/syntax/sql.syntax +237 -0
  221. data/syntax/sql_rails.syntax +18 -0
  222. data/syntax/ssh-config.syntax +33 -0
  223. data/syntax/standard_ml.syntax +121 -0
  224. data/syntax/strings_file.syntax +39 -0
  225. data/syntax/subversion_commit_message.syntax +36 -0
  226. data/syntax/sweave.syntax +84 -0
  227. data/syntax/swig.syntax +57 -0
  228. data/syntax/tcl.syntax +152 -0
  229. data/syntax/template_toolkit.syntax +121 -0
  230. data/syntax/tex.syntax +86 -0
  231. data/syntax/tex_math.syntax +49 -0
  232. data/syntax/textile.syntax +215 -0
  233. data/syntax/tsv.syntax +50 -0
  234. data/syntax/twiki.syntax +241 -0
  235. data/syntax/txt2tags.syntax +79 -0
  236. data/syntax/vectorscript.syntax +57 -0
  237. data/syntax/xhtml_1.0.syntax +4027 -0
  238. data/syntax/xml.syntax +180 -0
  239. data/syntax/xml_strict.syntax +92 -0
  240. data/syntax/xsl.syntax +60 -0
  241. data/syntax/yaml.syntax +160 -0
  242. data/syntax/yui_javascript.syntax +176 -0
  243. data/test/ultraviolet_test.rb +17 -0
  244. data/test/uv_test.rb +0 -0
  245. data/ultraviolet1x.gemspec +22 -0
  246. metadata +333 -0
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Makefile
3
+ fileTypes:
4
+ - GNUmakefile
5
+ - makefile
6
+ - Makefile
7
+ - OCamlMakefile
8
+ scopeName: source.makefile
9
+ uuid: FF1825E8-6B1C-11D9-B883-000D93589AF6
10
+ patterns:
11
+ - name: variable.other.makefile
12
+ begin: ^(\w|[-_])+\s*\??=
13
+ end: $
14
+ patterns:
15
+ - match: \\\n
16
+ - name: string.interpolated.backtick.makefile
17
+ begin: "`"
18
+ end: "`"
19
+ patterns:
20
+ - include: source.shell
21
+ - name: comment.line.number-sign.makefile
22
+ begin: "#"
23
+ beginCaptures:
24
+ "0":
25
+ name: punctuation.definition.comment.makefile
26
+ end: $\n?
27
+ patterns:
28
+ - name: punctuation.separator.continuation.makefile
29
+ match: (?<!\\)\\$\n
30
+ - name: keyword.control.makefile
31
+ match: ^(\s*)\b(\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)\b
32
+ - name: meta.function.makefile
33
+ captures:
34
+ "1":
35
+ name: entity.name.function.makefile
36
+ match: ^([^\t ]+:(?!\=))\s*.*
data/syntax/man.syntax ADDED
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Man
3
+ fileTypes:
4
+ - man
5
+ scopeName: text.man
6
+ uuid: E8BAC30A-16BF-498D-941D-73FBAED37891
7
+ foldingStartMarker: ^[A-Z](?:(?:\S+\s\S+)+|\S+)$
8
+ patterns:
9
+ - name: markup.heading.man
10
+ match: ^[A-Z](?:(?:\S+\s\S+)+|\S+)$
11
+ - name: markup.underline.link.man
12
+ match: ((https?|ftp|file|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])
13
+ - name: markup.underline.link.internal.man
14
+ match: ([\w\.]+\(\d[a-z]?\))
15
+ - name: meta.foldingStopMarker.man
16
+ match: ^_{2,}$
17
+ foldingStopMarker: ^_{2,}$
@@ -0,0 +1,567 @@
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"