ace-rails-ap 4.1.3 → 4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (437) hide show
  1. checksums.yaml +5 -5
  2. data/.gitmodules +1 -1
  3. data/Gemfile +2 -3
  4. data/ace-rails-ap.gemspec +0 -2
  5. data/lib/ace/rails/version.rb +1 -1
  6. data/update.sh +1 -1
  7. data/vendor/assets/javascripts/ace/ace.js +5192 -3414
  8. data/vendor/assets/javascripts/ace/ext-beautify.js +281 -288
  9. data/vendor/assets/javascripts/ace/ext-code_lens.js +238 -0
  10. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +6 -3
  11. data/vendor/assets/javascripts/ace/ext-emmet.js +353 -246
  12. data/vendor/assets/javascripts/ace/ext-error_marker.js +6 -3
  13. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +61 -38
  14. data/vendor/assets/javascripts/ace/ext-language_tools.js +532 -343
  15. data/vendor/assets/javascripts/ace/ext-linking.js +8 -5
  16. data/vendor/assets/javascripts/ace/ext-modelist.js +46 -12
  17. data/vendor/assets/javascripts/ace/ext-options.js +793 -0
  18. data/vendor/assets/javascripts/ace/ext-prompt.js +2783 -0
  19. data/vendor/assets/javascripts/ace/ext-rtl.js +122 -0
  20. data/vendor/assets/javascripts/ace/ext-searchbox.js +45 -40
  21. data/vendor/assets/javascripts/ace/ext-settings_menu.js +520 -369
  22. data/vendor/assets/javascripts/ace/ext-spellcheck.js +6 -4
  23. data/vendor/assets/javascripts/ace/ext-split.js +7 -46
  24. data/vendor/assets/javascripts/ace/ext-static_highlight.js +90 -22
  25. data/vendor/assets/javascripts/ace/ext-statusbar.js +9 -6
  26. data/vendor/assets/javascripts/ace/ext-textarea.js +21 -18
  27. data/vendor/assets/javascripts/ace/ext-themelist.js +10 -6
  28. data/vendor/assets/javascripts/ace/ext-whitespace.js +13 -6
  29. data/vendor/assets/javascripts/ace/keybinding-emacs.js +49 -61
  30. data/vendor/assets/javascripts/ace/keybinding-sublime.js +422 -0
  31. data/vendor/assets/javascripts/ace/keybinding-vim.js +620 -287
  32. data/vendor/assets/javascripts/ace/keybinding-vscode.js +262 -0
  33. data/vendor/assets/javascripts/ace/mode-abap.js +10 -3
  34. data/vendor/assets/javascripts/ace/mode-abc.js +14 -4
  35. data/vendor/assets/javascripts/ace/mode-actionscript.js +13 -5
  36. data/vendor/assets/javascripts/ace/mode-ada.js +54 -4
  37. data/vendor/assets/javascripts/ace/mode-alda.js +311 -0
  38. data/vendor/assets/javascripts/ace/mode-apache_conf.js +12 -5
  39. data/vendor/assets/javascripts/ace/mode-apex.js +457 -0
  40. data/vendor/assets/javascripts/ace/mode-applescript.js +11 -4
  41. data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
  42. data/vendor/assets/javascripts/ace/mode-asciidoc.js +9 -2
  43. data/vendor/assets/javascripts/ace/mode-asl.js +422 -0
  44. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +11 -4
  45. data/vendor/assets/javascripts/ace/mode-autohotkey.js +17 -8
  46. data/vendor/assets/javascripts/ace/mode-batchfile.js +12 -5
  47. data/vendor/assets/javascripts/ace/mode-c9search.js +9 -3
  48. data/vendor/assets/javascripts/ace/mode-c_cpp.js +23 -7
  49. data/vendor/assets/javascripts/ace/mode-cirru.js +11 -4
  50. data/vendor/assets/javascripts/ace/mode-clojure.js +9 -1
  51. data/vendor/assets/javascripts/ace/mode-cobol.js +8 -1
  52. data/vendor/assets/javascripts/ace/mode-coffee.js +12 -4
  53. data/vendor/assets/javascripts/ace/mode-coldfusion.js +163 -134
  54. data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
  55. data/vendor/assets/javascripts/ace/mode-csharp.js +13 -6
  56. data/vendor/assets/javascripts/ace/mode-csound_document.js +4036 -0
  57. data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +2966 -0
  58. data/vendor/assets/javascripts/ace/mode-csound_score.js +462 -0
  59. data/vendor/assets/javascripts/ace/mode-csp.js +59 -0
  60. data/vendor/assets/javascripts/ace/mode-css.js +48 -27
  61. data/vendor/assets/javascripts/ace/mode-curly.js +162 -133
  62. data/vendor/assets/javascripts/ace/mode-d.js +12 -5
  63. data/vendor/assets/javascripts/ace/mode-dart.js +46 -20
  64. data/vendor/assets/javascripts/ace/mode-diff.js +11 -3
  65. data/vendor/assets/javascripts/ace/mode-django.js +164 -134
  66. data/vendor/assets/javascripts/ace/mode-dockerfile.js +12 -4
  67. data/vendor/assets/javascripts/ace/mode-dot.js +11 -4
  68. data/vendor/assets/javascripts/ace/mode-drools.js +46 -5
  69. data/vendor/assets/javascripts/ace/mode-edifact.js +166 -0
  70. data/vendor/assets/javascripts/ace/mode-eiffel.js +8 -1
  71. data/vendor/assets/javascripts/ace/mode-ejs.js +832 -298
  72. data/vendor/assets/javascripts/ace/mode-elixir.js +11 -4
  73. data/vendor/assets/javascripts/ace/mode-elm.js +10 -3
  74. data/vendor/assets/javascripts/ace/mode-erlang.js +13 -5
  75. data/vendor/assets/javascripts/ace/mode-forth.js +12 -5
  76. data/vendor/assets/javascripts/ace/mode-fortran.js +10 -3
  77. data/vendor/assets/javascripts/ace/mode-fsharp.js +316 -0
  78. data/vendor/assets/javascripts/ace/{mode-mipsassembler.js → mode-fsl.js} +91 -28
  79. data/vendor/assets/javascripts/ace/mode-ftl.js +23 -12
  80. data/vendor/assets/javascripts/ace/mode-gcode.js +8 -1
  81. data/vendor/assets/javascripts/ace/mode-gherkin.js +9 -4
  82. data/vendor/assets/javascripts/ace/mode-gitignore.js +8 -1
  83. data/vendor/assets/javascripts/ace/mode-glsl.js +24 -8
  84. data/vendor/assets/javascripts/ace/mode-gobstones.js +267 -99
  85. data/vendor/assets/javascripts/ace/mode-golang.js +11 -4
  86. data/vendor/assets/javascripts/ace/mode-graphqlschema.js +11 -3
  87. data/vendor/assets/javascripts/ace/mode-groovy.js +14 -5
  88. data/vendor/assets/javascripts/ace/mode-haml.js +442 -116
  89. data/vendor/assets/javascripts/ace/mode-handlebars.js +162 -133
  90. data/vendor/assets/javascripts/ace/mode-haskell.js +14 -6
  91. data/vendor/assets/javascripts/ace/mode-haskell_cabal.js +8 -1
  92. data/vendor/assets/javascripts/ace/mode-haxe.js +11 -4
  93. data/vendor/assets/javascripts/ace/mode-hjson.js +13 -6
  94. data/vendor/assets/javascripts/ace/mode-html.js +162 -133
  95. data/vendor/assets/javascripts/ace/mode-html_elixir.js +165 -136
  96. data/vendor/assets/javascripts/ace/mode-html_ruby.js +832 -298
  97. data/vendor/assets/javascripts/ace/mode-ini.js +8 -1
  98. data/vendor/assets/javascripts/ace/mode-io.js +14 -12
  99. data/vendor/assets/javascripts/ace/mode-jack.js +10 -3
  100. data/vendor/assets/javascripts/ace/mode-jade.js +272 -376
  101. data/vendor/assets/javascripts/ace/mode-java.js +110 -7
  102. data/vendor/assets/javascripts/ace/mode-javascript.js +14 -5
  103. data/vendor/assets/javascripts/ace/mode-json.js +13 -3
  104. data/vendor/assets/javascripts/ace/mode-json5.js +360 -0
  105. data/vendor/assets/javascripts/ace/mode-jsoniq.js +25 -12
  106. data/vendor/assets/javascripts/ace/mode-jsp.js +60 -15
  107. data/vendor/assets/javascripts/ace/mode-jssm.js +325 -0
  108. data/vendor/assets/javascripts/ace/mode-jsx.js +11 -4
  109. data/vendor/assets/javascripts/ace/mode-julia.js +12 -5
  110. data/vendor/assets/javascripts/ace/mode-kotlin.js +18 -7
  111. data/vendor/assets/javascripts/ace/mode-latex.js +87 -15
  112. data/vendor/assets/javascripts/ace/mode-less.js +47 -27
  113. data/vendor/assets/javascripts/ace/mode-liquid.js +2030 -472
  114. data/vendor/assets/javascripts/ace/mode-lisp.js +9 -2
  115. data/vendor/assets/javascripts/ace/mode-livescript.js +10 -2
  116. data/vendor/assets/javascripts/ace/mode-logiql.js +10 -3
  117. data/vendor/assets/javascripts/ace/mode-logtalk.js +352 -0
  118. data/vendor/assets/javascripts/ace/mode-lsl.js +11 -3
  119. data/vendor/assets/javascripts/ace/mode-lua.js +40 -12
  120. data/vendor/assets/javascripts/ace/mode-luapage.js +194 -144
  121. data/vendor/assets/javascripts/ace/mode-lucene.js +106 -22
  122. data/vendor/assets/javascripts/ace/mode-makefile.js +11 -3
  123. data/vendor/assets/javascripts/ace/mode-markdown.js +530 -201
  124. data/vendor/assets/javascripts/ace/mode-mask.js +101 -84
  125. data/vendor/assets/javascripts/ace/mode-matlab.js +8 -1
  126. data/vendor/assets/javascripts/ace/mode-maze.js +11 -3
  127. data/vendor/assets/javascripts/ace/mode-mediawiki.js +592 -0
  128. data/vendor/assets/javascripts/ace/mode-mel.js +11 -4
  129. data/vendor/assets/javascripts/ace/mode-mixal.js +122 -0
  130. data/vendor/assets/javascripts/ace/mode-mushcode.js +9 -2
  131. data/vendor/assets/javascripts/ace/mode-mysql.js +11 -4
  132. data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
  133. data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
  134. data/vendor/assets/javascripts/ace/mode-nix.js +23 -7
  135. data/vendor/assets/javascripts/ace/mode-nsis.js +15 -8
  136. data/vendor/assets/javascripts/ace/mode-nunjucks.js +2698 -0
  137. data/vendor/assets/javascripts/ace/mode-objectivec.js +23 -8
  138. data/vendor/assets/javascripts/ace/mode-ocaml.js +8 -1
  139. data/vendor/assets/javascripts/ace/mode-pascal.js +92 -67
  140. data/vendor/assets/javascripts/ace/mode-perl.js +11 -3
  141. data/vendor/assets/javascripts/ace/mode-perl6.js +593 -0
  142. data/vendor/assets/javascripts/ace/mode-pgsql.js +314 -71
  143. data/vendor/assets/javascripts/ace/mode-php.js +1042 -995
  144. data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +13104 -0
  145. data/vendor/assets/javascripts/ace/mode-pig.js +13 -6
  146. data/vendor/assets/javascripts/ace/mode-plain_text.js +8 -1
  147. data/vendor/assets/javascripts/ace/mode-powershell.js +10 -3
  148. data/vendor/assets/javascripts/ace/mode-praat.js +17 -7
  149. data/vendor/assets/javascripts/ace/mode-prisma.js +489 -0
  150. data/vendor/assets/javascripts/ace/mode-prolog.js +12 -5
  151. data/vendor/assets/javascripts/ace/mode-properties.js +8 -1
  152. data/vendor/assets/javascripts/ace/mode-protobuf.js +23 -7
  153. data/vendor/assets/javascripts/ace/mode-puppet.js +368 -0
  154. data/vendor/assets/javascripts/ace/mode-python.js +306 -63
  155. data/vendor/assets/javascripts/ace/mode-qml.js +381 -0
  156. data/vendor/assets/javascripts/ace/mode-r.js +15 -4
  157. data/vendor/assets/javascripts/ace/mode-razor.js +166 -136
  158. data/vendor/assets/javascripts/ace/mode-rdoc.js +41 -3
  159. data/vendor/assets/javascripts/ace/mode-red.js +450 -0
  160. data/vendor/assets/javascripts/ace/mode-redshift.js +360 -0
  161. data/vendor/assets/javascripts/ace/mode-rhtml.js +162 -133
  162. data/vendor/assets/javascripts/ace/mode-rst.js +9 -1
  163. data/vendor/assets/javascripts/ace/mode-ruby.js +678 -166
  164. data/vendor/assets/javascripts/ace/mode-rust.js +16 -7
  165. data/vendor/assets/javascripts/ace/mode-sass.js +211 -116
  166. data/vendor/assets/javascripts/ace/mode-scad.js +11 -4
  167. data/vendor/assets/javascripts/ace/mode-scala.js +14 -5
  168. data/vendor/assets/javascripts/ace/mode-scheme.js +9 -2
  169. data/vendor/assets/javascripts/ace/mode-scss.js +412 -125
  170. data/vendor/assets/javascripts/ace/mode-sh.js +12 -4
  171. data/vendor/assets/javascripts/ace/mode-sjs.js +16 -7
  172. data/vendor/assets/javascripts/ace/mode-slim.js +5240 -0
  173. data/vendor/assets/javascripts/ace/mode-smarty.js +164 -135
  174. data/vendor/assets/javascripts/ace/mode-snippets.js +24 -16
  175. data/vendor/assets/javascripts/ace/mode-soy_template.js +164 -135
  176. data/vendor/assets/javascripts/ace/mode-space.js +8 -1
  177. data/vendor/assets/javascripts/ace/mode-sparql.js +13 -6
  178. data/vendor/assets/javascripts/ace/mode-sql.js +10 -2
  179. data/vendor/assets/javascripts/ace/mode-sqlserver.js +13 -5
  180. data/vendor/assets/javascripts/ace/mode-stylus.js +20 -10
  181. data/vendor/assets/javascripts/ace/mode-svg.js +27 -13
  182. data/vendor/assets/javascripts/ace/mode-swift.js +21 -8
  183. data/vendor/assets/javascripts/ace/mode-tcl.js +14 -3
  184. data/vendor/assets/javascripts/ace/mode-terraform.js +400 -0
  185. data/vendor/assets/javascripts/ace/mode-tex.js +9 -1
  186. data/vendor/assets/javascripts/ace/mode-text.js +8 -0
  187. data/vendor/assets/javascripts/ace/mode-textile.js +9 -1
  188. data/vendor/assets/javascripts/ace/mode-toml.js +9 -2
  189. data/vendor/assets/javascripts/ace/mode-tsx.js +28 -31
  190. data/vendor/assets/javascripts/ace/mode-turtle.js +13 -6
  191. data/vendor/assets/javascripts/ace/mode-twig.js +163 -134
  192. data/vendor/assets/javascripts/ace/mode-typescript.js +28 -31
  193. data/vendor/assets/javascripts/ace/mode-vala.js +14 -6
  194. data/vendor/assets/javascripts/ace/mode-vbscript.js +453 -17
  195. data/vendor/assets/javascripts/ace/mode-velocity.js +163 -133
  196. data/vendor/assets/javascripts/ace/mode-verilog.js +19 -5
  197. data/vendor/assets/javascripts/ace/mode-vhdl.js +13 -7
  198. data/vendor/assets/javascripts/ace/mode-visualforce.js +2640 -0
  199. data/vendor/assets/javascripts/ace/mode-wollok.js +17 -8
  200. data/vendor/assets/javascripts/ace/mode-xml.js +21 -9
  201. data/vendor/assets/javascripts/ace/mode-xquery.js +25 -12
  202. data/vendor/assets/javascripts/ace/mode-yaml.js +59 -18
  203. data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
  204. data/vendor/assets/javascripts/ace/snippets/abap.js +8 -6
  205. data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
  206. data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
  207. data/vendor/assets/javascripts/ace/snippets/ada.js +8 -6
  208. data/vendor/assets/javascripts/ace/snippets/alda.js +9 -0
  209. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -6
  210. data/vendor/assets/javascripts/ace/snippets/apex.js +9 -0
  211. data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -6
  212. data/vendor/assets/javascripts/ace/snippets/aql.js +9 -0
  213. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -6
  214. data/vendor/assets/javascripts/ace/snippets/asl.js +9 -0
  215. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -6
  216. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -6
  217. data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -6
  218. data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -6
  219. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
  220. data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -6
  221. data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
  222. data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -6
  223. data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
  224. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -6
  225. data/vendor/assets/javascripts/ace/snippets/crystal.js +9 -0
  226. data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -6
  227. data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
  228. data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
  229. data/vendor/assets/javascripts/ace/snippets/csound_score.js +9 -0
  230. data/vendor/assets/javascripts/ace/snippets/csp.js +9 -0
  231. data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
  232. data/vendor/assets/javascripts/ace/snippets/curly.js +8 -6
  233. data/vendor/assets/javascripts/ace/snippets/d.js +8 -6
  234. data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
  235. data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
  236. data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
  237. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -6
  238. data/vendor/assets/javascripts/ace/snippets/dot.js +8 -6
  239. data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
  240. data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
  241. data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -6
  242. data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -6
  243. data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -6
  244. data/vendor/assets/javascripts/ace/snippets/elm.js +8 -6
  245. data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
  246. data/vendor/assets/javascripts/ace/snippets/forth.js +8 -6
  247. data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -6
  248. data/vendor/assets/javascripts/ace/snippets/fsharp.js +9 -0
  249. data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
  250. data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -6
  251. data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -6
  252. data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -6
  253. data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -6
  254. data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -6
  255. data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
  256. data/vendor/assets/javascripts/ace/snippets/golang.js +8 -6
  257. data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
  258. data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -6
  259. data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
  260. data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -6
  261. data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
  262. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -6
  263. data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -6
  264. data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -6
  265. data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
  266. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -6
  267. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -6
  268. data/vendor/assets/javascripts/ace/snippets/ini.js +8 -6
  269. data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
  270. data/vendor/assets/javascripts/ace/snippets/jack.js +8 -6
  271. data/vendor/assets/javascripts/ace/snippets/jade.js +8 -6
  272. data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
  273. data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
  274. data/vendor/assets/javascripts/ace/snippets/json.js +8 -6
  275. data/vendor/assets/javascripts/ace/snippets/json5.js +9 -0
  276. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
  277. data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
  278. data/vendor/assets/javascripts/ace/snippets/jssm.js +9 -0
  279. data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -6
  280. data/vendor/assets/javascripts/ace/snippets/julia.js +8 -6
  281. data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -6
  282. data/vendor/assets/javascripts/ace/snippets/latex.js +8 -6
  283. data/vendor/assets/javascripts/ace/snippets/less.js +8 -6
  284. data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
  285. data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -6
  286. data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -6
  287. data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -6
  288. data/vendor/assets/javascripts/ace/snippets/logtalk.js +9 -0
  289. data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
  290. data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
  291. data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -6
  292. data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -6
  293. data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
  294. data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
  295. data/vendor/assets/javascripts/ace/snippets/mask.js +8 -6
  296. data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -6
  297. data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
  298. data/vendor/assets/javascripts/ace/snippets/mediawiki.js +9 -0
  299. data/vendor/assets/javascripts/ace/snippets/mel.js +8 -6
  300. data/vendor/assets/javascripts/ace/snippets/mixal.js +9 -0
  301. data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -6
  302. data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -6
  303. data/vendor/assets/javascripts/ace/snippets/nginx.js +9 -0
  304. data/vendor/assets/javascripts/ace/snippets/nim.js +9 -0
  305. data/vendor/assets/javascripts/ace/snippets/nix.js +8 -6
  306. data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -6
  307. data/vendor/assets/javascripts/ace/snippets/nunjucks.js +9 -0
  308. data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -6
  309. data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -6
  310. data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -6
  311. data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
  312. data/vendor/assets/javascripts/ace/snippets/perl6.js +9 -0
  313. data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -6
  314. data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
  315. data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +9 -0
  316. data/vendor/assets/javascripts/ace/snippets/pig.js +8 -6
  317. data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -6
  318. data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -6
  319. data/vendor/assets/javascripts/ace/snippets/praat.js +8 -6
  320. data/vendor/assets/javascripts/ace/snippets/prisma.js +9 -0
  321. data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -6
  322. data/vendor/assets/javascripts/ace/snippets/properties.js +8 -6
  323. data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -6
  324. data/vendor/assets/javascripts/ace/snippets/puppet.js +9 -0
  325. data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
  326. data/vendor/assets/javascripts/ace/snippets/qml.js +9 -0
  327. data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
  328. data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
  329. data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -6
  330. data/vendor/assets/javascripts/ace/snippets/red.js +9 -0
  331. data/vendor/assets/javascripts/ace/snippets/redshift.js +9 -0
  332. data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -6
  333. data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
  334. data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
  335. data/vendor/assets/javascripts/ace/snippets/rust.js +8 -6
  336. data/vendor/assets/javascripts/ace/snippets/sass.js +8 -6
  337. data/vendor/assets/javascripts/ace/snippets/scad.js +8 -6
  338. data/vendor/assets/javascripts/ace/snippets/scala.js +8 -6
  339. data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -6
  340. data/vendor/assets/javascripts/ace/snippets/scss.js +8 -6
  341. data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
  342. data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -6
  343. data/vendor/assets/javascripts/ace/snippets/slim.js +9 -0
  344. data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -6
  345. data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
  346. data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -6
  347. data/vendor/assets/javascripts/ace/snippets/space.js +8 -6
  348. data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -6
  349. data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
  350. data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
  351. data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -6
  352. data/vendor/assets/javascripts/ace/snippets/svg.js +8 -6
  353. data/vendor/assets/javascripts/ace/snippets/swift.js +8 -6
  354. data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
  355. data/vendor/assets/javascripts/ace/snippets/terraform.js +9 -0
  356. data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
  357. data/vendor/assets/javascripts/ace/snippets/text.js +8 -6
  358. data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
  359. data/vendor/assets/javascripts/ace/snippets/toml.js +8 -6
  360. data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -6
  361. data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -6
  362. data/vendor/assets/javascripts/ace/snippets/twig.js +8 -6
  363. data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -6
  364. data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
  365. data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -6
  366. data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
  367. data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -6
  368. data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -6
  369. data/vendor/assets/javascripts/ace/snippets/visualforce.js +9 -0
  370. data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
  371. data/vendor/assets/javascripts/ace/snippets/xml.js +8 -6
  372. data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
  373. data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -6
  374. data/vendor/assets/javascripts/ace/snippets/zeek.js +9 -0
  375. data/vendor/assets/javascripts/ace/theme-ambiance.js +11 -8
  376. data/vendor/assets/javascripts/ace/theme-chaos.js +9 -2
  377. data/vendor/assets/javascripts/ace/theme-chrome.js +8 -1
  378. data/vendor/assets/javascripts/ace/theme-clouds.js +8 -1
  379. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +8 -1
  380. data/vendor/assets/javascripts/ace/theme-cobalt.js +8 -1
  381. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +8 -1
  382. data/vendor/assets/javascripts/ace/theme-dawn.js +8 -1
  383. data/vendor/assets/javascripts/ace/theme-dracula.js +135 -0
  384. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +8 -1
  385. data/vendor/assets/javascripts/ace/theme-eclipse.js +8 -1
  386. data/vendor/assets/javascripts/ace/theme-github.js +8 -1
  387. data/vendor/assets/javascripts/ace/theme-gob.js +8 -1
  388. data/vendor/assets/javascripts/ace/theme-gruvbox.js +8 -1
  389. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +8 -1
  390. data/vendor/assets/javascripts/ace/theme-iplastic.js +8 -1
  391. data/vendor/assets/javascripts/ace/theme-katzenmilch.js +8 -1
  392. data/vendor/assets/javascripts/ace/theme-kr_theme.js +8 -1
  393. data/vendor/assets/javascripts/ace/theme-kuroir.js +8 -1
  394. data/vendor/assets/javascripts/ace/theme-merbivore.js +8 -1
  395. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +8 -1
  396. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +8 -1
  397. data/vendor/assets/javascripts/ace/theme-monokai.js +8 -1
  398. data/vendor/assets/javascripts/ace/theme-nord_dark.js +102 -0
  399. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +8 -1
  400. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +8 -1
  401. data/vendor/assets/javascripts/ace/theme-solarized_light.js +9 -2
  402. data/vendor/assets/javascripts/ace/theme-sqlserver.js +8 -1
  403. data/vendor/assets/javascripts/ace/theme-terminal.js +8 -1
  404. data/vendor/assets/javascripts/ace/theme-textmate.js +9 -1
  405. data/vendor/assets/javascripts/ace/theme-tomorrow.js +8 -1
  406. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +8 -1
  407. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +8 -1
  408. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +8 -1
  409. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +8 -1
  410. data/vendor/assets/javascripts/ace/theme-twilight.js +8 -1
  411. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +8 -1
  412. data/vendor/assets/javascripts/ace/theme-xcode.js +8 -1
  413. data/vendor/assets/javascripts/ace/worker-base.js +1421 -0
  414. data/vendor/assets/javascripts/ace/worker-coffee.js +55 -742
  415. data/vendor/assets/javascripts/ace/worker-css.js +66 -739
  416. data/vendor/assets/javascripts/ace/worker-html.js +55 -738
  417. data/vendor/assets/javascripts/ace/worker-javascript.js +6693 -4209
  418. data/vendor/assets/javascripts/ace/worker-json.js +56 -737
  419. data/vendor/assets/javascripts/ace/worker-lua.js +56 -738
  420. data/vendor/assets/javascripts/ace/worker-php.js +897 -1512
  421. data/vendor/assets/javascripts/ace/worker-xml.js +129 -808
  422. data/vendor/assets/javascripts/ace/worker-xquery.js +54 -737
  423. metadata +74 -19
  424. data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
  425. data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
  426. data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
  427. data/vendor/assets/javascripts/ace/mode-bro.js +0 -327
  428. data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
  429. data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
  430. data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
  431. data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
  432. data/vendor/assets/javascripts/ace/snippets/bro.js +0 -7
  433. data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
  434. data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
  435. data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
  436. data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
  437. data/vendor/assets/javascripts/ace/snippets/swig.js +0 -7
