ace-rails-ap 2.0.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (301) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -4
  3. data/lib/ace/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +14194 -13349
  5. data/vendor/assets/javascripts/ace/ext-beautify.js +335 -0
  6. data/vendor/assets/javascripts/ace/ext-chromevox.js +6 -1
  7. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +8 -33
  8. data/vendor/assets/javascripts/ace/ext-emmet.js +487 -424
  9. data/vendor/assets/javascripts/ace/ext-error_marker.js +6 -0
  10. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +45 -72
  11. data/vendor/assets/javascripts/ace/ext-language_tools.js +734 -578
  12. data/vendor/assets/javascripts/ace/ext-linking.js +53 -0
  13. data/vendor/assets/javascripts/ace/ext-modelist.js +25 -10
  14. data/vendor/assets/javascripts/ace/ext-old_ie.js +93 -120
  15. data/vendor/assets/javascripts/ace/ext-searchbox.js +8 -41
  16. data/vendor/assets/javascripts/ace/ext-settings_menu.js +229 -234
  17. data/vendor/assets/javascripts/ace/ext-spellcheck.js +7 -3
  18. data/vendor/assets/javascripts/ace/ext-split.js +13 -37
  19. data/vendor/assets/javascripts/ace/ext-static_highlight.js +16 -39
  20. data/vendor/assets/javascripts/ace/ext-statusbar.js +8 -2
  21. data/vendor/assets/javascripts/ace/ext-textarea.js +254 -99
  22. data/vendor/assets/javascripts/ace/ext-themelist.js +13 -40
  23. data/vendor/assets/javascripts/ace/ext-whitespace.js +17 -41
  24. data/vendor/assets/javascripts/ace/keybinding-emacs.js +803 -788
  25. data/vendor/assets/javascripts/ace/keybinding-vim.js +1559 -1560
  26. data/vendor/assets/javascripts/ace/mode-abap.js +52 -83
  27. data/vendor/assets/javascripts/ace/mode-actionscript.js +27 -63
  28. data/vendor/assets/javascripts/ace/mode-ada.js +27 -58
  29. data/vendor/assets/javascripts/ace/mode-apache_conf.js +310 -0
  30. data/vendor/assets/javascripts/ace/mode-applescript.js +226 -0
  31. data/vendor/assets/javascripts/ace/mode-asciidoc.js +39 -70
  32. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +26 -58
  33. data/vendor/assets/javascripts/ace/mode-autohotkey.js +27 -63
  34. data/vendor/assets/javascripts/ace/mode-batchfile.js +27 -63
  35. data/vendor/assets/javascripts/ace/mode-c9search.js +92 -112
  36. data/vendor/assets/javascripts/ace/mode-c_cpp.js +224 -223
  37. data/vendor/assets/javascripts/ace/mode-cirru.js +202 -0
  38. data/vendor/assets/javascripts/ace/mode-clojure.js +98 -92
  39. data/vendor/assets/javascripts/ace/mode-cobol.js +27 -58
  40. data/vendor/assets/javascripts/ace/mode-coffee.js +90 -122
  41. data/vendor/assets/javascripts/ace/mode-coldfusion.js +1908 -1464
  42. data/vendor/assets/javascripts/ace/mode-csharp.js +291 -264
  43. data/vendor/assets/javascripts/ace/mode-css.js +266 -267
  44. data/vendor/assets/javascripts/ace/mode-curly.js +796 -815
  45. data/vendor/assets/javascripts/ace/mode-d.js +64 -95
  46. data/vendor/assets/javascripts/ace/mode-dart.js +254 -256
  47. data/vendor/assets/javascripts/ace/mode-diff.js +27 -58
  48. data/vendor/assets/javascripts/ace/mode-django.js +856 -866
  49. data/vendor/assets/javascripts/ace/mode-dockerfile.js +759 -0
  50. data/vendor/assets/javascripts/ace/mode-dot.js +106 -106
  51. data/vendor/assets/javascripts/ace/mode-eiffel.js +135 -0
  52. data/vendor/assets/javascripts/ace/mode-ejs.js +931 -938
  53. data/vendor/assets/javascripts/ace/mode-erlang.js +27 -58
  54. data/vendor/assets/javascripts/ace/mode-forth.js +27 -63
  55. data/vendor/assets/javascripts/ace/mode-ftl.js +457 -508
  56. data/vendor/assets/javascripts/ace/mode-gcode.js +85 -0
  57. data/vendor/assets/javascripts/ace/mode-gherkin.js +129 -0
  58. data/vendor/assets/javascripts/ace/mode-gitignore.js +50 -0
  59. data/vendor/assets/javascripts/ace/mode-glsl.js +252 -248
  60. data/vendor/assets/javascripts/ace/mode-golang.js +206 -179
  61. data/vendor/assets/javascripts/ace/mode-groovy.js +310 -242
  62. data/vendor/assets/javascripts/ace/mode-haml.js +156 -190
  63. data/vendor/assets/javascripts/ace/mode-handlebars.js +815 -784
  64. data/vendor/assets/javascripts/ace/mode-haskell.js +27 -63
  65. data/vendor/assets/javascripts/ace/mode-haxe.js +206 -176
  66. data/vendor/assets/javascripts/ace/mode-html.js +779 -792
  67. data/vendor/assets/javascripts/ace/mode-html_ruby.js +916 -923
  68. data/vendor/assets/javascripts/ace/mode-ini.js +27 -58
  69. data/vendor/assets/javascripts/ace/mode-io.js +201 -0
  70. data/vendor/assets/javascripts/ace/mode-jack.js +169 -170
  71. data/vendor/assets/javascripts/ace/mode-jade.js +722 -774
  72. data/vendor/assets/javascripts/ace/mode-java.js +310 -245
  73. data/vendor/assets/javascripts/ace/mode-javascript.js +285 -247
  74. data/vendor/assets/javascripts/ace/mode-json.js +183 -184
  75. data/vendor/assets/javascripts/ace/mode-jsoniq.js +3211 -1274
  76. data/vendor/assets/javascripts/ace/mode-jsp.js +481 -504
  77. data/vendor/assets/javascripts/ace/mode-jsx.js +206 -176
  78. data/vendor/assets/javascripts/ace/mode-julia.js +33 -69
  79. data/vendor/assets/javascripts/ace/mode-latex.js +74 -41
  80. data/vendor/assets/javascripts/ace/mode-less.js +250 -251
  81. data/vendor/assets/javascripts/ace/mode-liquid.js +424 -475
  82. data/vendor/assets/javascripts/ace/mode-lisp.js +24 -57
  83. data/vendor/assets/javascripts/ace/mode-livescript.js +42 -41
  84. data/vendor/assets/javascripts/ace/mode-logiql.js +229 -230
  85. data/vendor/assets/javascripts/ace/mode-lsl.js +200 -441
  86. data/vendor/assets/javascripts/ace/mode-lua.js +136 -167
  87. data/vendor/assets/javascripts/ace/mode-luapage.js +904 -884
  88. data/vendor/assets/javascripts/ace/mode-lucene.js +22 -17
  89. data/vendor/assets/javascripts/ace/mode-makefile.js +162 -137
  90. data/vendor/assets/javascripts/ace/mode-markdown.js +846 -854
  91. data/vendor/assets/javascripts/ace/mode-matlab.js +98 -72
  92. data/vendor/assets/javascripts/ace/mode-mel.js +569 -0
  93. data/vendor/assets/javascripts/ace/mode-mushcode.js +84 -115
  94. data/vendor/assets/javascripts/ace/mode-mysql.js +49 -80
  95. data/vendor/assets/javascripts/ace/mode-nix.js +252 -256
  96. data/vendor/assets/javascripts/ace/mode-objectivec.js +242 -274
  97. data/vendor/assets/javascripts/ace/mode-ocaml.js +71 -102
  98. data/vendor/assets/javascripts/ace/mode-pascal.js +32 -68
  99. data/vendor/assets/javascripts/ace/mode-perl.js +67 -98
  100. data/vendor/assets/javascripts/ace/mode-pgsql.js +990 -982
  101. data/vendor/assets/javascripts/ace/mode-php.js +1878 -1900
  102. data/vendor/assets/javascripts/ace/mode-plain_text.js +3 -34
  103. data/vendor/assets/javascripts/ace/mode-powershell.js +181 -151
  104. data/vendor/assets/javascripts/ace/mode-praat.js +418 -0
  105. data/vendor/assets/javascripts/ace/mode-prolog.js +27 -63
  106. data/vendor/assets/javascripts/ace/mode-properties.js +20 -48
  107. data/vendor/assets/javascripts/ace/mode-protobuf.js +252 -259
  108. data/vendor/assets/javascripts/ace/mode-python.js +84 -115
  109. data/vendor/assets/javascripts/ace/mode-r.js +105 -140
  110. data/vendor/assets/javascripts/ace/mode-rdoc.js +84 -89
  111. data/vendor/assets/javascripts/ace/mode-rhtml.js +892 -908
  112. data/vendor/assets/javascripts/ace/mode-ruby.js +434 -98
  113. data/vendor/assets/javascripts/ace/mode-rust.js +27 -63
  114. data/vendor/assets/javascripts/ace/mode-sass.js +75 -106
  115. data/vendor/assets/javascripts/ace/mode-scad.js +219 -220
  116. data/vendor/assets/javascripts/ace/mode-scala.js +311 -243
  117. data/vendor/assets/javascripts/ace/mode-scheme.js +24 -60
  118. data/vendor/assets/javascripts/ace/mode-scss.js +250 -251
  119. data/vendor/assets/javascripts/ace/mode-sh.js +506 -118
  120. data/vendor/assets/javascripts/ace/mode-sjs.js +314 -280
  121. data/vendor/assets/javascripts/ace/mode-smarty.js +2474 -0
  122. data/vendor/assets/javascripts/ace/mode-snippets.js +89 -89
  123. data/vendor/assets/javascripts/ace/mode-soy_template.js +792 -811
  124. data/vendor/assets/javascripts/ace/mode-space.js +22 -23
  125. data/vendor/assets/javascripts/ace/mode-sql.js +31 -58
  126. data/vendor/assets/javascripts/ace/mode-stylus.js +161 -197
  127. data/vendor/assets/javascripts/ace/mode-svg.js +906 -836
  128. data/vendor/assets/javascripts/ace/mode-tcl.js +61 -92
  129. data/vendor/assets/javascripts/ace/mode-tex.js +36 -73
  130. data/vendor/assets/javascripts/ace/mode-text.js +1 -0
  131. data/vendor/assets/javascripts/ace/mode-textile.js +41 -72
  132. data/vendor/assets/javascripts/ace/mode-toml.js +26 -62
  133. data/vendor/assets/javascripts/ace/mode-twig.js +1196 -892
  134. data/vendor/assets/javascripts/ace/mode-typescript.js +313 -277
  135. data/vendor/assets/javascripts/ace/mode-vala.js +982 -0
  136. data/vendor/assets/javascripts/ace/mode-vbscript.js +25 -62
  137. data/vendor/assets/javascripts/ace/mode-velocity.js +2251 -1242
  138. data/vendor/assets/javascripts/ace/mode-verilog.js +27 -59
  139. data/vendor/assets/javascripts/ace/mode-vhdl.js +26 -55
  140. data/vendor/assets/javascripts/ace/mode-xml.js +319 -644
  141. data/vendor/assets/javascripts/ace/mode-xquery.js +2503 -588
  142. data/vendor/assets/javascripts/ace/mode-yaml.js +56 -90
  143. data/vendor/assets/javascripts/ace/snippets/abap.js +7 -0
  144. data/vendor/assets/javascripts/ace/snippets/actionscript.js +159 -0
  145. data/vendor/assets/javascripts/ace/snippets/ada.js +7 -0
  146. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +7 -0
  147. data/vendor/assets/javascripts/ace/snippets/applescript.js +7 -0
  148. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +7 -0
  149. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +7 -0
  150. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +7 -0
  151. data/vendor/assets/javascripts/ace/snippets/batchfile.js +7 -0
  152. data/vendor/assets/javascripts/ace/snippets/c9search.js +7 -0
  153. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +138 -0
  154. data/vendor/assets/javascripts/ace/snippets/cirru.js +7 -0
  155. data/vendor/assets/javascripts/ace/snippets/clojure.js +97 -0
  156. data/vendor/assets/javascripts/ace/snippets/cobol.js +7 -0
  157. data/vendor/assets/javascripts/ace/snippets/coffee.js +102 -0
  158. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +7 -0
  159. data/vendor/assets/javascripts/ace/snippets/csharp.js +7 -0
  160. data/vendor/assets/javascripts/ace/snippets/css.js +974 -0
  161. data/vendor/assets/javascripts/ace/snippets/curly.js +7 -0
  162. data/vendor/assets/javascripts/ace/snippets/d.js +7 -0
  163. data/vendor/assets/javascripts/ace/snippets/dart.js +90 -0
  164. data/vendor/assets/javascripts/ace/snippets/diff.js +18 -0
  165. data/vendor/assets/javascripts/ace/snippets/django.js +115 -0
  166. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +7 -0
  167. data/vendor/assets/javascripts/ace/snippets/dot.js +7 -0
  168. data/vendor/assets/javascripts/ace/snippets/eiffel.js +7 -0
  169. data/vendor/assets/javascripts/ace/snippets/ejs.js +7 -0
  170. data/vendor/assets/javascripts/ace/snippets/erlang.js +167 -0
  171. data/vendor/assets/javascripts/ace/snippets/forth.js +7 -0
  172. data/vendor/assets/javascripts/ace/snippets/ftl.js +7 -0
  173. data/vendor/assets/javascripts/ace/snippets/gcode.js +7 -0
  174. data/vendor/assets/javascripts/ace/snippets/gherkin.js +7 -0
  175. data/vendor/assets/javascripts/ace/snippets/gitignore.js +7 -0
  176. data/vendor/assets/javascripts/ace/snippets/glsl.js +7 -0
  177. data/vendor/assets/javascripts/ace/snippets/golang.js +7 -0
  178. data/vendor/assets/javascripts/ace/snippets/groovy.js +7 -0
  179. data/vendor/assets/javascripts/ace/snippets/haml.js +27 -0
  180. data/vendor/assets/javascripts/ace/snippets/handlebars.js +7 -0
  181. data/vendor/assets/javascripts/ace/snippets/haskell.js +89 -0
  182. data/vendor/assets/javascripts/ace/snippets/haxe.js +7 -0
  183. data/vendor/assets/javascripts/ace/snippets/html.js +835 -0
  184. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +7 -0
  185. data/vendor/assets/javascripts/ace/snippets/ini.js +7 -0
  186. data/vendor/assets/javascripts/ace/snippets/io.js +69 -0
  187. data/vendor/assets/javascripts/ace/snippets/jack.js +7 -0
  188. data/vendor/assets/javascripts/ace/snippets/jade.js +7 -0
  189. data/vendor/assets/javascripts/ace/snippets/java.js +241 -0
  190. data/vendor/assets/javascripts/ace/snippets/javascript.js +189 -0
  191. data/vendor/assets/javascripts/ace/snippets/json.js +7 -0
  192. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +68 -0
  193. data/vendor/assets/javascripts/ace/snippets/jsp.js +106 -0
  194. data/vendor/assets/javascripts/ace/snippets/jsx.js +7 -0
  195. data/vendor/assets/javascripts/ace/snippets/julia.js +7 -0
  196. data/vendor/assets/javascripts/ace/snippets/latex.js +7 -0
  197. data/vendor/assets/javascripts/ace/snippets/less.js +7 -0
  198. data/vendor/assets/javascripts/ace/snippets/liquid.js +7 -0
  199. data/vendor/assets/javascripts/ace/snippets/lisp.js +7 -0
  200. data/vendor/assets/javascripts/ace/snippets/livescript.js +7 -0
  201. data/vendor/assets/javascripts/ace/snippets/logiql.js +7 -0
  202. data/vendor/assets/javascripts/ace/snippets/lsl.js +1073 -0
  203. data/vendor/assets/javascripts/ace/snippets/lua.js +28 -0
  204. data/vendor/assets/javascripts/ace/snippets/luapage.js +7 -0
  205. data/vendor/assets/javascripts/ace/snippets/lucene.js +7 -0
  206. data/vendor/assets/javascripts/ace/snippets/makefile.js +11 -0
  207. data/vendor/assets/javascripts/ace/snippets/markdown.js +95 -0
  208. data/vendor/assets/javascripts/ace/snippets/matlab.js +7 -0
  209. data/vendor/assets/javascripts/ace/snippets/mel.js +7 -0
  210. data/vendor/assets/javascripts/ace/snippets/mushcode.js +7 -0
  211. data/vendor/assets/javascripts/ace/snippets/mysql.js +7 -0
  212. data/vendor/assets/javascripts/ace/snippets/nix.js +7 -0
  213. data/vendor/assets/javascripts/ace/snippets/objectivec.js +7 -0
  214. data/vendor/assets/javascripts/ace/snippets/ocaml.js +7 -0
  215. data/vendor/assets/javascripts/ace/snippets/pascal.js +7 -0
  216. data/vendor/assets/javascripts/ace/snippets/perl.js +354 -0
  217. data/vendor/assets/javascripts/ace/snippets/pgsql.js +7 -0
  218. data/vendor/assets/javascripts/ace/snippets/php.js +283 -0
  219. data/vendor/assets/javascripts/ace/snippets/plain_text.js +7 -0
  220. data/vendor/assets/javascripts/ace/snippets/powershell.js +7 -0
  221. data/vendor/assets/javascripts/ace/snippets/praat.js +7 -0
  222. data/vendor/assets/javascripts/ace/snippets/prolog.js +7 -0
  223. data/vendor/assets/javascripts/ace/snippets/properties.js +7 -0
  224. data/vendor/assets/javascripts/ace/snippets/protobuf.js +7 -0
  225. data/vendor/assets/javascripts/ace/snippets/python.js +165 -0
  226. data/vendor/assets/javascripts/ace/snippets/r.js +128 -0
  227. data/vendor/assets/javascripts/ace/snippets/rdoc.js +7 -0
  228. data/vendor/assets/javascripts/ace/snippets/rhtml.js +7 -0
  229. data/vendor/assets/javascripts/ace/snippets/ruby.js +935 -0
  230. data/vendor/assets/javascripts/ace/snippets/rust.js +7 -0
  231. data/vendor/assets/javascripts/ace/snippets/sass.js +7 -0
  232. data/vendor/assets/javascripts/ace/snippets/scad.js +7 -0
  233. data/vendor/assets/javascripts/ace/snippets/scala.js +7 -0
  234. data/vendor/assets/javascripts/ace/snippets/scheme.js +7 -0
  235. data/vendor/assets/javascripts/ace/snippets/scss.js +7 -0
  236. data/vendor/assets/javascripts/ace/snippets/sh.js +90 -0
  237. data/vendor/assets/javascripts/ace/snippets/sjs.js +7 -0
  238. data/vendor/assets/javascripts/ace/snippets/smarty.js +7 -0
  239. data/vendor/assets/javascripts/ace/snippets/snippets.js +16 -0
  240. data/vendor/assets/javascripts/ace/snippets/soy_template.js +7 -0
  241. data/vendor/assets/javascripts/ace/snippets/space.js +7 -0
  242. data/vendor/assets/javascripts/ace/snippets/sql.js +33 -0
  243. data/vendor/assets/javascripts/ace/snippets/stylus.js +7 -0
  244. data/vendor/assets/javascripts/ace/snippets/svg.js +7 -0
  245. data/vendor/assets/javascripts/ace/snippets/tcl.js +99 -0
  246. data/vendor/assets/javascripts/ace/snippets/tex.js +197 -0
  247. data/vendor/assets/javascripts/ace/snippets/text.js +7 -0
  248. data/vendor/assets/javascripts/ace/snippets/textile.js +37 -0
  249. data/vendor/assets/javascripts/ace/snippets/toml.js +7 -0
  250. data/vendor/assets/javascripts/ace/snippets/twig.js +7 -0
  251. data/vendor/assets/javascripts/ace/snippets/typescript.js +7 -0
  252. data/vendor/assets/javascripts/ace/snippets/vala.js +193 -0
  253. data/vendor/assets/javascripts/ace/snippets/vbscript.js +7 -0
  254. data/vendor/assets/javascripts/ace/snippets/velocity.js +36 -0
  255. data/vendor/assets/javascripts/ace/snippets/verilog.js +7 -0
  256. data/vendor/assets/javascripts/ace/snippets/vhdl.js +7 -0
  257. data/vendor/assets/javascripts/ace/snippets/xml.js +7 -0
  258. data/vendor/assets/javascripts/ace/snippets/xquery.js +68 -0
  259. data/vendor/assets/javascripts/ace/snippets/yaml.js +7 -0
  260. data/vendor/assets/javascripts/ace/theme-ambiance.js +4 -24
  261. data/vendor/assets/javascripts/ace/theme-chaos.js +2 -25
  262. data/vendor/assets/javascripts/ace/theme-chrome.js +2 -31
  263. data/vendor/assets/javascripts/ace/theme-clouds.js +1 -31
  264. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +1 -31
  265. data/vendor/assets/javascripts/ace/theme-cobalt.js +1 -31
  266. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +1 -31
  267. data/vendor/assets/javascripts/ace/theme-dawn.js +1 -31
  268. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +5 -31
  269. data/vendor/assets/javascripts/ace/theme-eclipse.js +7 -33
  270. data/vendor/assets/javascripts/ace/theme-github.js +2 -35
  271. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +1 -31
  272. data/vendor/assets/javascripts/ace/theme-katzenmilch.js +119 -0
  273. data/vendor/assets/javascripts/ace/theme-kr.js +1 -31
  274. data/vendor/assets/javascripts/ace/theme-kr_theme.js +57 -141
  275. data/vendor/assets/javascripts/ace/theme-kuroir.js +59 -0
  276. data/vendor/assets/javascripts/ace/theme-merbivore.js +1 -31
  277. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +1 -31
  278. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +1 -31
  279. data/vendor/assets/javascripts/ace/theme-monokai.js +1 -31
  280. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +1 -31
  281. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +1 -31
  282. data/vendor/assets/javascripts/ace/theme-solarized_light.js +1 -31
  283. data/vendor/assets/javascripts/ace/theme-terminal.js +1 -31
  284. data/vendor/assets/javascripts/ace/theme-textmate.js +3 -32
  285. data/vendor/assets/javascripts/ace/theme-tomorrow.js +1 -31
  286. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +1 -31
  287. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -31
  288. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -31
  289. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -31
  290. data/vendor/assets/javascripts/ace/theme-twilight.js +1 -31
  291. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +1 -31
  292. data/vendor/assets/javascripts/ace/theme-xcode.js +2 -33
  293. data/vendor/assets/javascripts/ace/worker-coffee.js +5026 -5008
  294. data/vendor/assets/javascripts/ace/worker-css.js +5489 -5134
  295. data/vendor/assets/javascripts/ace/worker-html.js +11517 -0
  296. data/vendor/assets/javascripts/ace/worker-javascript.js +9810 -9501
  297. data/vendor/assets/javascripts/ace/worker-json.js +1583 -1564
  298. data/vendor/assets/javascripts/ace/worker-lua.js +2631 -2612
  299. data/vendor/assets/javascripts/ace/worker-php.js +2385 -2341
  300. data/vendor/assets/javascripts/ace/worker-xquery.js +31643 -3993
  301. metadata +147 -11