@@ -4,9 +4,9 @@ define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop
4
4
  var oop = require("../lib/oop");
5
5
  var lang = require("../lib/lang");
6
6
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
7
- var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
7
+ var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
8
8
  var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
9
- var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
9
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
10
10
  var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
11
11
  var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
12
12
 
@@ -36,7 +36,7 @@ var CssHighlightRules = function() {
36
36
  regex: "\\}"
37
37
  }, {
38
38
  token: "string",
39
- regex: "@",
39
+ regex: "@(?!viewport)",
40
40
  next: "media"
41
41
  }, {
42
42
  token: "keyword",
@@ -59,7 +59,7 @@ var CssHighlightRules = function() {
59
59
  }, {
60
60
  caseInsensitive: true
61
61
  }],
62
-
62
+
63
63
  "media": [{
64
64
  include : ["strings", "url", "comments"]
65
65
  }, {
@@ -96,6 +96,9 @@ var CssHighlightRules = function() {
96
96
  "ruleset" : [{
97
97
  regex : "-(webkit|ms|moz|o)-",
98
98
  token : "text"
99
+ }, {
100
+ token : "punctuation.operator",
101
+ regex : "[:;]"
99
102
  }, {
100
103
  token : "paren.rparen",
101
104
  regex : "\\}",
@@ -104,7 +107,7 @@ var CssHighlightRules = function() {
104
107
  include : ["strings", "url", "comments"]
105
108
  }, {
106
109
  token : ["constant.numeric", "keyword"],
107
- regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
110
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
108
111
  }, {
109
112
  token : "constant.numeric",
110
113
  regex : numRe
@@ -128,7 +131,7 @@ var CssHighlightRules = function() {
128
131
  }, {
129
132
  caseInsensitive: true
130
133
  }],
131
-
134
+
132
135
  url: [{
133
136
  token : "support.function",
134
137
  regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
@@ -140,7 +143,7 @@ var CssHighlightRules = function() {
140
143
  defaultToken: "string"
141
144
  }]
142
145
  }],
143
-
146
+
144
147
  strings: [{
145
148
  token : "string.start",
146
149
  regex : "'",
@@ -178,7 +181,7 @@ var CssHighlightRules = function() {
178
181
  token : "constant.language.escape",
179
182
  regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
180
183
  }]
181
-
184
+
182
185
  };
183
186
 
184
187
  this.normalizeRules();
@@ -217,7 +220,7 @@ DocCommentHighlightRules.getTagRule = function(start) {
217
220
  token : "comment.doc.tag.storage.type",
218
221
  regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
219
222
  };
220
- }
223
+ };
221
224
 
222
225
  DocCommentHighlightRules.getStartRule = function(start) {
223
226
  return {
@@ -373,7 +376,8 @@ var JavaScriptHighlightRules = function(options) {
373
376
  next : "property"
374
377
  }, {
375
378
  token : "storage.type",
376
- regex : /=>/
379
+ regex : /=>/,
380
+ next : "start"
377
381
  }, {
378
382
  token : "keyword.operator",
379
383
  regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
@@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) {
894
898
  stack.splice(0);
895
899
  return this.token;
896
900
  }}
897
- ]
901
+ ];
898
902
 
899
903
  this.embedRules(HighlightRules, prefix, [{
900
904
  token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
@@ -1008,17 +1012,17 @@ var constantOtherSymbol = exports.constantOtherSymbol = {
1008
1012
  regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
1009
1013
  };
1010
1014
 
1011
- var qString = exports.qString = {
1015
+ exports.qString = {
1012
1016
  token : "string", // single line
1013
1017
  regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1014
1018
  };
1015
1019
 
1016
- var qqString = exports.qqString = {
1020
+ exports.qqString = {
1017
1021
  token : "string", // single line
1018
1022
  regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1019
1023
  };
1020
1024
 
1021
- var tString = exports.tString = {
1025
+ exports.tString = {
1022
1026
  token : "string", // backtick string
1023
1027
  regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
1024
1028
  };
@@ -1028,9 +1032,34 @@ var constantNumericHex = exports.constantNumericHex = {
1028
1032
  regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
1029
1033
  };
1030
1034
 
1035
+ var constantNumericBinary = exports.constantNumericBinary = {
1036
+ token: "constant.numeric",
1037
+ regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/
1038
+ };
1039
+
1040
+ var constantNumericDecimal = exports.constantNumericDecimal = {
1041
+ token: "constant.numeric",
1042
+ regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
1043
+ };
1044
+
1045
+ var constantNumericOctal = exports.constantNumericDecimal = {
1046
+ token: "constant.numeric",
1047
+ regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
1048
+ };
1049
+
1050
+ var constantNumericRational = exports.constantNumericRational = {
1051
+ token: "constant.numeric", //rational + complex
1052
+ regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
1053
+ };
1054
+
1055
+ var constantNumericComplex = exports.constantNumericComplex = {
1056
+ token: "constant.numeric", //simple complex numbers
1057
+ regex: /\b([\d]i)\b/
1058
+ };
1059
+
1031
1060
  var constantNumericFloat = exports.constantNumericFloat = {
1032
- token : "constant.numeric", // float
1033
- regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
1061
+ token : "constant.numeric", // float + complex
1062
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
1034
1063
  };
1035
1064
 
1036
1065
  var instanceVariable = exports.instanceVariable = {
@@ -1070,18 +1099,19 @@ var RubyHighlightRules = function() {
1070
1099
  "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
1071
1100
  "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
1072
1101
  "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
1073
- "has_many|has_one|belongs_to|has_and_belongs_to_many"
1102
+ "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" +
1103
+ "private_class_method|remove_method|undef_method"
1074
1104
  );
1075
1105
 
1076
1106
  var keywords = (
1077
1107
  "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
1078
1108
  "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
1079
- "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
1109
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"
1080
1110
  );
1081
1111
 
1082
1112
  var buildinConstants = (
1083
1113
  "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
1084
- "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
1114
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"
1085
1115
  );
1086
1116
 
1087
1117
  var builtinVariables = (
@@ -1097,126 +1127,191 @@ var RubyHighlightRules = function() {
1097
1127
  "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
1098
1128
  }, "identifier");
1099
1129
 
1130
+ var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})";
1131
+
1132
+ var closeParen = {
1133
+ "(": ")",
1134
+ "[": "]",
1135
+ "{": "}",
1136
+ "<": ">",
1137
+ "^": "^",
1138
+ "|": "|",
1139
+ "%": "%"
1140
+ };
1141
+
1100
1142
  this.$rules = {
1101
- "start" : [
1143
+ "start": [
1102
1144
  {
1103
- token : "comment",
1104
- regex : "#.*$"
1145
+ token: "comment",
1146
+ regex: "#.*$"
1105
1147
  }, {
1106
- token : "comment", // multi line comment
1107
- regex : "^=begin(?:$|\\s.*$)",
1108
- next : "comment"
1148
+ token: "comment.multiline", // multi line comment
1149
+ regex: "^=begin(?=$|\\s.*$)",
1150
+ next: "comment"
1109
1151
  }, {
1110
- token : "string.regexp",
1111
- regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
1152
+ token: "string.regexp",
1153
+ regex: /[/](?=.*\/)/,
1154
+ next: "regex"
1112
1155
  },
1113
1156
 
1114
1157
  [{
1115
- regex: "[{}]", onMatch: function(val, state, stack) {
1116
- this.next = val == "{" ? this.nextState : "";
1117
- if (val == "{" && stack.length) {
1118
- stack.unshift("start", state);
1119
- return "paren.lparen";
1120
- }
1121
- if (val == "}" && stack.length) {
1122
- stack.shift();
1123
- this.next = stack.shift();
1124
- if (this.next.indexOf("string") != -1)
1125
- return "paren.end";
1126
- }
1127
- return val == "{" ? "paren.lparen" : "paren.rparen";
1128
- },
1129
- nextState: "start"
1130
- }, {
1131
- token : "string.start",
1132
- regex : /"/,
1133
- push : [{
1134
- token : "constant.language.escape",
1135
- regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
1158
+ token: ["constant.other.symbol.ruby", "string.start"],
1159
+ regex: /(:)?(")/,
1160
+ push: [{
1161
+ token: "constant.language.escape",
1162
+ regex: escapedChars
1136
1163
  }, {
1137
- token : "paren.start",
1138
- regex : /#{/,
1139
- push : "start"
1164
+ token: "paren.start",
1165
+ regex: /#{/,
1166
+ push: "start"
1140
1167
  }, {
1141
- token : "string.end",
1142
- regex : /"/,
1143
- next : "pop"
1168
+ token: "string.end",
1169
+ regex: /"/,
1170
+ next: "pop"
1144
1171
  }, {
1145
1172
  defaultToken: "string"
1146
1173
  }]
1147
1174
  }, {
1148
- token : "string.start",
1149
- regex : /`/,
1150
- push : [{
1151
- token : "constant.language.escape",
1152
- regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
1175
+ token: "string.start",
1176
+ regex: /`/,
1177
+ push: [{
1178
+ token: "constant.language.escape",
1179
+ regex: escapedChars
1153
1180
  }, {
1154
- token : "paren.start",
1155
- regex : /#{/,
1156
- push : "start"
1181
+ token: "paren.start",
1182
+ regex: /#{/,
1183
+ push: "start"
1157
1184
  }, {
1158
- token : "string.end",
1159
- regex : /`/,
1160
- next : "pop"
1185
+ token: "string.end",
1186
+ regex: /`/,
1187
+ next: "pop"
1161
1188
  }, {
1162
1189
  defaultToken: "string"
1163
1190
  }]
1164
1191
  }, {
1165
- token : "string.start",
1166
- regex : /'/,
1167
- push : [{
1168
- token : "constant.language.escape",
1169
- regex : /\\['\\]/
1170
- }, {
1171
- token : "string.end",
1172
- regex : /'/,
1173
- next : "pop"
1192
+ token: ["constant.other.symbol.ruby", "string.start"],
1193
+ regex: /(:)?(')/,
1194
+ push: [{
1195
+ token: "constant.language.escape",
1196
+ regex: /\\['\\]/
1197
+ }, {
1198
+ token: "string.end",
1199
+ regex: /'/,
1200
+ next: "pop"
1174
1201
  }, {
1175
1202
  defaultToken: "string"
1176
1203
  }]
1204
+ }, {
1205
+ token: "string.start",//doesn't see any differences between strings and array of strings in highlighting
1206
+ regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
1207
+ if (stack.length)
1208
+ stack = [];
1209
+ var paren = val[val.length - 1];
1210
+ stack.unshift(paren, state);
1211
+ this.next = "qStateWithoutInterpolation";
1212
+ return this.token;
1213
+ }
1214
+ }, {
1215
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
1216
+ regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
1217
+ if (stack.length)
1218
+ stack = [];
1219
+ var paren = val[val.length - 1];
1220
+ stack.unshift(paren, state);
1221
+ this.next = "qStateWithInterpolation";
1222
+ return this.token;
1223
+ }
1224
+ }, {
1225
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
1226
+ regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
1227
+ if (stack.length)
1228
+ stack = [];
1229
+ var paren = val[val.length - 1];
1230
+ stack.unshift(paren, state);
1231
+ this.next = "sStateWithoutInterpolation";
1232
+ return this.token;
1233
+ }
1234
+ }, {
1235
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
1236
+ regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
1237
+ if (stack.length)
1238
+ stack = [];
1239
+ var paren = val[val.length - 1];
1240
+ stack.unshift(paren, state);
1241
+ this.next = "sStateWithInterpolation";
1242
+ return this.token;
1243
+ }
1244
+ }, {
1245
+ token: "string.regexp",
1246
+ regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) {
1247
+ if (stack.length)
1248
+ stack = [];
1249
+ var paren = val[val.length - 1];
1250
+ stack.unshift(paren, state);
1251
+ this.next = "rState";
1252
+ return this.token;
1253
+ }
1177
1254
  }],
1178
1255
 
1179
1256
  {
1180
- token : "text", // namespaces aren't symbols
1181
- regex : "::"
1257
+ token: "punctuation", // namespaces aren't symbols
1258
+ regex: "::"
1259
+ },
1260
+ instanceVariable,
1261
+ {
1262
+ token: "variable.global", // global variable
1263
+ regex: "[$][a-zA-Z_\\d]+"
1264
+ }, {
1265
+ token: "support.class", // class name
1266
+ regex: "[A-Z][a-zA-Z_\\d]*"
1182
1267
  }, {
1183
- token : "variable.instance", // instance variable
1184
- regex : "@{1,2}[a-zA-Z_\\d]+"
1268
+ token: ["punctuation.operator", "support.function"],
1269
+ regex: /(\.)([a-zA-Z_\d]+)(?=\()/
1185
1270
  }, {
1186
- token : "support.class", // class name
1187
- regex : "[A-Z][a-zA-Z_\\d]+"
1271
+ token: ["punctuation.operator", "identifier"],
1272
+ regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/
1273
+ }, {
1274
+ token: "string.character",
1275
+ regex: "\\B\\?(?:" + escapedChars + "|\\S)"
1276
+ }, {
1277
+ token: "punctuation.operator",
1278
+ regex: /\?(?=.+:)/
1188
1279
  },
1189
1280
 
1281
+ constantNumericRational,
1282
+ constantNumericComplex,
1190
1283
  constantOtherSymbol,
1191
1284
  constantNumericHex,
1192
1285
  constantNumericFloat,
1193
-
1286
+ constantNumericBinary,
1287
+ constantNumericDecimal,
1288
+ constantNumericOctal,
1194
1289
  {
1195
- token : "constant.language.boolean",
1196
- regex : "(?:true|false)\\b"
1290
+ token: "constant.language.boolean",
1291
+ regex: "(?:true|false)\\b"
1197
1292
  }, {
1198
- token : keywordMapper,
1199
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
1293
+ token: keywordMapper,
1294
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
1200
1295
  }, {
1201
- token : "punctuation.separator.key-value",
1202
- regex : "=>"
1296
+ token: "punctuation.separator.key-value",
1297
+ regex: "=>"
1203
1298
  }, {
1204
1299
  stateName: "heredoc",
1205
- onMatch : function(value, currentState, stack) {
1206
- var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
1300
+ onMatch: function (value, currentState, stack) {
1301
+ var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc";
1207
1302
  var tokens = value.split(this.splitRegex);
1208
1303
  stack.push(next, tokens[3]);
1209
1304
  return [
1210
- {type:"constant", value: tokens[1]},
1211
- {type:"string", value: tokens[2]},
1212
- {type:"support.class", value: tokens[3]},
1213
- {type:"string", value: tokens[4]}
1305
+ {type: "constant", value: tokens[1]},
1306
+ {type: "string", value: tokens[2]},
1307
+ {type: "support.class", value: tokens[3]},
1308
+ {type: "string", value: tokens[4]}
1214
1309
  ];
1215
1310
  },
1216
- regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
1311
+ regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",
1217
1312
  rules: {
1218
1313
  heredoc: [{
1219
- onMatch: function(value, currentState, stack) {
1314
+ onMatch: function(value, currentState, stack) {
1220
1315
  if (value === stack[1]) {
1221
1316
  stack.shift();
1222
1317
  stack.shift();
@@ -1233,7 +1328,7 @@ var RubyHighlightRules = function() {
1233
1328
  token: "string",
1234
1329
  regex: "^ +"
1235
1330
  }, {
1236
- onMatch: function(value, currentState, stack) {
1331
+ onMatch: function(value, currentState, stack) {
1237
1332
  if (value === stack[1]) {
1238
1333
  stack.shift();
1239
1334
  stack.shift();
@@ -1248,38 +1343,261 @@ var RubyHighlightRules = function() {
1248
1343
  }]
1249
1344
  }
1250
1345
  }, {
1251
- regex : "$",
1252
- token : "empty",
1253
- next : function(currentState, stack) {
1346
+ regex: "$",
1347
+ token: "empty",
1348
+ next: function(currentState, stack) {
1254
1349
  if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
1255
1350
  return stack[0];
1256
1351
  return currentState;
1257
1352
  }
1353
+ }, {
1354
+ token: "keyword.operator",
1355
+ regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"
1356
+ }, {
1357
+ token: "paren.lparen",
1358
+ regex: "[[({]"
1359
+ }, {
1360
+ token: "paren.rparen",
1361
+ regex: "[\\])}]",
1362
+ onMatch: function(value, currentState, stack) {
1363
+ this.next = '';
1364
+ if (value == "}" && stack.length > 1 && stack[1] != "start") {
1365
+ stack.shift();
1366
+ this.next = stack.shift();
1367
+ }
1368
+ return this.token;
1369
+ }
1258
1370
  }, {
1259
- token : "string.character",
1260
- regex : "\\B\\?."
1371
+ token: "text",
1372
+ regex: "\\s+"
1261
1373
  }, {
1262
- token : "keyword.operator",
1263
- regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
1374
+ token: "punctuation.operator",
1375
+ regex: /[?:,;.]/
1376
+ }
1377
+ ],
1378
+ "comment": [
1379
+ {
1380
+ token: "comment.multiline", // closing comment
1381
+ regex: "^=end(?=$|\\s.*$)",
1382
+ next: "start"
1264
1383
  }, {
1265
- token : "paren.lparen",
1266
- regex : "[[({]"
1384
+ token: "comment", // comment spanning whole line
1385
+ regex: ".+"
1386
+ }
1387
+ ],
1388
+ "qStateWithInterpolation": [{
1389
+ token: "string.start",// excluded nested |^% due to difficulty in realization
1390
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
1391
+ if (stack.length && val === stack[0]) {
1392
+ stack.unshift(val, state);
1393
+ return this.token;
1394
+ }
1395
+ return "string";
1396
+ }
1397
+ }, {
1398
+ token: "constant.language.escape",
1399
+ regex: escapedChars
1400
+ }, {
1401
+ token: "constant.language.escape",
1402
+ regex: /\\./
1403
+ }, {
1404
+ token: "paren.start",
1405
+ regex: /#{/,
1406
+ push: "start"
1407
+ }, {
1408
+ token: "string.end",
1409
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
1410
+ if (stack.length && val === closeParen[stack[0]]) {
1411
+ stack.shift();
1412
+ this.next = stack.shift();
1413
+ return this.token;
1414
+ }
1415
+ this.next = '';
1416
+ return "string";
1417
+ }
1418
+ }, {
1419
+ defaultToken: "string"
1420
+ }],
1421
+ "qStateWithoutInterpolation": [{
1422
+ token: "string.start",// excluded nested |^% due to difficulty in realization
1423
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
1424
+ if (stack.length && val === stack[0]) {
1425
+ stack.unshift(val, state);
1426
+ return this.token;
1427
+ }
1428
+ return "string";
1429
+ }
1430
+ }, {
1431
+ token: "constant.language.escape",
1432
+ regex: /\\['\\]/
1433
+ }, {
1434
+ token: "constant.language.escape",
1435
+ regex: /\\./
1436
+ }, {
1437
+ token: "string.end",
1438
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
1439
+ if (stack.length && val === closeParen[stack[0]]) {
1440
+ stack.shift();
1441
+ this.next = stack.shift();
1442
+ return this.token;
1443
+ }
1444
+ this.next = '';
1445
+ return "string";
1446
+ }
1447
+ }, {
1448
+ defaultToken: "string"
1449
+ }],
1450
+ "sStateWithoutInterpolation": [{
1451
+ token: "constant.other.symbol.ruby",// excluded nested |^% due to difficulty in realization
1452
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
1453
+ if (stack.length && val === stack[0]) {
1454
+ stack.unshift(val, state);
1455
+ return this.token;
1456
+ }
1457
+ return "constant.other.symbol.ruby";
1458
+ }
1459
+ }, {
1460
+ token: "constant.other.symbol.ruby",
1461
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
1462
+ if (stack.length && val === closeParen[stack[0]]) {
1463
+ stack.shift();
1464
+ this.next = stack.shift();
1465
+ return this.token;
1466
+ }
1467
+ this.next = '';
1468
+ return "constant.other.symbol.ruby";
1469
+ }
1470
+ }, {
1471
+ defaultToken: "constant.other.symbol.ruby"
1472
+ }],
1473
+ "sStateWithInterpolation": [{
1474
+ token: "constant.other.symbol.ruby",// excluded nested |^% due to difficulty in realization
1475
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
1476
+ if (stack.length && val === stack[0]) {
1477
+ stack.unshift(val, state);
1478
+ return this.token;
1479
+ }
1480
+ return "constant.other.symbol.ruby";
1481
+ }
1482
+ }, {
1483
+ token: "constant.language.escape",
1484
+ regex: escapedChars
1485
+ }, {
1486
+ token: "constant.language.escape",
1487
+ regex: /\\./
1488
+ }, {
1489
+ token: "paren.start",
1490
+ regex: /#{/,
1491
+ push: "start"
1492
+ }, {
1493
+ token: "constant.other.symbol.ruby",
1494
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
1495
+ if (stack.length && val === closeParen[stack[0]]) {
1496
+ stack.shift();
1497
+ this.next = stack.shift();
1498
+ return this.token;
1499
+ }
1500
+ this.next = '';
1501
+ return "constant.other.symbol.ruby";
1502
+ }
1503
+ }, {
1504
+ defaultToken: "constant.other.symbol.ruby"
1505
+ }],
1506
+ "rState": [{
1507
+ token: "string.regexp",// excluded nested |^% due to difficulty in realization
1508
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
1509
+ if (stack.length && val === stack[0]) {
1510
+ stack.unshift(val, state);
1511
+ return this.token;
1512
+ }
1513
+ return "constant.language.escape";
1514
+ }
1515
+ }, {
1516
+ token: "paren.start",
1517
+ regex: /#{/,
1518
+ push: "start"
1519
+ }, {
1520
+ token: "string.regexp",
1521
+ regex: /\//
1522
+ }, {
1523
+ token: "string.regexp",
1524
+ regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) {
1525
+ if (stack.length && val[0] === closeParen[stack[0]]) {
1526
+ stack.shift();
1527
+ this.next = stack.shift();
1528
+ return this.token;
1529
+ }
1530
+ this.next = '';
1531
+ return "constant.language.escape";
1532
+ }
1533
+ },
1534
+ {include: "regex"},
1535
+ {
1536
+ defaultToken: "string.regexp"
1537
+ }],
1538
+ "regex": [
1539
+ {// character classes
1540
+ token: "regexp.keyword",
1541
+ regex: /\\[wWdDhHsS]/
1267
1542
  }, {
1268
- token : "paren.rparen",
1269
- regex : "[\\])}]"
1543
+ token: "constant.language.escape",
1544
+ regex: /\\[AGbBzZ]/
1270
1545
  }, {
1271
- token : "text",
1272
- regex : "\\s+"
1546
+ token: "constant.language.escape",
1547
+ regex: /\\g<[a-zA-Z0-9]*>/
1548
+ }, {
1549
+ token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"],
1550
+ regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/
1551
+ }, {
1552
+ token: ["constant.language.escape", "invalid", "constant.language.escape"],
1553
+ regex: /(\\p{\^?)([^/]*)(})/
1554
+ }, {// escapes
1555
+ token: "regexp.keyword.operator",
1556
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1557
+ }, {// flag
1558
+ token: "string.regexp",
1559
+ regex: /[/][imxouesn]*/,
1560
+ next: "start"
1561
+ }, {// invalid operators
1562
+ token: "invalid",
1563
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
1564
+ }, {// operators
1565
+ token: "constant.language.escape",
1566
+ regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
1567
+ }, {
1568
+ token: "constant.language.delimiter",
1569
+ regex: /\|/
1570
+ }, {
1571
+ token: "regexp.keyword",
1572
+ regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/
1573
+ }, {
1574
+ token: "constant.language.escape",
1575
+ regex: /\[\^?/,
1576
+ push: "regex_character_class"
1577
+ }, {
1578
+ defaultToken: "string.regexp"
1273
1579
  }
1274
1580
  ],
1275
- "comment" : [
1581
+ "regex_character_class": [
1276
1582
  {
1277
- token : "comment", // closing comment
1278
- regex : "^=end(?:$|\\s.*$)",
1279
- next : "start"
1583
+ token: "regexp.keyword",
1584
+ regex: /\\[wWdDhHsS]/
1280
1585
  }, {
1281
- token : "comment", // comment spanning whole line
1282
- regex : ".+"
1586
+ token: "regexp.charclass.keyword.operator",
1587
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1588
+ }, {
1589
+ token: "constant.language.escape",
1590
+ regex: /&?&?\[\^?/,
1591
+ push: "regex_character_class"
1592
+ }, {
1593
+ token: "constant.language.escape",
1594
+ regex: "]",
1595
+ next: "pop"
1596
+ }, {
1597
+ token: "constant.language.escape",
1598
+ regex: "-"
1599
+ }, {
1600
+ defaultToken: "string.regexp.characterclass"
1283
1601
  }
1284
1602
  ]
1285
1603
  };
@@ -1408,8 +1726,8 @@ oop.inherits(FoldMode, BaseFoldMode);
1408
1726
 
1409
1727
  (function() {
1410
1728
 
1411
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
1412
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
1729
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1730
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1413
1731
  this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
1414
1732
  this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1415
1733
  this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
@@ -1609,6 +1927,7 @@ oop.inherits(Mode, TextMode);
1609
1927
  };
1610
1928
 
1611
1929
  this.$id = "ace/mode/javascript";
1930
+ this.snippetFileId = "ace/snippets/javascript";
1612
1931
  }).call(Mode.prototype);
1613
1932
 
1614
1933
  exports.Mode = Mode;
@@ -1726,18 +2045,14 @@ var CssCompletions = function() {
1726
2045
  }
1727
2046
 
1728
2047
  this.completionsDefined = true;
1729
- }
2048
+ };
1730
2049
 
1731
2050
  this.getCompletions = function(state, session, pos, prefix) {
1732
2051
  if (!this.completionsDefined) {
1733
2052
  this.defineCompletions();
1734
2053
  }
1735
2054
 
1736
- var token = session.getTokenAt(pos.row, pos.column);
1737
-
1738
- if (!token)
1739
- return [];
1740
- if (state==='ruleset'){
2055
+ if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") {
1741
2056
  var line = session.getLine(pos.row).substr(0, pos.column);
1742
2057
  if (/:[^;]+$/.test(line)) {
1743
2058
  /([\w\-]+):[^:]*$/.test(line);
@@ -1756,9 +2071,9 @@ var CssCompletions = function() {
1756
2071
  return properties.map(function(property){
1757
2072
  return {
1758
2073
  caption: property,
1759
- snippet: property + ': $0',
2074
+ snippet: property + ': $0;',
1760
2075
  meta: "property",
1761
- score: Number.MAX_VALUE
2076
+ score: 1000000
1762
2077
  };
1763
2078
  });
1764
2079
  };
@@ -1778,7 +2093,7 @@ var CssCompletions = function() {
1778
2093
  caption: value,
1779
2094
  snippet: value,
1780
2095
  meta: "property value",
1781
- score: Number.MAX_VALUE
2096
+ score: 1000000
1782
2097
  };
1783
2098
  });
1784
2099
  };
@@ -1801,7 +2116,7 @@ var CssBehaviour = function () {
1801
2116
  this.inherit(CstyleBehaviour);
1802
2117
 
1803
2118
  this.add("colon", "insertion", function (state, action, editor, session, text) {
1804
- if (text === ':') {
2119
+ if (text === ':' && editor.selection.isEmpty()) {
1805
2120
  var cursor = editor.getCursorPosition();
1806
2121
  var iterator = new TokenIterator(session, cursor.row, cursor.column);
1807
2122
  var token = iterator.getCurrentToken();
@@ -1815,13 +2130,13 @@ var CssBehaviour = function () {
1815
2130
  return {
1816
2131
  text: '',
1817
2132
  selection: [1, 1]
1818
- }
2133
+ };
1819
2134
  }
1820
- if (!line.substring(cursor.column).match(/^\s*;/)) {
2135
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1821
2136
  return {
1822
2137
  text: ':;',
1823
2138
  selection: [1, 1]
1824
- }
2139
+ };
1825
2140
  }
1826
2141
  }
1827
2142
  }
@@ -1848,7 +2163,7 @@ var CssBehaviour = function () {
1848
2163
  });
1849
2164
 
1850
2165
  this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1851
- if (text === ';') {
2166
+ if (text === ';' && editor.selection.isEmpty()) {
1852
2167
  var cursor = editor.getCursorPosition();
1853
2168
  var line = session.doc.getLine(cursor.row);
1854
2169
  var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -1856,12 +2171,26 @@ var CssBehaviour = function () {
1856
2171
  return {
1857
2172
  text: '',
1858
2173
  selection: [1, 1]
1859
- }
2174
+ };
1860
2175
  }
1861
2176
  }
1862
2177
  });
1863
2178
 
1864
- }
2179
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
2180
+ if (text === '!' && editor.selection.isEmpty()) {
2181
+ var cursor = editor.getCursorPosition();
2182
+ var line = session.doc.getLine(cursor.row);
2183
+
2184
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
2185
+ return {
2186
+ text: '!important',
2187
+ selection: [10, 10]
2188
+ };
2189
+ }
2190
+ }
2191
+ });
2192
+
2193
+ };
1865
2194
  oop.inherits(CssBehaviour, CstyleBehaviour);
1866
2195
 
1867
2196
  exports.CssBehaviour = CssBehaviour;
@@ -1936,6 +2265,7 @@ oop.inherits(Mode, TextMode);
1936
2265
  };
1937
2266
 
1938
2267
  this.$id = "ace/mode/css";
2268
+ this.snippetFileId = "ace/snippets/css";
1939
2269
  }).call(Mode.prototype);
1940
2270
 
1941
2271
  exports.Mode = Mode;
@@ -1951,7 +2281,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator;
1951
2281
  var lang = require("../../lib/lang");
1952
2282
 
1953
2283
  function is(token, type) {
1954
- return token.type.lastIndexOf(type + ".xml") > -1;
2284
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1955
2285
  }
1956
2286
 
1957
2287
  var XmlBehaviour = function () {
@@ -2021,14 +2351,19 @@ var XmlBehaviour = function () {
2021
2351
  if (is(token, "reference.attribute-value"))
2022
2352
  return;
2023
2353
  if (is(token, "attribute-value")) {
2024
- var firstChar = token.value.charAt(0);
2025
- if (firstChar == '"' || firstChar == "'") {
2026
- var lastChar = token.value.charAt(token.value.length - 1);
2027
- var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
2028
- if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
2354
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
2355
+ if (position.column < tokenEndColumn)
2356
+ return;
2357
+ if (position.column == tokenEndColumn) {
2358
+ var nextToken = iterator.stepForward();
2359
+ if (nextToken && is(nextToken, "attribute-value"))
2029
2360
  return;
2361
+ iterator.stepBackward();
2030
2362
  }
2031
2363
  }
2364
+
2365
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
2366
+ return;
2032
2367
  while (!is(token, "tag-name")) {
2033
2368
  token = iterator.stepBackward();
2034
2369
  if (token.value == "<") {
@@ -2218,7 +2553,7 @@ function is(token, type) {
2218
2553
  if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
2219
2554
  return "start";
2220
2555
  return "";
2221
- }
2556
+ };
2222
2557
  this._getFirstTagInLine = function(session, row) {
2223
2558
  var tokens = session.getTokens(row);
2224
2559
  var tag = new Tag();
@@ -2521,120 +2856,120 @@ var eventAttributes = [
2521
2856
  var globalAttributes = commonAttributes.concat(eventAttributes);
2522
2857
 
2523
2858
  var attributeMap = {
2524
- "html": {"manifest": 1},
2525
- "head": {},
2526
- "title": {},
2527
- "base": {"href": 1, "target": 1},
2528
- "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2529
- "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2530
- "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2531
- "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2532
- "noscript": {"href": 1},
2533
- "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2534
- "section": {},
2535
- "nav": {},
2859
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
2860
+ "abbr": {},
2861
+ "address": {},
2862
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2536
2863
  "article": {"pubdate": 1},
2537
2864
  "aside": {},
2865
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2866
+ "b": {},
2867
+ "base": {"href": 1, "target": 1},
2868
+ "bdi": {},
2869
+ "bdo": {},
2870
+ "blockquote": {"cite": 1},
2871
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2872
+ "br": {},
2873
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2874
+ "canvas": {"width": 1, "height": 1},
2875
+ "caption": {},
2876
+ "cite": {},
2877
+ "code": {},
2878
+ "col": {"span": 1},
2879
+ "colgroup": {"span": 1},
2880
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2881
+ "data": {},
2882
+ "datalist": {},
2883
+ "dd": {},
2884
+ "del": {"cite": 1, "datetime": 1},
2885
+ "details": {"open": 1},
2886
+ "dfn": {},
2887
+ "dialog": {"open": 1},
2888
+ "div": {},
2889
+ "dl": {},
2890
+ "dt": {},
2891
+ "em": {},
2892
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2893
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
2894
+ "figcaption": {},
2895
+ "figure": {},
2896
+ "footer": {},
2897
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2538
2898
  "h1": {},
2539
2899
  "h2": {},
2540
2900
  "h3": {},
2541
2901
  "h4": {},
2542
2902
  "h5": {},
2543
2903
  "h6": {},
2904
+ "head": {},
2544
2905
  "header": {},
2545
- "footer": {},
2546
- "address": {},
2906
+ "hr": {},
2907
+ "html": {"manifest": 1},
2908
+ "i": {},
2909
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2910
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2911
+ "input": {
2912
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2913
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2914
+ "ins": {"cite": 1, "datetime": 1},
2915
+ "kbd": {},
2916
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2917
+ "label": {"form": 1, "for": 1},
2918
+ "legend": {},
2919
+ "li": {"value": 1},
2920
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2547
2921
  "main": {},
2922
+ "map": {"name": 1},
2923
+ "mark": {},
2924
+ "math": {},
2925
+ "menu": {"type": 1, "label": 1},
2926
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2927
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2928
+ "nav": {},
2929
+ "noscript": {"href": 1},
2930
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2931
+ "ol": {"start": 1, "reversed": 1},
2932
+ "optgroup": {"disabled": 1, "label": 1},
2933
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2934
+ "output": {"for": 1, "form": 1, "name": 1},
2548
2935
  "p": {},
2549
- "hr": {},
2936
+ "param": {"name": 1, "value": 1},
2550
2937
  "pre": {},
2551
- "blockquote": {"cite": 1},
2552
- "ol": {"start": 1, "reversed": 1},
2553
- "ul": {},
2554
- "li": {"value": 1},
2555
- "dl": {},
2556
- "dt": {},
2557
- "dd": {},
2558
- "figure": {},
2559
- "figcaption": {},
2560
- "div": {},
2561
- "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
2562
- "em": {},
2563
- "strong": {},
2564
- "small": {},
2565
- "s": {},
2566
- "cite": {},
2938
+ "progress": {"value": 1, "max": 1},
2567
2939
  "q": {"cite": 1},
2568
- "dfn": {},
2569
- "abbr": {},
2570
- "data": {},
2571
- "time": {"datetime": 1},
2572
- "code": {},
2573
- "var": {},
2940
+ "rp": {},
2941
+ "rt": {},
2942
+ "ruby": {},
2943
+ "s": {},
2574
2944
  "samp": {},
2575
- "kbd": {},
2945
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2946
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2947
+ "small": {},
2948
+ "source": {"src": 1, "type": 1, "media": 1},
2949
+ "span": {},
2950
+ "strong": {},
2951
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2576
2952
  "sub": {},
2577
2953
  "sup": {},
2578
- "i": {},
2579
- "b": {},
2580
- "u": {},
2581
- "mark": {},
2582
- "ruby": {},
2583
- "rt": {},
2584
- "rp": {},
2585
- "bdi": {},
2586
- "bdo": {},
2587
- "span": {},
2588
- "br": {},
2589
- "wbr": {},
2590
- "ins": {"cite": 1, "datetime": 1},
2591
- "del": {"cite": 1, "datetime": 1},
2592
- "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2593
- "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2594
- "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2595
- "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2596
- "param": {"name": 1, "value": 1},
2597
- "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2598
- "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2599
- "source": {"src": 1, "type": 1, "media": 1},
2600
- "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2601
- "canvas": {"width": 1, "height": 1},
2602
- "map": {"name": 1},
2603
- "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2604
2954
  "svg": {},
2605
- "math": {},
2606
2955
  "table": {"summary": 1},
2607
- "caption": {},
2608
- "colgroup": {"span": 1},
2609
- "col": {"span": 1},
2610
2956
  "tbody": {},
2611
- "thead": {},
2612
- "tfoot": {},
2613
- "tr": {},
2614
2957
  "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2615
- "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2616
- "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2617
- "fieldset": {"disabled": 1, "form": 1, "name": 1},
2618
- "legend": {},
2619
- "label": {"form": 1, "for": 1},
2620
- "input": {
2621
- "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2622
- "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2623
- "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2624
- "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2625
- "datalist": {},
2626
- "optgroup": {"disabled": 1, "label": 1},
2627
- "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2628
2958
  "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
2629
- "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2630
- "output": {"for": 1, "form": 1, "name": 1},
2631
- "progress": {"value": 1, "max": 1},
2632
- "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2633
- "details": {"open": 1},
2959
+ "tfoot": {},
2960
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2961
+ "thead": {},
2962
+ "time": {"datetime": 1},
2963
+ "title": {},
2964
+ "tr": {},
2965
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2966
+ "section": {},
2634
2967
  "summary": {},
2635
- "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2636
- "menu": {"type": 1, "label": 1},
2637
- "dialog": {"open": 1}
2968
+ "u": {},
2969
+ "ul": {},
2970
+ "var": {},
2971
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2972
+ "wbr": {}
2638
2973
  };
2639
2974
 
2640
2975
  var elements = Object.keys(attributeMap);
@@ -2692,7 +3027,7 @@ var HtmlCompletions = function() {
2692
3027
  return {
2693
3028
  value: element,
2694
3029
  meta: "tag",
2695
- score: Number.MAX_VALUE
3030
+ score: 1000000
2696
3031
  };
2697
3032
  });
2698
3033
  };
@@ -2710,7 +3045,7 @@ var HtmlCompletions = function() {
2710
3045
  caption: attribute,
2711
3046
  snippet: attribute + '="$0"',
2712
3047
  meta: "attribute",
2713
- score: Number.MAX_VALUE
3048
+ score: 1000000
2714
3049
  };
2715
3050
  });
2716
3051
  };
@@ -2730,7 +3065,7 @@ var HtmlCompletions = function() {
2730
3065
  caption: value,
2731
3066
  snippet: value,
2732
3067
  meta: "attribute value",
2733
- score: Number.MAX_VALUE
3068
+ score: 1000000
2734
3069
  };
2735
3070
  });
2736
3071
  };
@@ -2743,7 +3078,7 @@ var HtmlCompletions = function() {
2743
3078
  caption: value,
2744
3079
  snippet: value,
2745
3080
  meta: "html entity",
2746
- score: Number.MAX_VALUE
3081
+ score: 1000000
2747
3082
  };
2748
3083
  });