@@ -1,64 +1,5 @@
1
- /* ***** BEGIN LICENSE BLOCK *****
2
- * Distributed under the BSD license:
3
- *
4
- * Copyright (c) 2012, Ajax.org B.V.
5
- * All rights reserved.
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- * * Redistributions of source code must retain the above copyright
10
- * notice, this list of conditions and the following disclaimer.
11
- * * Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
- * * Neither the name of Ajax.org B.V. nor the
15
- * names of its contributors may be used to endorse or promote products
16
- * derived from this software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *
29
- *
30
- * Contributor(s):
31
- *
32
- *
33
- *
34
- * ***** END LICENSE BLOCK ***** */
35
-
36
- define('ace/mode/julia', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/julia_highlight_rules', 'ace/mode/folding/cstyle'], function(require, exports, module) {
37
-
38
-
39
- var oop = require("../lib/oop");
40
- var TextMode = require("./text").Mode;
41
- var Tokenizer = require("../tokenizer").Tokenizer;
42
- var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
43
- var FoldMode = require("./folding/cstyle").FoldMode;
44
-
45
- var Mode = function() {
46
- this.HighlightRules = JuliaHighlightRules;
47
- this.foldingRules = new FoldMode();
48
- };
49
- oop.inherits(Mode, TextMode);
50
-
51
- (function() {
52
- this.lineCommentStart = "#";
53
- this.blockComment = "";
54
- this.$id = "ace/mode/julia";
55
- }).call(Mode.prototype);
56
-
57
- exports.Mode = Mode;
58
- });
59
-
60
- define('ace/mode/julia_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
61
-
1
+ define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
62
3
 
63
4
  var oop = require("../lib/oop");
64
5
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -84,11 +25,11 @@ var JuliaHighlightRules = function() {
84
25
  regex: '(#)(?!\\{)(.*$)'} ],
85
26
  '#function_call':
86
27
  [ { token: [ 'support.function.julia', 'text' ],
87
- regex: '([a-zA-Z0-9_]+!?)(\\w*\\()'} ],
28
+ regex: '([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()'} ],
88
29
  '#function_decl':
89
30
  [ { token: [ 'keyword.other.julia', 'meta.function.julia',
90
31
  'entity.name.function.julia', 'meta.function.julia','text' ],
91
- regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)(\\w*)([(\\\\{])'} ],
32
+ regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])'} ],
92
33
  '#keyword':
93
34
  [ { token: 'keyword.other.julia',
94
35
  regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' },
@@ -96,7 +37,7 @@ var JuliaHighlightRules = function() {
96
37
  regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' },
97
38
  { token: 'storage.modifier.variable.julia',
98
39
  regex: '\\b(?:global|local|const|export|import|importall|using)\\b' },
99
- { token: 'variable.macro.julia', regex: '@\\w+\\b' } ],
40
+ { token: 'variable.macro.julia', regex: '@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b' } ],
100
41
  '#number':
101
42
  [ { token: 'constant.numeric.julia',
102
43
  regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ],
@@ -120,7 +61,7 @@ var JuliaHighlightRules = function() {
120
61
  { token: 'keyword.operator.interpolation.julia',
121
62
  regex: '\\$#?(?=.)' },
122
63
  { token: [ 'variable', 'keyword.operator.transposed-variable.julia' ],
123
- regex: '(\\w+)((?:\'|\\.\')*\\.?\')' },
64
+ regex: '([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:\'|\\.\')*\\.?\')' },
124
65
  { token: 'text',
125
66
  regex: '\\[|\\('},
126
67
  { token: [ 'text', 'keyword.operator.transposed-matrix.julia' ],
@@ -143,10 +84,10 @@ var JuliaHighlightRules = function() {
143
84
  { include: '#string_escaped_char' },
144
85
  { defaultToken: 'string.quoted.double.julia' } ] },
145
86
  { token: 'punctuation.definition.string.begin.julia',
146
- regex: '\\b\\w+"',
87
+ regex: '\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"',
147
88
  push:
148
89
  [ { token: 'punctuation.definition.string.end.julia',
149
- regex: '"\\w*',
90
+ regex: '"[\\w\\xff-\\u218e\\u2455-\\uffff]*',
150
91
  next: 'pop' },
151
92
  { include: '#string_custom_escaped_char' },
152
93
  { defaultToken: 'string.quoted.custom-double.julia' } ] },
@@ -190,8 +131,8 @@ oop.inherits(JuliaHighlightRules, TextHighlightRules);
190
131
  exports.JuliaHighlightRules = JuliaHighlightRules;
191
132
  });
192
133
 
193
- define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
194
-
134
+ define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
135
+ "use strict";
195
136
 
196
137
  var oop = require("../../lib/oop");
197
138
  var Range = require("../../range").Range;
@@ -284,3 +225,26 @@ oop.inherits(FoldMode, BaseFoldMode);
284
225
  }).call(FoldMode.prototype);