2749
3084
  };
@@ -2823,99 +3158,277 @@ oop.inherits(Mode, TextMode);
2823
3158
  };
2824
3159
 
2825
3160
  this.$id = "ace/mode/html";
3161
+ this.snippetFileId = "ace/snippets/html";
2826
3162
  }).call(Mode.prototype);
2827
3163
 
2828
3164
  exports.Mode = Mode;
2829
3165
  });
2830
3166
 
2831
- define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
3167
+ define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function (require, exports, module) {
2832
3168
  "use strict";
2833
3169
 
2834
3170
  var oop = require("../../lib/oop");
2835
3171
  var BaseFoldMode = require("./fold_mode").FoldMode;
2836
3172
  var Range = require("../../range").Range;
3173
+ var TokenIterator = require("../../token_iterator").TokenIterator;
3174
+
3175
+
3176
+ var FoldMode = exports.FoldMode = function () {
3177
+ };
2837
3178
 
2838
- var FoldMode = exports.FoldMode = function() {};
2839
3179
  oop.inherits(FoldMode, BaseFoldMode);
2840
3180
 
2841
- (function() {
3181
+ (function () {
3182
+ this.indentKeywords = {
3183
+ "class": 1,
3184
+ "def": 1,
3185
+ "module": 1,
3186
+ "do": 1,
3187
+ "unless": 1,
3188
+ "if": 1,
3189
+ "while": 1,
3190
+ "for": 1,
3191
+ "until": 1,
3192
+ "begin": 1,
3193
+ "else": 0,
3194
+ "elsif": 0,
3195
+ "rescue": 0,
3196
+ "ensure": 0,
3197
+ "when": 0,
3198
+ "end": -1,
3199
+ "case": 1,
3200
+ "=begin": 1,
3201
+ "=end": -1
3202
+ };
2842
3203
 
2843
- this.getFoldWidgetRange = function(session, foldStyle, row) {
2844
- var range = this.indentationBlock(session, row);
2845
- if (range)
2846
- return range;
3204
+ this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/;
3205
+ this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/;
2847
3206
 
2848
- var re = /\S/;
3207
+ this.getFoldWidget = function (session, foldStyle, row) {
2849
3208
  var line = session.getLine(row);
2850
- var startLevel = line.search(re);
2851
- if (startLevel == -1 || line[startLevel] != "#")
2852
- return;
2853
-
2854
- var startColumn = line.length;
2855
- var maxRow = session.getLength();
2856
- var startRow = row;
2857
- var endRow = row;
3209
+ var isStart = this.foldingStartMarker.test(line);
3210
+ var isEnd = this.foldingStopMarker.test(line);
3211
+
3212
+ if (isStart && !isEnd) {
3213
+ var match = line.match(this.foldingStartMarker);
3214
+ if (match[1]) {
3215
+ if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") {
3216
+ if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) {
3217
+ return;
3218
+ }
3219
+ if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) {
3220
+ return;
3221
+ }
3222
+ }
2858
3223
 
2859
- while (++row < maxRow) {
2860
- line = session.getLine(row);
2861
- var level = line.search(re);
3224
+ if (match[1] == "when") {
3225
+ if (/\sthen\s/.test(line) === true) {
3226
+ return;
3227
+ }
3228
+ }
3229
+ if (session.getTokenAt(row, match.index + 2).type === "keyword")
3230
+ return "start";
3231
+ } else if (match[3]) {
3232
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
3233
+ return "start";
3234
+ } else {
3235
+ return "start";
3236
+ }
3237
+ }
3238
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
3239
+ return "";
2862
3240
 
2863
- if (level == -1)
2864
- continue;
3241
+ var match = line.match(this.foldingStopMarker);
3242
+ if (match[3] === "end") {
3243
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
3244
+ return "end";
3245
+ } else if (match[1]) {
3246
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
3247
+ return "end";
3248
+ } else
3249
+ return "end";
3250
+ };
2865
3251
 
2866
- if (line[level] != "#")
2867
- break;
3252
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
3253
+ var line = session.doc.getLine(row);
3254
+ var match = this.foldingStartMarker.exec(line);
3255
+ if (match) {
3256
+ if (match[1] || match[3])
3257
+ return this.rubyBlock(session, row, match.index + 2);
2868
3258
 
2869
- endRow = row;
3259
+ return this.openingBracketBlock(session, "{", row, match.index);
2870
3260
  }
2871
3261
 
2872
- if (endRow > startRow) {
2873
- var endColumn = session.getLine(endRow).length;
2874
- return new Range(startRow, startColumn, endRow, endColumn);
3262
+ var match = this.foldingStopMarker.exec(line);
3263
+ if (match) {
3264
+ if (match[3] === "end") {
3265
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
3266
+ return this.rubyBlock(session, row, match.index + 1);
3267
+ }
3268
+
3269
+ if (match[1] === "=end") {
3270
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
3271
+ return this.rubyBlock(session, row, match.index + 1);
3272
+ }
3273
+
3274
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
2875
3275
  }
2876
3276
  };
2877
- this.getFoldWidget = function(session, foldStyle, row) {
3277
+
3278
+ this.rubyBlock = function (session, row, column, tokenRange) {
3279
+ var stream = new TokenIterator(session, row, column);
3280
+
3281
+ var token = stream.getCurrentToken();
3282
+ if (!token || (token.type != "keyword" && token.type != "comment.multiline"))
3283
+ return;
3284
+
3285
+ var val = token.value;
2878
3286
  var line = session.getLine(row);
2879
- var indent = line.search(/\S/);
2880
- var next = session.getLine(row + 1);
2881
- var prev = session.getLine(row - 1);
2882
- var prevIndent = prev.search(/\S/);
2883
- var nextIndent = next.search(/\S/);
2884
-
2885
- if (indent == -1) {
2886
- session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
2887
- return "";
3287
+ switch (token.value) {
3288
+ case "if":
3289
+ case "unless":
3290
+ case "while":
3291
+ case "until":
3292
+ var checkToken = new RegExp("^\\s*" + token.value);
3293
+ if (!checkToken.test(line)) {
3294
+ return;
3295
+ }
3296
+ var dir = this.indentKeywords[val];
3297
+ break;
3298
+ case "when":
3299
+ if (/\sthen\s/.test(line)) {
3300
+ return;
3301
+ }
3302
+ case "elsif":
3303
+ case "rescue":
3304
+ case "ensure":
3305
+ var dir = 1;
3306
+ break;
3307
+ case "else":
3308
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
3309
+ if (!checkToken.test(line)) {
3310
+ return;
3311
+ }
3312
+ var dir = 1;
3313
+ break;
3314
+ default:
3315
+ var dir = this.indentKeywords[val];
3316
+ break;
2888
3317
  }
2889
- if (prevIndent == -1) {
2890
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
2891
- session.foldWidgets[row - 1] = "";
2892
- session.foldWidgets[row + 1] = "";
2893
- return "start";
3318
+
3319
+ var stack = [val];
3320
+ if (!dir)
3321
+ return;
3322
+
3323
+ var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length;
3324
+ var startRow = row;
3325
+ var ranges = [];
3326
+ ranges.push(stream.getCurrentTokenRange());
3327
+
3328
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
3329
+ if (token.type == "comment.multiline") {
3330
+ while (token = stream.step()) {
3331
+ if (token.type !== "comment.multiline")
3332
+ continue;
3333
+ if (dir == 1) {
3334
+ startColumn = 6;
3335
+ if (token.value == "=end") {
3336
+ break;
3337
+ }
3338
+ } else {
3339
+ if (token.value == "=begin") {
3340
+ break;
3341
+ }
3342
+ }
2894
3343
  }
2895
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
2896
- if (session.getLine(row - 2).search(/\S/) == -1) {
2897
- session.foldWidgets[row - 1] = "start";
2898
- session.foldWidgets[row + 1] = "";
2899
- return "";
3344
+ } else {
3345
+ while (token = stream.step()) {
3346
+ var ignore = false;
3347
+ if (token.type !== "keyword")
3348
+ continue;
3349
+ var level = dir * this.indentKeywords[token.value];
3350
+ line = session.getLine(stream.getCurrentTokenRow());
3351
+ switch (token.value) {
3352
+ case "do":
3353
+ for (var i = stream.$tokenIndex - 1; i >= 0; i--) {
3354
+ var prevToken = stream.$rowTokens[i];
3355
+ if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) {
3356
+ level = 0;
3357
+ break;
3358
+ }
3359
+ }
3360
+ break;
3361
+ case "else":
3362
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
3363
+ if (!checkToken.test(line) || val == "case") {
3364
+ level = 0;
3365
+ ignore = true;
3366
+ }
3367
+ break;
3368
+ case "if":
3369
+ case "unless":
3370
+ case "while":
3371
+ case "until":
3372
+ var checkToken = new RegExp("^\\s*" + token.value);
3373
+ if (!checkToken.test(line)) {
3374
+ level = 0;
3375
+ ignore = true;
3376
+ }
3377
+ break;
3378
+ case "when":
3379
+ if (/\sthen\s/.test(line) || val == "case") {
3380
+ level = 0;
3381
+ ignore = true;
3382
+ }
3383
+ break;
3384
+ }
3385
+
3386
+ if (level > 0) {
3387
+ stack.unshift(token.value);
3388
+ } else if (level <= 0 && ignore === false) {
3389
+ stack.shift();
3390
+ if (!stack.length) {
3391
+ if ((val == "while" || val == "until" || val == "for") && token.value != "do") {
3392
+ break;
3393
+ }
3394
+ if (token.value == "do" && dir == -1 && level != 0)
3395
+ break;
3396
+ if (token.value != "do")
3397
+ break;
3398
+ }
3399
+
3400
+ if (level === 0) {
3401
+ stack.unshift(token.value);
3402
+ }
3403
+ }
2900
3404
  }
2901
3405
  }
2902
3406
 
2903
- if (prevIndent!= -1 && prevIndent < indent)
2904
- session.foldWidgets[row - 1] = "start";
2905
- else
2906
- session.foldWidgets[row - 1] = "";
3407
+ if (!token)
3408
+ return null;
2907
3409
 
2908
- if (indent < nextIndent)
2909
- return "start";
2910
- else
2911
- return "";
3410
+ if (tokenRange) {
3411
+ ranges.push(stream.getCurrentTokenRange());
3412
+ return ranges;
3413
+ }
3414
+
3415
+ var row = stream.getCurrentTokenRow();
3416
+ if (dir === -1) {
3417
+ if (token.type === "comment.multiline") {
3418
+ var endColumn = 6;
3419
+ } else {
3420
+ var endColumn = session.getLine(row).length;
3421
+ }
3422
+ return new Range(row, endColumn, startRow - 1, startColumn);
3423
+ } else
3424
+ return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length);
2912
3425
  };
2913
3426
 
2914
3427
  }).call(FoldMode.prototype);
2915
3428
 
2916
3429
  });
2917
3430
 
2918
- define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
3431
+ define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/ruby"], function(require, exports, module) {
2919
3432
  "use strict";
2920
3433
 
2921
3434
  var oop = require("../lib/oop");
@@ -2924,13 +3437,14 @@ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
2924
3437
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2925
3438
  var Range = require("../range").Range;
2926
3439
  var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
2927
- var FoldMode = require("./folding/coffee").FoldMode;
3440
+ var FoldMode = require("./folding/ruby").FoldMode;
2928
3441
 
2929
3442
  var Mode = function() {
2930
3443
  this.HighlightRules = RubyHighlightRules;
2931
3444
  this.$outdent = new MatchingBraceOutdent();
2932
3445
  this.$behaviour = new CstyleBehaviour();
2933
3446
  this.foldingRules = new FoldMode();
3447
+ this.indentKeywords = this.foldingRules.indentKeywords;
2934
3448
  };
2935
3449
  oop.inherits(Mode, TextMode);
2936
3450
 
@@ -2945,7 +3459,7 @@ oop.inherits(Mode, TextMode);
2945
3459
  var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
2946
3460
  var tokens = tokenizedLine.tokens;
2947
3461
 
2948
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
3462
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
2949
3463
  return indent;
2950
3464
  }
2951
3465
 
@@ -2953,7 +3467,7 @@ oop.inherits(Mode, TextMode);
2953
3467
  var match = line.match(/^.*[\{\(\[]\s*$/);
2954
3468
  var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
2955
3469
  var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
2956
- var startingConditional = line.match(/^\s*(if|else|when)\s*/)
3470
+ var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);
2957
3471
  if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
2958
3472
  indent += tab;
2959
3473
  }
@@ -2963,7 +3477,7 @@ oop.inherits(Mode, TextMode);
2963
3477
  };
2964
3478
 
2965
3479
  this.checkOutdent = function(state, line, input) {
2966
- return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
3480
+ return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
2967
3481
  };
2968
3482
 
2969
3483
  this.autoOutdent = function(state, session, row) {
@@ -2976,11 +3490,24 @@ oop.inherits(Mode, TextMode);
2976
3490
  var tab = session.getTabString();
2977
3491
  if (prevIndent.length <= indent.length) {
2978
3492
  if (indent.slice(-tab.length) == tab)
2979
- session.remove(new Range(row, indent.length-tab.length, row, indent.length));
3493
+ session.remove(new Range(row, indent.length - tab.length, row, indent.length));
2980
3494
  }
2981
3495
  };
2982
3496
 
3497
+ this.getMatching = function(session, row, column) {
3498
+ if (row == undefined) {
3499
+ var pos = session.selection.lead;
3500
+ column = pos.column;
3501
+ row = pos.row;
3502
+ }
3503
+
3504
+ var startToken = session.getTokenAt(row, column);
3505
+ if (startToken && startToken.value in this.indentKeywords)
3506
+ return this.foldingRules.rubyBlock(session, row, column, true);
3507
+ };
3508
+
2983
3509
  this.$id = "ace/mode/ruby";
3510
+ this.snippetFileId = "ace/snippets/ruby";
2984
3511
  }).call(Mode.prototype);
2985
3512
 
2986
3513
  exports.Mode = Mode;
@@ -3013,4 +3540,11 @@ oop.inherits(Mode, HtmlMode);
3013
3540
  }).call(Mode.prototype);
3014
3541
 
3015
3542
  exports.Mode = Mode;
3016
- });
3543
+ }); (function() {
3544
+ window.require(["ace/mode/html_ruby"], function(m) {
3545
+ if (typeof module == "object" && typeof exports == "object" && module) {
3546
+ module.exports = m;
3547
+ }
3548
+ });
3549
+ })();
3550
+