285
226
 
286
227
  });
228
+
229
+ define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
230
+ "use strict";
231
+
232
+ var oop = require("../lib/oop");
233
+ var TextMode = require("./text").Mode;
234
+ var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
235
+ var FoldMode = require("./folding/cstyle").FoldMode;
236
+
237
+ var Mode = function() {
238
+ this.HighlightRules = JuliaHighlightRules;
239
+ this.foldingRules = new FoldMode();
240
+ };
241
+ oop.inherits(Mode, TextMode);
242
+
243
+ (function() {
244
+ this.lineCommentStart = "#";
245
+ this.blockComment = "";
246
+ this.$id = "ace/mode/julia";
247
+ }).call(Mode.prototype);
248
+
249
+ exports.Mode = Mode;
250
+ });
@@ -1,39 +1,27 @@
1
- define('ace/mode/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/mode/folding/latex', 'ace/range'], function(require, exports, module) {
2
-
3
-
4
- var oop = require("../lib/oop");
5
- var TextMode = require("./text").Mode;
6
- var Tokenizer = require("../tokenizer").Tokenizer;
7
- var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
8
- var LatexFoldMode = require("./folding/latex").FoldMode;
9
- var Range = require("../range").Range;
10
-
11
- var Mode = function() {
12
- this.HighlightRules = LatexHighlightRules;
13
- this.foldingRules = new LatexFoldMode();
14
- };
15
- oop.inherits(Mode, TextMode);
16
-
17
- (function() {
18
- this.lineCommentStart = "%";
19
-
20
- this.$id = "ace/mode/latex";
21
- }).call(Mode.prototype);
22
-
23
- exports.Mode = Mode;
24
-
25
- });
26
- define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
27
-
1
+ define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
28
3
 
29
4
  var oop = require("../lib/oop");
30
5
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
31
6
 
32
- var LatexHighlightRules = function() {
7
+ var LatexHighlightRules = function() {
8
+
33
9
  this.$rules = {
34
10
  "start" : [{
35
- token : "keyword",
36
- regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
11
+ token : "comment",
12
+ regex : "%.*$"
13
+ }, {
14
+ token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
15
+ regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
16
+ }, {
17
+ token : ["keyword","lparen", "variable.parameter", "rparen"],
18
+ regex : "(\\\\label)(?:({)([^}]*)(}))?"
19
+ }, {
20
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
21
+ regex : "(\\\\(?:begin|end))({)(\\w*)(})"
22
+ }, {
23
+ token : "storage.type",
24
+ regex : "\\\\[a-zA-Z]+"
37
25
  }, {
38
26
  token : "lparen",
39
27
  regex : "[[({]"
@@ -41,23 +29,41 @@ var LatexHighlightRules = function() {
41
29
  token : "rparen",
42
30
  regex : "[\\])}]"
43
31
  }, {
44
- token : "string",
45
- regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
32
+ token : "constant.character.escape",
33
+ regex : "\\\\[^a-zA-Z]?"
46
34
  }, {
35
+ token : "string",
36
+ regex : "\\${1,2}",
37
+ next : "equation"
38
+ }],
39
+ "equation" : [{
47
40
  token : "comment",
48
41
  regex : "%.*$"
42
+ }, {
43
+ token : "string",
44
+ regex : "\\${1,2}",
45
+ next : "start"
46
+ }, {
47
+ token : "constant.character.escape",
48
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
49
+ }, {
50
+ token : "error",
51
+ regex : "^\\s*$",
52
+ next : "start"
53
+ }, {
54
+ defaultToken : "string"
49
55
  }]
56
+
50
57
  };
51
58
  };
52
-
53
59
  oop.inherits(LatexHighlightRules, TextHighlightRules);
54
60
 
55
61
  exports.LatexHighlightRules = LatexHighlightRules;
56
62
 
57
63
  });
58
64
 
59
- define('ace/mode/folding/latex', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(require, exports, module) {
60
-
65
+ define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) {
66
+ "use strict";
61
67
 
62
68
  var oop = require("../../lib/oop");
63
69
  var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -70,7 +76,7 @@ oop.inherits(FoldMode, BaseFoldMode);
70
76
 
71
77
  (function() {
72
78
 
73
- this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/;
79
+ this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/;
74
80
  this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
75
81
 
76
82
  this.getFoldWidgetRange = function(session, foldStyle, row) {
@@ -102,7 +108,7 @@ oop.inherits(FoldMode, BaseFoldMode);
102
108
 
103
109
  var stream = new TokenIterator(session, row, column);
104
110
  var token = stream.getCurrentToken();
105
- if (!token || token.type !== "keyword")
111
+ if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
106
112
  return;
107
113
 
108
114
  var val = token.value;
@@ -124,7 +130,7 @@ oop.inherits(FoldMode, BaseFoldMode);
124
130
 
125
131
  stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
126
132
  while(token = stream.step()) {
127
- if (token.type !== "keyword")
133
+ if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
128
134
  continue;
129
135
  var level = keywords[token.value];
130
136
  if (!level)
@@ -147,11 +153,11 @@ oop.inherits(FoldMode, BaseFoldMode);
147
153
  };
148
154
 
149
155
  this.latexSection = function(session, row, column) {
150
- var keywords = ["\\subsection", "\\section", "\\begin", "\\end"];
156
+ var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"];
151
157
 
152
158
  var stream = new TokenIterator(session, row, column);
153
159
  var token = stream.getCurrentToken();
154
- if (!token || token.type != "keyword")
160
+ if (!token || token.type != "storage.type")
155
161
  return;
156
162
 
157
163
  var startLevel = keywords.indexOf(token.value);
@@ -159,7 +165,7 @@ oop.inherits(FoldMode, BaseFoldMode);
159
165
  var endRow = row;
160
166
 
161
167
  while(token = stream.stepForward()) {
162
- if (token.type !== "keyword")
168
+ if (token.type !== "storage.type")
163
169
  continue;
164
170
  var level = keywords.indexOf(token.value);
165
171
 
@@ -188,3 +194,30 @@ oop.inherits(FoldMode, BaseFoldMode);
188
194
  }).call(FoldMode.prototype);
189
195
 
190
196
  });
197
+
198
+ define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"], function(require, exports, module) {
199
+ "use strict";
200
+
201
+ var oop = require("../lib/oop");
202
+ var TextMode = require("./text").Mode;
203
+ var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
204
+ var LatexFoldMode = require("./folding/latex").FoldMode;
205
+ var Range = require("../range").Range;
206
+
207
+ var Mode = function() {
208
+ this.HighlightRules = LatexHighlightRules;
209
+ this.foldingRules = new LatexFoldMode();
210
+ };
211
+ oop.inherits(Mode, TextMode);
212
+
213
+ (function() {
214
+ this.type = "text";
215
+
216
+ this.lineCommentStart = "%";
217
+
218
+ this.$id = "ace/mode/latex";
219
+ }).call(Mode.prototype);
220
+
221
+ exports.Mode = Mode;
222
+
223
+ });
@@ -1,89 +1,5 @@
1
- /* ***** BEGIN LICENSE BLOCK *****
2
- * Distributed under the BSD license:
3
- *
4
- * Copyright (c) 2010, Ajax.org B.V.
5
- * All rights reserved.
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- * * Redistributions of source code must retain the above copyright
10
- * notice, this list of conditions and the following disclaimer.
11
- * * Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
- * * Neither the name of Ajax.org B.V. nor the
15
- * names of its contributors may be used to endorse or promote products
16
- * derived from this software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *
29
- * ***** END LICENSE BLOCK ***** */
30
-
31
- define('ace/mode/less', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/less_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(require, exports, module) {
32
-
33
-
34
- var oop = require("../lib/oop");
35
- var TextMode = require("./text").Mode;
36
- var Tokenizer = require("../tokenizer").Tokenizer;
37
- var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
38
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
39
- var CssBehaviour = require("./behaviour/css").CssBehaviour;
40
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
41
-
42
- var Mode = function() {
43
- this.HighlightRules = LessHighlightRules;
44
- this.$outdent = new MatchingBraceOutdent();
45
- this.$behaviour = new CssBehaviour();
46
- this.foldingRules = new CStyleFoldMode();
47
- };
48
- oop.inherits(Mode, TextMode);
49
-
50
- (function() {
51
-
52
- this.lineCommentStart = "//";
53
- this.blockComment = {start: "/*", end: "*/"};
54
-
55
- this.getNextLineIndent = function(state, line, tab) {
56
- var indent = this.$getIndent(line);
57
- var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
58
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
59
- return indent;
60
- }
61
-
62
- var match = line.match(/^.*\{\s*$/);
63
- if (match) {
64
- indent += tab;
65
- }
66
-
67
- return indent;
68
- };
69
-
70
- this.checkOutdent = function(state, line, input) {
71
- return this.$outdent.checkOutdent(line, input);
72
- };
73
-
74
- this.autoOutdent = function(state, doc, row) {
75
- this.$outdent.autoOutdent(doc, row);
76
- };
77
-
78
- this.$id = "ace/mode/less";
79
- }).call(Mode.prototype);
80
-
81
- exports.Mode = Mode;
82
-
83
- });
84
-
85
- define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
86
-
1
+ define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
87
3
 
88
4
  var oop = require("../lib/oop");
89
5
  var lang = require("../lib/lang");
@@ -311,8 +227,8 @@ exports.LessHighlightRules = LessHighlightRules;
311
227
 
312
228
  });
313
229
 
314
- define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
315
-
230
+ define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
231
+ "use strict";
316
232
 
317
233
  var Range = require("../range").Range;
318
234
 
@@ -351,87 +267,8 @@ var MatchingBraceOutdent = function() {};
351
267
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
352
268
  });
353
269
 
354
- define('ace/mode/behaviour/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
355
-
356
-
357
- var oop = require("../../lib/oop");
358
- var Behaviour = require("../behaviour").Behaviour;
359
- var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
360
- var TokenIterator = require("../../token_iterator").TokenIterator;
361
-
362
- var CssBehaviour = function () {
363
-
364
- this.inherit(CstyleBehaviour);
365
-
366
- this.add("colon", "insertion", function (state, action, editor, session, text) {
367
- if (text === ':') {
368
- var cursor = editor.getCursorPosition();
369
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
370
- var token = iterator.getCurrentToken();
371
- if (token && token.value.match(/\s+/)) {
372
- token = iterator.stepBackward();
373
- }
374
- if (token && token.type === 'support.type') {
375
- var line = session.doc.getLine(cursor.row);
376
- var rightChar = line.substring(cursor.column, cursor.column + 1);
377
- if (rightChar === ':') {
378
- return {
379
- text: '',
380
- selection: [1, 1]
381
- }
382
- }
383
- if (!line.substring(cursor.column).match(/^\s*;/)) {
384
- return {
385
- text: ':;',
386
- selection: [1, 1]
387
- }
388
- }
389
- }
390
- }
391
- });
392
-
393
- this.add("colon", "deletion", function (state, action, editor, session, range) {
394
- var selected = session.doc.getTextRange(range);
395
- if (!range.isMultiLine() && selected === ':') {
396
- var cursor = editor.getCursorPosition();
397
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
398
- var token = iterator.getCurrentToken();
399
- if (token && token.value.match(/\s+/)) {
400
- token = iterator.stepBackward();
401
- }
402
- if (token && token.type === 'support.type') {
403
- var line = session.doc.getLine(range.start.row);
404
- var rightChar = line.substring(range.end.column, range.end.column + 1);
405
- if (rightChar === ';') {
406
- range.end.column ++;
407
- return range;
408
- }
409
- }
410
- }
411
- });
412
-
413
- this.add("semicolon", "insertion", function (state, action, editor, session, text) {
414
- if (text === ';') {
415
- var cursor = editor.getCursorPosition();
416
- var line = session.doc.getLine(cursor.row);
417
- var rightChar = line.substring(cursor.column, cursor.column + 1);
418
- if (rightChar === ';') {
419
- return {
420
- text: '',
421
- selection: [1, 1]
422
- }
423
- }
424
- }
425
- });
426
-
427
- }
428
- oop.inherits(CssBehaviour, CstyleBehaviour);
429
-
430
- exports.CssBehaviour = CssBehaviour;
431
- });
432
-
433
- define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
434
-
270
+ define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
271
+ "use strict";
435
272
 
436
273
  var oop = require("../../lib/oop");
437
274
  var Behaviour = require("../behaviour").Behaviour;
@@ -443,83 +280,34 @@ var SAFE_INSERT_IN_TOKENS =
443
280
  var SAFE_INSERT_BEFORE_TOKENS =
444
281
  ["text", "paren.rparen", "punctuation.operator", "comment"];
445
282
 
446
-
447
- var autoInsertedBrackets = 0;
448
- var autoInsertedRow = -1;
449
- var autoInsertedLineEnd = "";
450
- var maybeInsertedBrackets = 0;
451
- var maybeInsertedRow = -1;
452
- var maybeInsertedLineStart = "";
453
- var maybeInsertedLineEnd = "";
454
-
455
- var CstyleBehaviour = function () {
456
-
457
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
458
- var cursor = editor.getCursorPosition();
459
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
460
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
461
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
462
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
463
- return false;
464
- }
465
- iterator.stepForward();
466
- return iterator.getCurrentTokenRow() !== cursor.row ||
467
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
468
- };
469
-
470
- CstyleBehaviour.$matchTokenType = function(token, types) {
471
- return types.indexOf(token.type || token) > -1;
472
- };
473
-
474
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
475
- var cursor = editor.getCursorPosition();
476
- var line = session.doc.getLine(cursor.row);
477
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
478
- autoInsertedBrackets = 0;
479
- autoInsertedRow = cursor.row;
480
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
481
- autoInsertedBrackets++;
482
- };
483
-
484
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
485
- var cursor = editor.getCursorPosition();
486
- var line = session.doc.getLine(cursor.row);
487
- if (!this.isMaybeInsertedClosing(cursor, line))
488
- maybeInsertedBrackets = 0;
489
- maybeInsertedRow = cursor.row;
490
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
491
- maybeInsertedLineEnd = line.substr(cursor.column);
492
- maybeInsertedBrackets++;
493
- };
494
-
495
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
496
- return autoInsertedBrackets > 0 &&
497
- cursor.row === autoInsertedRow &&
498
- bracket === autoInsertedLineEnd[0] &&
499
- line.substr(cursor.column) === autoInsertedLineEnd;
500
- };
501
-
502
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
503
- return maybeInsertedBrackets > 0 &&
504
- cursor.row === maybeInsertedRow &&
505
- line.substr(cursor.column) === maybeInsertedLineEnd &&
506
- line.substr(0, cursor.column) == maybeInsertedLineStart;
507
- };
508
-
509
- CstyleBehaviour.popAutoInsertedClosing = function() {
510
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
511
- autoInsertedBrackets--;
512
- };
513
-
514
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
515
- maybeInsertedBrackets = 0;
516
- maybeInsertedRow = -1;
283
+ var context;
284
+ var contextCache = {}
285
+ var initContext = function(editor) {
286
+ var id = -1;
287
+ if (editor.multiSelect) {
288
+ id = editor.selection.id;
289
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
290
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
291
+ }
292
+ if (contextCache[id])
293
+ return context = contextCache[id];
294
+ context = contextCache[id] = {
295
+ autoInsertedBrackets: 0,
296
+ autoInsertedRow: -1,
297
+ autoInsertedLineEnd: "",
298
+ maybeInsertedBrackets: 0,
299
+ maybeInsertedRow: -1,
300
+ maybeInsertedLineStart: "",
301
+ maybeInsertedLineEnd: ""
517
302
  };
303
+ };
518
304
 
519
- this.add("braces", "insertion", function (state, action, editor, session, text) {
305
+ var CstyleBehaviour = function() {
306
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
520
307
  var cursor = editor.getCursorPosition();
521
308
  var line = session.doc.getLine(cursor.row);
522
309
  if (text == '{') {
310
+ initContext(editor);
523
311
  var selection = editor.getSelectionRange();
524
312
  var selected = session.doc.getTextRange(selection);
525
313
  if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
@@ -543,6 +331,7 @@ var CstyleBehaviour = function () {
543
331
  }
544
332
  }
545
333
  } else if (text == '}') {
334
+ initContext(editor);
546
335
  var rightChar = line.substring(cursor.column, cursor.column + 1);
547
336
  if (rightChar == '}') {
548
337
  var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
@@ -555,9 +344,10 @@ var CstyleBehaviour = function () {
555
344
  }
556
345
  }
557
346
  } else if (text == "\n" || text == "\r\n") {
347
+ initContext(editor);
558
348
  var closing = "";
559
349
  if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
560
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
350
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
561
351
  CstyleBehaviour.clearMaybeInsertedClosing();
562
352
  }
563
353
  var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -569,6 +359,7 @@ var CstyleBehaviour = function () {
569
359
  } else if (closing) {
570
360
  var next_indent = this.$getIndent(line);
571
361
  } else {
362
+ CstyleBehaviour.clearMaybeInsertedClosing();
572
363
  return;
573
364
  }
574
365
  var indent = next_indent + session.getTabString();
@@ -582,22 +373,24 @@ var CstyleBehaviour = function () {
582
373
  }
583
374
  });
584
375
 
585
- this.add("braces", "deletion", function (state, action, editor, session, range) {
376
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
586
377
  var selected = session.doc.getTextRange(range);
587
378
  if (!range.isMultiLine() && selected == '{') {
379
+ initContext(editor);
588
380
  var line = session.doc.getLine(range.start.row);
589
381
  var rightChar = line.substring(range.end.column, range.end.column + 1);
590
382
  if (rightChar == '}') {
591
383
  range.end.column++;
592
384
  return range;
593
385
  } else {
594
- maybeInsertedBrackets--;
386
+ context.maybeInsertedBrackets--;
595
387
  }
596
388
  }
597
389
  });
598
390
 
599
- this.add("parens", "insertion", function (state, action, editor, session, text) {
391
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
600
392
  if (text == '(') {
393
+ initContext(editor);
601
394
  var selection = editor.getSelectionRange();
602
395
  var selected = session.doc.getTextRange(selection);
603
396
  if (selected !== "" && editor.getWrapBehavioursEnabled()) {
@@ -613,6 +406,7 @@ var CstyleBehaviour = function () {
613
406
  };
614
407
  }
615
408
  } else if (text == ')') {
409
+ initContext(editor);
616
410
  var cursor = editor.getCursorPosition();
617
411
  var line = session.doc.getLine(cursor.row);
618
412
  var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -629,9 +423,10 @@ var CstyleBehaviour = function () {
629
423
  }
630
424
  });
631
425
 
632
- this.add("parens", "deletion", function (state, action, editor, session, range) {
426
+ this.add("parens", "deletion", function(state, action, editor, session, range) {
633
427
  var selected = session.doc.getTextRange(range);
634
428
  if (!range.isMultiLine() && selected == '(') {
429
+ initContext(editor);
635
430
  var line = session.doc.getLine(range.start.row);
636
431
  var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
637
432
  if (rightChar == ')') {
@@ -641,8 +436,9 @@ var CstyleBehaviour = function () {
641
436
  }
642
437
  });
643
438
 
644
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
439
+ this.add("brackets", "insertion", function(state, action, editor, session, text) {
645
440
  if (text == '[') {
441
+ initContext(editor);
646
442
  var selection = editor.getSelectionRange();
647
443
  var selected = session.doc.getTextRange(selection);
648
444
  if (selected !== "" && editor.getWrapBehavioursEnabled()) {
@@ -658,6 +454,7 @@ var CstyleBehaviour = function () {
658
454
  };
659
455
  }
660
456
  } else if (text == ']') {
457
+ initContext(editor);
661
458
  var cursor = editor.getCursorPosition();
662
459
  var line = session.doc.getLine(cursor.row);
663
460
  var rightChar = line.substring(cursor.column, cursor.column + 1);
@@ -674,9 +471,10 @@ var CstyleBehaviour = function () {
674
471
  }
675
472
  });
676
473
 
677
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
474
+ this.add("brackets", "deletion", function(state, action, editor, session, range) {
678
475
  var selected = session.doc.getTextRange(range);
679
476
  if (!range.isMultiLine() && selected == '[') {
477
+ initContext(editor);
680
478
  var line = session.doc.getLine(range.start.row);
681
479
  var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
682
480
  if (rightChar == ']') {
@@ -686,8 +484,9 @@ var CstyleBehaviour = function () {
686
484
  }
687
485
  });
688
486
 
689
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
487
+ this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
690
488
  if (text == '"' || text == "'") {
489
+ initContext(editor);
691
490
  var quote = text;
692
491
  var selection = editor.getSelectionRange();
693
492
  var selected = session.doc.getTextRange(selection);
@@ -739,9 +538,10 @@ var CstyleBehaviour = function () {
739
538
  }
740
539
  });
741
540
 
742
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
541
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
743
542
  var selected = session.doc.getTextRange(range);
744
543
  if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
544
+ initContext(editor);
745
545
  var line = session.doc.getLine(range.start.row);
746
546
  var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
747
547
  if (rightChar == selected) {
@@ -753,13 +553,159 @@ var CstyleBehaviour = function () {
753
553
 
754
554
  };
755
555
 
556
+
557
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
558
+ var cursor = editor.getCursorPosition();
559
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
560
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
561
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
562
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
563
+ return false;
564
+ }
565
+ iterator.stepForward();
566
+ return iterator.getCurrentTokenRow() !== cursor.row ||
567
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
568
+ };
569
+
570
+ CstyleBehaviour.$matchTokenType = function(token, types) {
571
+ return types.indexOf(token.type || token) > -1;
572
+ };
573
+
574
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
575
+ var cursor = editor.getCursorPosition();
576
+ var line = session.doc.getLine(cursor.row);
577
+ if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
578
+ context.autoInsertedBrackets = 0;
579
+ context.autoInsertedRow = cursor.row;
580
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
581
+ context.autoInsertedBrackets++;
582
+ };
583
+
584
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
585
+ var cursor = editor.getCursorPosition();
586
+ var line = session.doc.getLine(cursor.row);
587
+ if (!this.isMaybeInsertedClosing(cursor, line))
588
+ context.maybeInsertedBrackets = 0;
589
+ context.maybeInsertedRow = cursor.row;
590
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
591
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
592
+ context.maybeInsertedBrackets++;
593
+ };
594
+
595
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
596
+ return context.autoInsertedBrackets > 0 &&
597
+ cursor.row === context.autoInsertedRow &&
598
+ bracket === context.autoInsertedLineEnd[0] &&
599
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
600
+ };
601
+
602
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
603
+ return context.maybeInsertedBrackets > 0 &&
604
+ cursor.row === context.maybeInsertedRow &&
605
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
606
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
607
+ };
608
+
609
+ CstyleBehaviour.popAutoInsertedClosing = function() {
610
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
611
+ context.autoInsertedBrackets--;
612
+ };
613
+
614
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
615
+ if (context) {
616
+ context.maybeInsertedBrackets = 0;
617
+ context.maybeInsertedRow = -1;
618
+ }
619
+ };
620
+
621
+
622
+
756
623
  oop.inherits(CstyleBehaviour, Behaviour);
757
624
 
758
625
  exports.CstyleBehaviour = CstyleBehaviour;
759
626
  });
760
627
 
761
- define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
628
+ define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
629
+ "use strict";
630
+
631
+ var oop = require("../../lib/oop");
632
+ var Behaviour = require("../behaviour").Behaviour;
633
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
634
+ var TokenIterator = require("../../token_iterator").TokenIterator;
635
+
636
+ var CssBehaviour = function () {
637
+
638
+ this.inherit(CstyleBehaviour);
639
+
640
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
641
+ if (text === ':') {
642
+ var cursor = editor.getCursorPosition();
643
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
644
+ var token = iterator.getCurrentToken();
645
+ if (token && token.value.match(/\s+/)) {
646
+ token = iterator.stepBackward();
647
+ }
648
+ if (token && token.type === 'support.type') {
649
+ var line = session.doc.getLine(cursor.row);
650
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
651
+ if (rightChar === ':') {
652
+ return {
653
+ text: '',
654
+ selection: [1, 1]
655
+ }
656
+ }
657
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
658
+ return {
659
+ text: ':;',
660
+ selection: [1, 1]
661
+ }
662
+ }
663
+ }
664
+ }
665
+ });
666
+
667
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
668
+ var selected = session.doc.getTextRange(range);
669
+ if (!range.isMultiLine() && selected === ':') {
670
+ var cursor = editor.getCursorPosition();
671
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
672
+ var token = iterator.getCurrentToken();
673
+ if (token && token.value.match(/\s+/)) {
674
+ token = iterator.stepBackward();
675
+ }
676
+ if (token && token.type === 'support.type') {
677
+ var line = session.doc.getLine(range.start.row);
678
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
679
+ if (rightChar === ';') {
680
+ range.end.column ++;
681
+ return range;
682
+ }
683
+ }
684
+ }
685
+ });
686
+
687
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
688
+ if (text === ';') {
689
+ var cursor = editor.getCursorPosition();
690
+ var line = session.doc.getLine(cursor.row);
691
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
692
+ if (rightChar === ';') {
693
+ return {
694
+ text: '',
695
+ selection: [1, 1]
696
+ }
697
+ }
698
+ }
699
+ });
762
700
 
701
+ }
702
+ oop.inherits(CssBehaviour, CstyleBehaviour);
703
+
704
+ exports.CssBehaviour = CssBehaviour;
705
+ });
706
+
707
+ define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
708
+ "use strict";
763
709
 
764
710
  var oop = require("../../lib/oop");
765
711
  var Range = require("../../range").Range;
@@ -852,3 +798,56 @@ oop.inherits(FoldMode, BaseFoldMode);
852
798
  }).call(FoldMode.prototype);
853
799
 
854
800
  });
801
+
802
+ define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
803
+ "use strict";
804
+
805
+ var oop = require("../lib/oop");
806
+ var TextMode = require("./text").Mode;
807
+ var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
808
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
809
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
810
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
811
+
812
+ var Mode = function() {
813
+ this.HighlightRules = LessHighlightRules;
814
+ this.$outdent = new MatchingBraceOutdent();
815
+ this.$behaviour = new CssBehaviour();
816
+ this.foldingRules = new CStyleFoldMode();
817
+ };
818
+ oop.inherits(Mode, TextMode);
819
+
820
+ (function() {
821
+
822
+ this.lineCommentStart = "//";
823
+ this.blockComment = {start: "/*", end: "*/"};
824
+
825
+ this.getNextLineIndent = function(state, line, tab) {
826
+ var indent = this.$getIndent(line);
827
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
828
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
829
+ return indent;
830
+ }
831
+
832
+ var match = line.match(/^.*\{\s*$/);
833
+ if (match) {
834
+ indent += tab;
835
+ }
836
+
837
+ return indent;
838
+ };
839
+
840
+ this.checkOutdent = function(state, line, input) {
841
+ return this.$outdent.checkOutdent(line, input);
842
+ };
843
+
844
+ this.autoOutdent = function(state, doc, row) {
845
+ this.$outdent.autoOutdent(doc, row);
846
+ };
847
+
848
+ this.$id = "ace/mode/less";
849
+ }).call(Mode.prototype);
850
+
851
+ exports.Mode = Mode;
852
+
853
+ });