ace-rails-ap 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/ace/ace.js +529 -133
  4. data/vendor/assets/javascripts/ace/ext-beautify.js +0 -0
  5. data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -0
  6. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +0 -0
  7. data/vendor/assets/javascripts/ace/ext-emmet.js +17 -12
  8. data/vendor/assets/javascripts/ace/ext-error_marker.js +0 -0
  9. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +0 -0
  10. data/vendor/assets/javascripts/ace/ext-language_tools.js +12 -4
  11. data/vendor/assets/javascripts/ace/ext-linking.js +0 -0
  12. data/vendor/assets/javascripts/ace/ext-modelist.js +11 -5
  13. data/vendor/assets/javascripts/ace/ext-old_ie.js +1 -0
  14. data/vendor/assets/javascripts/ace/ext-searchbox.js +1 -0
  15. data/vendor/assets/javascripts/ace/ext-settings_menu.js +12 -5
  16. data/vendor/assets/javascripts/ace/ext-spellcheck.js +0 -0
  17. data/vendor/assets/javascripts/ace/ext-split.js +0 -0
  18. data/vendor/assets/javascripts/ace/ext-static_highlight.js +0 -0
  19. data/vendor/assets/javascripts/ace/ext-statusbar.js +0 -0
  20. data/vendor/assets/javascripts/ace/ext-textarea.js +0 -0
  21. data/vendor/assets/javascripts/ace/ext-themelist.js +1 -0
  22. data/vendor/assets/javascripts/ace/ext-whitespace.js +0 -0
  23. data/vendor/assets/javascripts/ace/keybinding-emacs.js +0 -0
  24. data/vendor/assets/javascripts/ace/keybinding-vim.js +28 -18
  25. data/vendor/assets/javascripts/ace/mode-abap.js +4 -4
  26. data/vendor/assets/javascripts/ace/mode-abc.js +1 -0
  27. data/vendor/assets/javascripts/ace/mode-actionscript.js +1 -0
  28. data/vendor/assets/javascripts/ace/mode-ada.js +2 -2
  29. data/vendor/assets/javascripts/ace/mode-apache_conf.js +1 -0
  30. data/vendor/assets/javascripts/ace/mode-applescript.js +2 -2
  31. data/vendor/assets/javascripts/ace/mode-asciidoc.js +1 -1
  32. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +1 -0
  33. data/vendor/assets/javascripts/ace/mode-autohotkey.js +1 -0
  34. data/vendor/assets/javascripts/ace/mode-batchfile.js +1 -0
  35. data/vendor/assets/javascripts/ace/mode-bro.js +327 -0
  36. data/vendor/assets/javascripts/ace/mode-c9search.js +31 -14
  37. data/vendor/assets/javascripts/ace/mode-c_cpp.js +4 -361
  38. data/vendor/assets/javascripts/ace/mode-cirru.js +7 -6
  39. data/vendor/assets/javascripts/ace/mode-clojure.js +4 -3
  40. data/vendor/assets/javascripts/ace/mode-cobol.js +2 -2
  41. data/vendor/assets/javascripts/ace/mode-coffee.js +2 -3
  42. data/vendor/assets/javascripts/ace/mode-coldfusion.js +16 -370
  43. data/vendor/assets/javascripts/ace/mode-csharp.js +0 -357
  44. data/vendor/assets/javascripts/ace/mode-css.js +0 -357
  45. data/vendor/assets/javascripts/ace/mode-curly.js +16 -371
  46. data/vendor/assets/javascripts/ace/mode-d.js +2 -1
  47. data/vendor/assets/javascripts/ace/mode-dart.js +4 -361
  48. data/vendor/assets/javascripts/ace/mode-diff.js +0 -0
  49. data/vendor/assets/javascripts/ace/mode-django.js +15 -369
  50. data/vendor/assets/javascripts/ace/mode-dockerfile.js +3 -360
  51. data/vendor/assets/javascripts/ace/mode-dot.js +2 -1
  52. data/vendor/assets/javascripts/ace/mode-drools.js +459 -0
  53. data/vendor/assets/javascripts/ace/mode-eiffel.js +2 -2
  54. data/vendor/assets/javascripts/ace/mode-ejs.js +19 -373
  55. data/vendor/assets/javascripts/ace/mode-elixir.js +1 -0
  56. data/vendor/assets/javascripts/ace/mode-elm.js +5 -2
  57. data/vendor/assets/javascripts/ace/mode-erlang.js +4 -3
  58. data/vendor/assets/javascripts/ace/mode-forth.js +14 -13
  59. data/vendor/assets/javascripts/ace/mode-fortran.js +423 -0
  60. data/vendor/assets/javascripts/ace/mode-ftl.js +7 -6
  61. data/vendor/assets/javascripts/ace/mode-gcode.js +1 -0
  62. data/vendor/assets/javascripts/ace/mode-gherkin.js +2 -1
  63. data/vendor/assets/javascripts/ace/mode-gitignore.js +1 -0
  64. data/vendor/assets/javascripts/ace/mode-glsl.js +4 -361
  65. data/vendor/assets/javascripts/ace/mode-gobstones.js +8 -365
  66. data/vendor/assets/javascripts/ace/mode-golang.js +0 -357
  67. data/vendor/assets/javascripts/ace/mode-groovy.js +7 -365
  68. data/vendor/assets/javascripts/ace/mode-haml.js +12 -11
  69. data/vendor/assets/javascripts/ace/mode-handlebars.js +15 -371
  70. data/vendor/assets/javascripts/ace/mode-haskell.js +29 -28
  71. data/vendor/assets/javascripts/ace/mode-haskell_cabal.js +134 -0
  72. data/vendor/assets/javascripts/ace/mode-haxe.js +0 -357
  73. data/vendor/assets/javascripts/ace/mode-hjson.js +346 -0
  74. data/vendor/assets/javascripts/ace/mode-html.js +15 -369
  75. data/vendor/assets/javascripts/ace/mode-html_elixir.js +16 -369
  76. data/vendor/assets/javascripts/ace/mode-html_ruby.js +18 -372
  77. data/vendor/assets/javascripts/ace/mode-ini.js +1 -0
  78. data/vendor/assets/javascripts/ace/mode-io.js +3 -3
  79. data/vendor/assets/javascripts/ace/mode-jack.js +0 -357
  80. data/vendor/assets/javascripts/ace/mode-jade.js +11 -12
  81. data/vendor/assets/javascripts/ace/mode-java.js +7 -365
  82. data/vendor/assets/javascripts/ace/mode-javascript.js +7 -365
  83. data/vendor/assets/javascripts/ace/mode-json.js +0 -357
  84. data/vendor/assets/javascripts/ace/mode-jsoniq.js +5 -358
  85. data/vendor/assets/javascripts/ace/mode-jsp.js +6 -363
  86. data/vendor/assets/javascripts/ace/mode-jsx.js +0 -357
  87. data/vendor/assets/javascripts/ace/mode-julia.js +1 -0
  88. data/vendor/assets/javascripts/ace/mode-kotlin.js +786 -0
  89. data/vendor/assets/javascripts/ace/mode-latex.js +2 -2
  90. data/vendor/assets/javascripts/ace/mode-lean.js +0 -0
  91. data/vendor/assets/javascripts/ace/mode-less.js +0 -357
  92. data/vendor/assets/javascripts/ace/mode-liquid.js +9 -9
  93. data/vendor/assets/javascripts/ace/mode-lisp.js +1 -0
  94. data/vendor/assets/javascripts/ace/mode-live_script.js +0 -0
  95. data/vendor/assets/javascripts/ace/mode-livescript.js +0 -0
  96. data/vendor/assets/javascripts/ace/mode-logiql.js +0 -357
  97. data/vendor/assets/javascripts/ace/mode-lsl.js +0 -357
  98. data/vendor/assets/javascripts/ace/mode-lua.js +1 -0
  99. data/vendor/assets/javascripts/ace/mode-luapage.js +16 -369
  100. data/vendor/assets/javascripts/ace/mode-lucene.js +1 -0
  101. data/vendor/assets/javascripts/ace/mode-makefile.js +3 -2
  102. data/vendor/assets/javascripts/ace/mode-markdown.js +17 -370
  103. data/vendor/assets/javascripts/ace/mode-mask.js +10 -367
  104. data/vendor/assets/javascripts/ace/mode-matlab.js +21 -21
  105. data/vendor/assets/javascripts/ace/mode-maze.js +1 -0
  106. data/vendor/assets/javascripts/ace/mode-mel.js +0 -357
  107. data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -0
  108. data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -0
  109. data/vendor/assets/javascripts/ace/mode-mushcode.js +2 -1
  110. data/vendor/assets/javascripts/ace/mode-mysql.js +2 -2
  111. data/vendor/assets/javascripts/ace/mode-nix.js +5 -361
  112. data/vendor/assets/javascripts/ace/mode-nsis.js +11 -10
  113. data/vendor/assets/javascripts/ace/mode-objectivec.js +9 -8
  114. data/vendor/assets/javascripts/ace/mode-ocaml.js +1 -0
  115. data/vendor/assets/javascripts/ace/mode-pascal.js +1 -0
  116. data/vendor/assets/javascripts/ace/mode-perl.js +3 -3
  117. data/vendor/assets/javascripts/ace/mode-pgsql.js +8 -8
  118. data/vendor/assets/javascripts/ace/mode-php.js +197 -723
  119. data/vendor/assets/javascripts/ace/mode-plain_text.js +0 -0
  120. data/vendor/assets/javascripts/ace/mode-powershell.js +0 -357
  121. data/vendor/assets/javascripts/ace/mode-praat.js +4 -4
  122. data/vendor/assets/javascripts/ace/mode-prolog.js +1 -0
  123. data/vendor/assets/javascripts/ace/mode-properties.js +1 -0
  124. data/vendor/assets/javascripts/ace/mode-protobuf.js +4 -361
  125. data/vendor/assets/javascripts/ace/mode-python.js +2 -1
  126. data/vendor/assets/javascripts/ace/mode-r.js +5 -6
  127. data/vendor/assets/javascripts/ace/mode-razor.js +26 -370
  128. data/vendor/assets/javascripts/ace/mode-rdoc.js +4 -4
  129. data/vendor/assets/javascripts/ace/mode-rhtml.js +17 -371
  130. data/vendor/assets/javascripts/ace/mode-rst.js +3 -3
  131. data/vendor/assets/javascripts/ace/mode-ruby.js +3 -360
  132. data/vendor/assets/javascripts/ace/mode-rust.js +5 -4
  133. data/vendor/assets/javascripts/ace/mode-sass.js +1 -0
  134. data/vendor/assets/javascripts/ace/mode-scad.js +1 -359
  135. data/vendor/assets/javascripts/ace/mode-scala.js +9 -369
  136. data/vendor/assets/javascripts/ace/mode-scheme.js +1 -0
  137. data/vendor/assets/javascripts/ace/mode-scss.js +0 -357
  138. data/vendor/assets/javascripts/ace/mode-sh.js +3 -360
  139. data/vendor/assets/javascripts/ace/mode-sjs.js +7 -365
  140. data/vendor/assets/javascripts/ace/mode-smarty.js +15 -369
  141. data/vendor/assets/javascripts/ace/mode-snippets.js +1 -0
  142. data/vendor/assets/javascripts/ace/mode-soy_template.js +15 -369
  143. data/vendor/assets/javascripts/ace/mode-space.js +1 -0
  144. data/vendor/assets/javascripts/ace/mode-sql.js +2 -2
  145. data/vendor/assets/javascripts/ace/mode-sqlserver.js +2 -2
  146. data/vendor/assets/javascripts/ace/mode-stylus.js +1 -0
  147. data/vendor/assets/javascripts/ace/mode-svg.js +12 -366
  148. data/vendor/assets/javascripts/ace/mode-swift.js +2 -358
  149. data/vendor/assets/javascripts/ace/mode-swig.js +0 -0
  150. data/vendor/assets/javascripts/ace/mode-tcl.js +2 -1
  151. data/vendor/assets/javascripts/ace/mode-tex.js +3 -2
  152. data/vendor/assets/javascripts/ace/mode-text.js +0 -0
  153. data/vendor/assets/javascripts/ace/mode-textile.js +1 -0
  154. data/vendor/assets/javascripts/ace/mode-toml.js +1 -0
  155. data/vendor/assets/javascripts/ace/mode-tsx.js +884 -0
  156. data/vendor/assets/javascripts/ace/mode-twig.js +16 -370
  157. data/vendor/assets/javascripts/ace/mode-typescript.js +8 -366
  158. data/vendor/assets/javascripts/ace/mode-vala.js +1 -358
  159. data/vendor/assets/javascripts/ace/mode-vbscript.js +44 -71
  160. data/vendor/assets/javascripts/ace/mode-velocity.js +15 -369
  161. data/vendor/assets/javascripts/ace/mode-verilog.js +2 -1
  162. data/vendor/assets/javascripts/ace/mode-vhdl.js +2 -2
  163. data/vendor/assets/javascripts/ace/mode-wollok.js +7 -365
  164. data/vendor/assets/javascripts/ace/mode-xml.js +5 -1
  165. data/vendor/assets/javascripts/ace/mode-xquery.js +32 -369
  166. data/vendor/assets/javascripts/ace/mode-yaml.js +4 -3
  167. data/vendor/assets/javascripts/ace/snippets/abap.js +0 -0
  168. data/vendor/assets/javascripts/ace/snippets/abc.js +0 -0
  169. data/vendor/assets/javascripts/ace/snippets/actionscript.js +0 -0
  170. data/vendor/assets/javascripts/ace/snippets/ada.js +0 -0
  171. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +0 -0
  172. data/vendor/assets/javascripts/ace/snippets/applescript.js +0 -0
  173. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +0 -0
  174. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +0 -0
  175. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +0 -0
  176. data/vendor/assets/javascripts/ace/snippets/batchfile.js +0 -0
  177. data/vendor/assets/javascripts/ace/snippets/bro.js +7 -0
  178. data/vendor/assets/javascripts/ace/snippets/c9search.js +0 -0
  179. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +0 -0
  180. data/vendor/assets/javascripts/ace/snippets/cirru.js +0 -0
  181. data/vendor/assets/javascripts/ace/snippets/clojure.js +0 -0
  182. data/vendor/assets/javascripts/ace/snippets/cobol.js +0 -0
  183. data/vendor/assets/javascripts/ace/snippets/coffee.js +0 -0
  184. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +0 -0
  185. data/vendor/assets/javascripts/ace/snippets/csharp.js +0 -0
  186. data/vendor/assets/javascripts/ace/snippets/css.js +0 -0
  187. data/vendor/assets/javascripts/ace/snippets/curly.js +0 -0
  188. data/vendor/assets/javascripts/ace/snippets/d.js +0 -0
  189. data/vendor/assets/javascripts/ace/snippets/dart.js +0 -0
  190. data/vendor/assets/javascripts/ace/snippets/diff.js +0 -0
  191. data/vendor/assets/javascripts/ace/snippets/django.js +0 -0
  192. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +0 -0
  193. data/vendor/assets/javascripts/ace/snippets/dot.js +0 -0
  194. data/vendor/assets/javascripts/ace/snippets/drools.js +26 -0
  195. data/vendor/assets/javascripts/ace/snippets/eiffel.js +0 -0
  196. data/vendor/assets/javascripts/ace/snippets/ejs.js +0 -0
  197. data/vendor/assets/javascripts/ace/snippets/elixir.js +0 -0
  198. data/vendor/assets/javascripts/ace/snippets/elm.js +0 -0
  199. data/vendor/assets/javascripts/ace/snippets/erlang.js +0 -0
  200. data/vendor/assets/javascripts/ace/snippets/forth.js +0 -0
  201. data/vendor/assets/javascripts/ace/snippets/fortran.js +7 -0
  202. data/vendor/assets/javascripts/ace/snippets/ftl.js +0 -0
  203. data/vendor/assets/javascripts/ace/snippets/gcode.js +0 -0
  204. data/vendor/assets/javascripts/ace/snippets/gherkin.js +0 -0
  205. data/vendor/assets/javascripts/ace/snippets/gitignore.js +0 -0
  206. data/vendor/assets/javascripts/ace/snippets/glsl.js +0 -0
  207. data/vendor/assets/javascripts/ace/snippets/gobstones.js +41 -0
  208. data/vendor/assets/javascripts/ace/snippets/golang.js +0 -0
  209. data/vendor/assets/javascripts/ace/snippets/groovy.js +0 -0
  210. data/vendor/assets/javascripts/ace/snippets/haml.js +0 -0
  211. data/vendor/assets/javascripts/ace/snippets/handlebars.js +0 -0
  212. data/vendor/assets/javascripts/ace/snippets/haskell.js +0 -0
  213. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +7 -0
  214. data/vendor/assets/javascripts/ace/snippets/haxe.js +0 -0
  215. data/vendor/assets/javascripts/ace/snippets/hjson.js +7 -0
  216. data/vendor/assets/javascripts/ace/snippets/html.js +0 -0
  217. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +0 -0
  218. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +0 -0
  219. data/vendor/assets/javascripts/ace/snippets/ini.js +0 -0
  220. data/vendor/assets/javascripts/ace/snippets/io.js +0 -0
  221. data/vendor/assets/javascripts/ace/snippets/jack.js +0 -0
  222. data/vendor/assets/javascripts/ace/snippets/jade.js +0 -0
  223. data/vendor/assets/javascripts/ace/snippets/java.js +0 -0
  224. data/vendor/assets/javascripts/ace/snippets/javascript.js +0 -0
  225. data/vendor/assets/javascripts/ace/snippets/json.js +0 -0
  226. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +0 -0
  227. data/vendor/assets/javascripts/ace/snippets/jsp.js +0 -0
  228. data/vendor/assets/javascripts/ace/snippets/jsx.js +0 -0
  229. data/vendor/assets/javascripts/ace/snippets/julia.js +0 -0
  230. data/vendor/assets/javascripts/ace/snippets/kotlin.js +7 -0
  231. data/vendor/assets/javascripts/ace/snippets/latex.js +0 -0
  232. data/vendor/assets/javascripts/ace/snippets/lean.js +0 -0
  233. data/vendor/assets/javascripts/ace/snippets/less.js +0 -0
  234. data/vendor/assets/javascripts/ace/snippets/liquid.js +0 -0
  235. data/vendor/assets/javascripts/ace/snippets/lisp.js +0 -0
  236. data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -0
  237. data/vendor/assets/javascripts/ace/snippets/livescript.js +0 -0
  238. data/vendor/assets/javascripts/ace/snippets/logiql.js +0 -0
  239. data/vendor/assets/javascripts/ace/snippets/lsl.js +0 -0
  240. data/vendor/assets/javascripts/ace/snippets/lua.js +0 -0
  241. data/vendor/assets/javascripts/ace/snippets/luapage.js +0 -0
  242. data/vendor/assets/javascripts/ace/snippets/lucene.js +0 -0
  243. data/vendor/assets/javascripts/ace/snippets/makefile.js +0 -0
  244. data/vendor/assets/javascripts/ace/snippets/markdown.js +0 -0
  245. data/vendor/assets/javascripts/ace/snippets/mask.js +0 -0
  246. data/vendor/assets/javascripts/ace/snippets/matlab.js +0 -0
  247. data/vendor/assets/javascripts/ace/snippets/maze.js +0 -0
  248. data/vendor/assets/javascripts/ace/snippets/mel.js +0 -0
  249. data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -0
  250. data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -0
  251. data/vendor/assets/javascripts/ace/snippets/mushcode.js +0 -0
  252. data/vendor/assets/javascripts/ace/snippets/mysql.js +0 -0
  253. data/vendor/assets/javascripts/ace/snippets/nix.js +0 -0
  254. data/vendor/assets/javascripts/ace/snippets/nsis.js +7 -0
  255. data/vendor/assets/javascripts/ace/snippets/objectivec.js +0 -0
  256. data/vendor/assets/javascripts/ace/snippets/ocaml.js +0 -0
  257. data/vendor/assets/javascripts/ace/snippets/pascal.js +0 -0
  258. data/vendor/assets/javascripts/ace/snippets/perl.js +0 -0
  259. data/vendor/assets/javascripts/ace/snippets/pgsql.js +0 -0
  260. data/vendor/assets/javascripts/ace/snippets/php.js +0 -0
  261. data/vendor/assets/javascripts/ace/snippets/plain_text.js +0 -0
  262. data/vendor/assets/javascripts/ace/snippets/powershell.js +0 -0
  263. data/vendor/assets/javascripts/ace/snippets/praat.js +0 -0
  264. data/vendor/assets/javascripts/ace/snippets/prolog.js +0 -0
  265. data/vendor/assets/javascripts/ace/snippets/properties.js +0 -0
  266. data/vendor/assets/javascripts/ace/snippets/protobuf.js +0 -0
  267. data/vendor/assets/javascripts/ace/snippets/python.js +0 -0
  268. data/vendor/assets/javascripts/ace/snippets/r.js +0 -0
  269. data/vendor/assets/javascripts/ace/snippets/razor.js +10 -0
  270. data/vendor/assets/javascripts/ace/snippets/rdoc.js +0 -0
  271. data/vendor/assets/javascripts/ace/snippets/rhtml.js +0 -0
  272. data/vendor/assets/javascripts/ace/snippets/rst.js +29 -0
  273. data/vendor/assets/javascripts/ace/snippets/ruby.js +0 -0
  274. data/vendor/assets/javascripts/ace/snippets/rust.js +0 -0
  275. data/vendor/assets/javascripts/ace/snippets/sass.js +0 -0
  276. data/vendor/assets/javascripts/ace/snippets/scad.js +0 -0
  277. data/vendor/assets/javascripts/ace/snippets/scala.js +0 -0
  278. data/vendor/assets/javascripts/ace/snippets/scheme.js +0 -0
  279. data/vendor/assets/javascripts/ace/snippets/scss.js +0 -0
  280. data/vendor/assets/javascripts/ace/snippets/sh.js +0 -0
  281. data/vendor/assets/javascripts/ace/snippets/sjs.js +0 -0
  282. data/vendor/assets/javascripts/ace/snippets/smarty.js +0 -0
  283. data/vendor/assets/javascripts/ace/snippets/snippets.js +0 -0
  284. data/vendor/assets/javascripts/ace/snippets/soy_template.js +0 -0
  285. data/vendor/assets/javascripts/ace/snippets/space.js +0 -0
  286. data/vendor/assets/javascripts/ace/snippets/sql.js +0 -0
  287. data/vendor/assets/javascripts/ace/snippets/sqlserver.js +0 -0
  288. data/vendor/assets/javascripts/ace/snippets/stylus.js +0 -0
  289. data/vendor/assets/javascripts/ace/snippets/svg.js +0 -0
  290. data/vendor/assets/javascripts/ace/snippets/swift.js +0 -0
  291. data/vendor/assets/javascripts/ace/snippets/swig.js +0 -0
  292. data/vendor/assets/javascripts/ace/snippets/tcl.js +0 -0
  293. data/vendor/assets/javascripts/ace/snippets/tex.js +0 -0
  294. data/vendor/assets/javascripts/ace/snippets/text.js +0 -0
  295. data/vendor/assets/javascripts/ace/snippets/textile.js +0 -0
  296. data/vendor/assets/javascripts/ace/snippets/toml.js +0 -0
  297. data/vendor/assets/javascripts/ace/snippets/tsx.js +7 -0
  298. data/vendor/assets/javascripts/ace/snippets/twig.js +0 -0
  299. data/vendor/assets/javascripts/ace/snippets/typescript.js +0 -0
  300. data/vendor/assets/javascripts/ace/snippets/vala.js +0 -0
  301. data/vendor/assets/javascripts/ace/snippets/vbscript.js +0 -0
  302. data/vendor/assets/javascripts/ace/snippets/velocity.js +0 -0
  303. data/vendor/assets/javascripts/ace/snippets/verilog.js +0 -0
  304. data/vendor/assets/javascripts/ace/snippets/vhdl.js +0 -0
  305. data/vendor/assets/javascripts/ace/snippets/wollok.js +91 -0
  306. data/vendor/assets/javascripts/ace/snippets/xml.js +0 -0
  307. data/vendor/assets/javascripts/ace/snippets/xquery.js +0 -0
  308. data/vendor/assets/javascripts/ace/snippets/yaml.js +0 -0
  309. data/vendor/assets/javascripts/ace/theme-ambiance.js +0 -0
  310. data/vendor/assets/javascripts/ace/theme-chaos.js +0 -0
  311. data/vendor/assets/javascripts/ace/theme-chrome.js +0 -0
  312. data/vendor/assets/javascripts/ace/theme-clouds.js +0 -0
  313. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +0 -0
  314. data/vendor/assets/javascripts/ace/theme-cobalt.js +0 -0
  315. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +0 -0
  316. data/vendor/assets/javascripts/ace/theme-dawn.js +0 -0
  317. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +0 -0
  318. data/vendor/assets/javascripts/ace/theme-eclipse.js +0 -0
  319. data/vendor/assets/javascripts/ace/theme-github.js +0 -0
  320. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +0 -0
  321. data/vendor/assets/javascripts/ace/theme-iplastic.js +0 -0
  322. data/vendor/assets/javascripts/ace/theme-katzenmilch.js +0 -0
  323. data/vendor/assets/javascripts/ace/theme-kr_theme.js +0 -0
  324. data/vendor/assets/javascripts/ace/theme-kuroir.js +0 -0
  325. data/vendor/assets/javascripts/ace/theme-merbivore.js +0 -0
  326. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +0 -0
  327. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +0 -0
  328. data/vendor/assets/javascripts/ace/theme-monokai.js +0 -0
  329. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +0 -0
  330. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +0 -0
  331. data/vendor/assets/javascripts/ace/theme-solarized_light.js +0 -0
  332. data/vendor/assets/javascripts/ace/theme-sqlserver.js +0 -0
  333. data/vendor/assets/javascripts/ace/theme-terminal.js +0 -0
  334. data/vendor/assets/javascripts/ace/theme-textmate.js +0 -0
  335. data/vendor/assets/javascripts/ace/theme-tomorrow.js +0 -0
  336. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +0 -0
  337. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +0 -0
  338. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +0 -0
  339. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +0 -0
  340. data/vendor/assets/javascripts/ace/theme-twilight.js +0 -0
  341. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +0 -0
  342. data/vendor/assets/javascripts/ace/theme-xcode.js +0 -0
  343. data/vendor/assets/javascripts/ace/worker-coffee.js +5 -7
  344. data/vendor/assets/javascripts/ace/worker-css.js +20 -22
  345. data/vendor/assets/javascripts/ace/worker-html.js +5 -7
  346. data/vendor/assets/javascripts/ace/worker-javascript.js +6 -8
  347. data/vendor/assets/javascripts/ace/worker-json.js +5 -7
  348. data/vendor/assets/javascripts/ace/worker-lua.js +5 -7
  349. data/vendor/assets/javascripts/ace/worker-php.js +1399 -4118
  350. data/vendor/assets/javascripts/ace/worker-xml.js +5 -7
  351. data/vendor/assets/javascripts/ace/worker-xquery.js +17575 -8836
  352. metadata +21 -2
@@ -198,363 +198,6 @@ var MatchingBraceOutdent = function() {};
198
198
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
199
199
  });
200
200
 
201
- define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
202
- "use strict";
203
-
204
- var oop = require("../../lib/oop");
205
- var Behaviour = require("../behaviour").Behaviour;
206
- var TokenIterator = require("../../token_iterator").TokenIterator;
207
- var lang = require("../../lib/lang");
208
-
209
- var SAFE_INSERT_IN_TOKENS =
210
- ["text", "paren.rparen", "punctuation.operator"];
211
- var SAFE_INSERT_BEFORE_TOKENS =
212
- ["text", "paren.rparen", "punctuation.operator", "comment"];
213
-
214
- var context;
215
- var contextCache = {};
216
- var initContext = function(editor) {
217
- var id = -1;
218
- if (editor.multiSelect) {
219
- id = editor.selection.index;
220
- if (contextCache.rangeCount != editor.multiSelect.rangeCount)
221
- contextCache = {rangeCount: editor.multiSelect.rangeCount};
222
- }
223
- if (contextCache[id])
224
- return context = contextCache[id];
225
- context = contextCache[id] = {
226
- autoInsertedBrackets: 0,
227
- autoInsertedRow: -1,
228
- autoInsertedLineEnd: "",
229
- maybeInsertedBrackets: 0,
230
- maybeInsertedRow: -1,
231
- maybeInsertedLineStart: "",
232
- maybeInsertedLineEnd: ""
233
- };
234
- };
235
-
236
- var getWrapped = function(selection, selected, opening, closing) {
237
- var rowDiff = selection.end.row - selection.start.row;
238
- return {
239
- text: opening + selected + closing,
240
- selection: [
241
- 0,
242
- selection.start.column + 1,
243
- rowDiff,
244
- selection.end.column + (rowDiff ? 0 : 1)
245
- ]
246
- };
247
- };
248
-
249
- var CstyleBehaviour = function() {
250
- this.add("braces", "insertion", function(state, action, editor, session, text) {
251
- var cursor = editor.getCursorPosition();
252
- var line = session.doc.getLine(cursor.row);
253
- if (text == '{') {
254
- initContext(editor);
255
- var selection = editor.getSelectionRange();
256
- var selected = session.doc.getTextRange(selection);
257
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
258
- return getWrapped(selection, selected, '{', '}');
259
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
260
- if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
261
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
262
- return {
263
- text: '{}',
264
- selection: [1, 1]
265
- };
266
- } else {
267
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
268
- return {
269
- text: '{',
270
- selection: [1, 1]
271
- };
272
- }
273
- }
274
- } else if (text == '}') {
275
- initContext(editor);
276
- var rightChar = line.substring(cursor.column, cursor.column + 1);
277
- if (rightChar == '}') {
278
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
279
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
280
- CstyleBehaviour.popAutoInsertedClosing();
281
- return {
282
- text: '',
283
- selection: [1, 1]
284
- };
285
- }
286
- }
287
- } else if (text == "\n" || text == "\r\n") {
288
- initContext(editor);
289
- var closing = "";
290
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
291
- closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
292
- CstyleBehaviour.clearMaybeInsertedClosing();
293
- }
294
- var rightChar = line.substring(cursor.column, cursor.column + 1);
295
- if (rightChar === '}') {
296
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
297
- if (!openBracePos)
298
- return null;
299
- var next_indent = this.$getIndent(session.getLine(openBracePos.row));
300
- } else if (closing) {
301
- var next_indent = this.$getIndent(line);
302
- } else {
303
- CstyleBehaviour.clearMaybeInsertedClosing();
304
- return;
305
- }
306
- var indent = next_indent + session.getTabString();
307
-
308
- return {
309
- text: '\n' + indent + '\n' + next_indent + closing,
310
- selection: [1, indent.length, 1, indent.length]
311
- };
312
- } else {
313
- CstyleBehaviour.clearMaybeInsertedClosing();
314
- }
315
- });
316
-
317
- this.add("braces", "deletion", function(state, action, editor, session, range) {
318
- var selected = session.doc.getTextRange(range);
319
- if (!range.isMultiLine() && selected == '{') {
320
- initContext(editor);
321
- var line = session.doc.getLine(range.start.row);
322
- var rightChar = line.substring(range.end.column, range.end.column + 1);
323
- if (rightChar == '}') {
324
- range.end.column++;
325
- return range;
326
- } else {
327
- context.maybeInsertedBrackets--;
328
- }
329
- }
330
- });
331
-
332
- this.add("parens", "insertion", function(state, action, editor, session, text) {
333
- if (text == '(') {
334
- initContext(editor);
335
- var selection = editor.getSelectionRange();
336
- var selected = session.doc.getTextRange(selection);
337
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
338
- return getWrapped(selection, selected, '(', ')');
339
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
340
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
341
- return {
342
- text: '()',
343
- selection: [1, 1]
344
- };
345
- }
346
- } else if (text == ')') {
347
- initContext(editor);
348
- var cursor = editor.getCursorPosition();
349
- var line = session.doc.getLine(cursor.row);
350
- var rightChar = line.substring(cursor.column, cursor.column + 1);
351
- if (rightChar == ')') {
352
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
353
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
354
- CstyleBehaviour.popAutoInsertedClosing();
355
- return {
356
- text: '',
357
- selection: [1, 1]
358
- };
359
- }
360
- }
361
- }
362
- });
363
-
364
- this.add("parens", "deletion", function(state, action, editor, session, range) {
365
- var selected = session.doc.getTextRange(range);
366
- if (!range.isMultiLine() && selected == '(') {
367
- initContext(editor);
368
- var line = session.doc.getLine(range.start.row);
369
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
370
- if (rightChar == ')') {
371
- range.end.column++;
372
- return range;
373
- }
374
- }
375
- });
376
-
377
- this.add("brackets", "insertion", function(state, action, editor, session, text) {
378
- if (text == '[') {
379
- initContext(editor);
380
- var selection = editor.getSelectionRange();
381
- var selected = session.doc.getTextRange(selection);
382
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
383
- return getWrapped(selection, selected, '[', ']');
384
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
385
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
386
- return {
387
- text: '[]',
388
- selection: [1, 1]
389
- };
390
- }
391
- } else if (text == ']') {
392
- initContext(editor);
393
- var cursor = editor.getCursorPosition();
394
- var line = session.doc.getLine(cursor.row);
395
- var rightChar = line.substring(cursor.column, cursor.column + 1);
396
- if (rightChar == ']') {
397
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
398
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
399
- CstyleBehaviour.popAutoInsertedClosing();
400
- return {
401
- text: '',
402
- selection: [1, 1]
403
- };
404
- }
405
- }
406
- }
407
- });
408
-
409
- this.add("brackets", "deletion", function(state, action, editor, session, range) {
410
- var selected = session.doc.getTextRange(range);
411
- if (!range.isMultiLine() && selected == '[') {
412
- initContext(editor);
413
- var line = session.doc.getLine(range.start.row);
414
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
415
- if (rightChar == ']') {
416
- range.end.column++;
417
- return range;
418
- }
419
- }
420
- });
421
-
422
- this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
423
- if (text == '"' || text == "'") {
424
- initContext(editor);
425
- var quote = text;
426
- var selection = editor.getSelectionRange();
427
- var selected = session.doc.getTextRange(selection);
428
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
429
- return getWrapped(selection, selected, quote, quote);
430
- } else if (!selected) {
431
- var cursor = editor.getCursorPosition();
432
- var line = session.doc.getLine(cursor.row);
433
- var leftChar = line.substring(cursor.column-1, cursor.column);
434
- var rightChar = line.substring(cursor.column, cursor.column + 1);
435
-
436
- var token = session.getTokenAt(cursor.row, cursor.column);
437
- var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
438
- if (leftChar == "\\" && token && /escape/.test(token.type))
439
- return null;
440
-
441
- var stringBefore = token && /string|escape/.test(token.type);
442
- var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
443
-
444
- var pair;
445
- if (rightChar == quote) {
446
- pair = stringBefore !== stringAfter;
447
- } else {
448
- if (stringBefore && !stringAfter)
449
- return null; // wrap string with different quote
450
- if (stringBefore && stringAfter)
451
- return null; // do not pair quotes inside strings
452
- var wordRe = session.$mode.tokenRe;
453
- wordRe.lastIndex = 0;
454
- var isWordBefore = wordRe.test(leftChar);
455
- wordRe.lastIndex = 0;
456
- var isWordAfter = wordRe.test(leftChar);
457
- if (isWordBefore || isWordAfter)
458
- return null; // before or after alphanumeric
459
- if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
460
- return null; // there is rightChar and it isn't closing
461
- pair = true;
462
- }
463
- return {
464
- text: pair ? quote + quote : "",
465
- selection: [1,1]
466
- };
467
- }
468
- }
469
- });
470
-
471
- this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
472
- var selected = session.doc.getTextRange(range);
473
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
474
- initContext(editor);
475
- var line = session.doc.getLine(range.start.row);
476
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
477
- if (rightChar == selected) {
478
- range.end.column++;
479
- return range;
480
- }
481
- }
482
- });
483
-
484
- };
485
-
486
-
487
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
488
- var cursor = editor.getCursorPosition();
489
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
490
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
491
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
492
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
493
- return false;
494
- }
495
- iterator.stepForward();
496
- return iterator.getCurrentTokenRow() !== cursor.row ||
497
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
498
- };
499
-
500
- CstyleBehaviour.$matchTokenType = function(token, types) {
501
- return types.indexOf(token.type || token) > -1;
502
- };
503
-
504
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
505
- var cursor = editor.getCursorPosition();
506
- var line = session.doc.getLine(cursor.row);
507
- if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
508
- context.autoInsertedBrackets = 0;
509
- context.autoInsertedRow = cursor.row;
510
- context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
511
- context.autoInsertedBrackets++;
512
- };
513
-
514
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
515
- var cursor = editor.getCursorPosition();
516
- var line = session.doc.getLine(cursor.row);
517
- if (!this.isMaybeInsertedClosing(cursor, line))
518
- context.maybeInsertedBrackets = 0;
519
- context.maybeInsertedRow = cursor.row;
520
- context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
521
- context.maybeInsertedLineEnd = line.substr(cursor.column);
522
- context.maybeInsertedBrackets++;
523
- };
524
-
525
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
526
- return context.autoInsertedBrackets > 0 &&
527
- cursor.row === context.autoInsertedRow &&
528
- bracket === context.autoInsertedLineEnd[0] &&
529
- line.substr(cursor.column) === context.autoInsertedLineEnd;
530
- };
531
-
532
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
533
- return context.maybeInsertedBrackets > 0 &&
534
- cursor.row === context.maybeInsertedRow &&
535
- line.substr(cursor.column) === context.maybeInsertedLineEnd &&
536
- line.substr(0, cursor.column) == context.maybeInsertedLineStart;
537
- };
538
-
539
- CstyleBehaviour.popAutoInsertedClosing = function() {
540
- context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
541
- context.autoInsertedBrackets--;
542
- };
543
-
544
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
545
- if (context) {
546
- context.maybeInsertedBrackets = 0;
547
- context.maybeInsertedRow = -1;
548
- }
549
- };
550
-
551
-
552
-
553
- oop.inherits(CstyleBehaviour, Behaviour);
554
-
555
- exports.CstyleBehaviour = CstyleBehaviour;
556
- });
557
-
558
201
  define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
559
202
  "use strict";
560
203
 
@@ -695,14 +338,13 @@ oop.inherits(FoldMode, BaseFoldMode);
695
338
 
696
339
  });
697
340
 
698
- define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
341
+ define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
699
342
  "use strict";
700
343
 
701
344
  var oop = require("../lib/oop");
702
345
  var TextMode = require("./text").Mode;
703
346
  var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
704
347
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
705
- var Range = require("../range").Range;
706
348
  var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
707
349
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
708
350
 
@@ -54,7 +54,7 @@ define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/
54
54
  var oop = require("../lib/oop");
55
55
  var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
56
56
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
57
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
58
58
 
59
59
  var JavaScriptHighlightRules = function(options) {
60
60
  var keywordMapper = this.createKeywordMapper({
@@ -70,9 +70,9 @@ var JavaScriptHighlightRules = function(options) {
70
70
  "JSON|Math|" + // Other
71
71
  "this|arguments|prototype|window|document" , // Pseudo
72
72
  "keyword":
73
- "const|yield|import|get|set|" +
73
+ "const|yield|import|get|set|async|await|" +
74
74
  "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
75
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
75
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
76
76
  "__parent__|__count__|escape|unescape|with|__proto__|" +
77
77
  "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
78
78
  "storage.type":
@@ -178,7 +178,7 @@ var JavaScriptHighlightRules = function(options) {
178
178
  next : "property"
179
179
  }, {
180
180
  token : "keyword.operator",
181
- regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,
181
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
182
182
  next : "start"
183
183
  }, {
184
184
  token : "punctuation.operator",
@@ -379,7 +379,7 @@ var JavaScriptHighlightRules = function(options) {
379
379
  }]
380
380
  });
381
381
 
382
- if (!options || !options.noJSX)
382
+ if (!options || options.jsx != false)
383
383
  JSX.call(this);
384
384
  }
385
385
 
@@ -555,363 +555,6 @@ var MatchingBraceOutdent = function() {};
555
555
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
556
556
  });
557
557
 
558
- define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
559
- "use strict";
560
-
561
- var oop = require("../../lib/oop");
562
- var Behaviour = require("../behaviour").Behaviour;
563
- var TokenIterator = require("../../token_iterator").TokenIterator;
564
- var lang = require("../../lib/lang");
565
-
566
- var SAFE_INSERT_IN_TOKENS =
567
- ["text", "paren.rparen", "punctuation.operator"];
568
- var SAFE_INSERT_BEFORE_TOKENS =
569
- ["text", "paren.rparen", "punctuation.operator", "comment"];
570
-
571
- var context;
572
- var contextCache = {};
573
- var initContext = function(editor) {
574
- var id = -1;
575
- if (editor.multiSelect) {
576
- id = editor.selection.index;
577
- if (contextCache.rangeCount != editor.multiSelect.rangeCount)
578
- contextCache = {rangeCount: editor.multiSelect.rangeCount};
579
- }
580
- if (contextCache[id])
581
- return context = contextCache[id];
582
- context = contextCache[id] = {
583
- autoInsertedBrackets: 0,
584
- autoInsertedRow: -1,
585
- autoInsertedLineEnd: "",
586
- maybeInsertedBrackets: 0,
587
- maybeInsertedRow: -1,
588
- maybeInsertedLineStart: "",
589
- maybeInsertedLineEnd: ""
590
- };
591
- };
592
-
593
- var getWrapped = function(selection, selected, opening, closing) {
594
- var rowDiff = selection.end.row - selection.start.row;
595
- return {
596
- text: opening + selected + closing,
597
- selection: [
598
- 0,
599
- selection.start.column + 1,
600
- rowDiff,
601
- selection.end.column + (rowDiff ? 0 : 1)
602
- ]
603
- };
604
- };
605
-
606
- var CstyleBehaviour = function() {
607
- this.add("braces", "insertion", function(state, action, editor, session, text) {
608
- var cursor = editor.getCursorPosition();
609
- var line = session.doc.getLine(cursor.row);
610
- if (text == '{') {
611
- initContext(editor);
612
- var selection = editor.getSelectionRange();
613
- var selected = session.doc.getTextRange(selection);
614
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
615
- return getWrapped(selection, selected, '{', '}');
616
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
617
- if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
618
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
619
- return {
620
- text: '{}',
621
- selection: [1, 1]
622
- };
623
- } else {
624
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
625
- return {
626
- text: '{',
627
- selection: [1, 1]
628
- };
629
- }
630
- }
631
- } else if (text == '}') {
632
- initContext(editor);
633
- var rightChar = line.substring(cursor.column, cursor.column + 1);
634
- if (rightChar == '}') {
635
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
636
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
637
- CstyleBehaviour.popAutoInsertedClosing();
638
- return {
639
- text: '',
640
- selection: [1, 1]
641
- };
642
- }
643
- }
644
- } else if (text == "\n" || text == "\r\n") {
645
- initContext(editor);
646
- var closing = "";
647
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
648
- closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
649
- CstyleBehaviour.clearMaybeInsertedClosing();
650
- }
651
- var rightChar = line.substring(cursor.column, cursor.column + 1);
652
- if (rightChar === '}') {
653
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
654
- if (!openBracePos)
655
- return null;
656
- var next_indent = this.$getIndent(session.getLine(openBracePos.row));
657
- } else if (closing) {
658
- var next_indent = this.$getIndent(line);
659
- } else {
660
- CstyleBehaviour.clearMaybeInsertedClosing();
661
- return;
662
- }
663
- var indent = next_indent + session.getTabString();
664
-
665
- return {
666
- text: '\n' + indent + '\n' + next_indent + closing,
667
- selection: [1, indent.length, 1, indent.length]
668
- };
669
- } else {
670
- CstyleBehaviour.clearMaybeInsertedClosing();
671
- }
672
- });
673
-
674
- this.add("braces", "deletion", function(state, action, editor, session, range) {
675
- var selected = session.doc.getTextRange(range);
676
- if (!range.isMultiLine() && selected == '{') {
677
- initContext(editor);
678
- var line = session.doc.getLine(range.start.row);
679
- var rightChar = line.substring(range.end.column, range.end.column + 1);
680
- if (rightChar == '}') {
681
- range.end.column++;
682
- return range;
683
- } else {
684
- context.maybeInsertedBrackets--;
685
- }
686
- }
687
- });
688
-
689
- this.add("parens", "insertion", function(state, action, editor, session, text) {
690
- if (text == '(') {
691
- initContext(editor);
692
- var selection = editor.getSelectionRange();
693
- var selected = session.doc.getTextRange(selection);
694
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
695
- return getWrapped(selection, selected, '(', ')');
696
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
697
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
698
- return {
699
- text: '()',
700
- selection: [1, 1]
701
- };
702
- }
703
- } else if (text == ')') {
704
- initContext(editor);
705
- var cursor = editor.getCursorPosition();
706
- var line = session.doc.getLine(cursor.row);
707
- var rightChar = line.substring(cursor.column, cursor.column + 1);
708
- if (rightChar == ')') {
709
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
710
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
711
- CstyleBehaviour.popAutoInsertedClosing();
712
- return {
713
- text: '',
714
- selection: [1, 1]
715
- };
716
- }
717
- }
718
- }
719
- });
720
-
721
- this.add("parens", "deletion", function(state, action, editor, session, range) {
722
- var selected = session.doc.getTextRange(range);
723
- if (!range.isMultiLine() && selected == '(') {
724
- initContext(editor);
725
- var line = session.doc.getLine(range.start.row);
726
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
727
- if (rightChar == ')') {
728
- range.end.column++;
729
- return range;
730
- }
731
- }
732
- });
733
-
734
- this.add("brackets", "insertion", function(state, action, editor, session, text) {
735
- if (text == '[') {
736
- initContext(editor);
737
- var selection = editor.getSelectionRange();
738
- var selected = session.doc.getTextRange(selection);
739
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
740
- return getWrapped(selection, selected, '[', ']');
741
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
742
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
743
- return {
744
- text: '[]',
745
- selection: [1, 1]
746
- };
747
- }
748
- } else if (text == ']') {
749
- initContext(editor);
750
- var cursor = editor.getCursorPosition();
751
- var line = session.doc.getLine(cursor.row);
752
- var rightChar = line.substring(cursor.column, cursor.column + 1);
753
- if (rightChar == ']') {
754
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
755
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
756
- CstyleBehaviour.popAutoInsertedClosing();
757
- return {
758
- text: '',
759
- selection: [1, 1]
760
- };
761
- }
762
- }
763
- }
764
- });
765
-
766
- this.add("brackets", "deletion", function(state, action, editor, session, range) {
767
- var selected = session.doc.getTextRange(range);
768
- if (!range.isMultiLine() && selected == '[') {
769
- initContext(editor);
770
- var line = session.doc.getLine(range.start.row);
771
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
772
- if (rightChar == ']') {
773
- range.end.column++;
774
- return range;
775
- }
776
- }
777
- });
778
-
779
- this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
780
- if (text == '"' || text == "'") {
781
- initContext(editor);
782
- var quote = text;
783
- var selection = editor.getSelectionRange();
784
- var selected = session.doc.getTextRange(selection);
785
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
786
- return getWrapped(selection, selected, quote, quote);
787
- } else if (!selected) {
788
- var cursor = editor.getCursorPosition();
789
- var line = session.doc.getLine(cursor.row);
790
- var leftChar = line.substring(cursor.column-1, cursor.column);
791
- var rightChar = line.substring(cursor.column, cursor.column + 1);
792
-
793
- var token = session.getTokenAt(cursor.row, cursor.column);
794
- var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
795
- if (leftChar == "\\" && token && /escape/.test(token.type))
796
- return null;
797
-
798
- var stringBefore = token && /string|escape/.test(token.type);
799
- var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
800
-
801
- var pair;
802
- if (rightChar == quote) {
803
- pair = stringBefore !== stringAfter;
804
- } else {
805
- if (stringBefore && !stringAfter)
806
- return null; // wrap string with different quote
807
- if (stringBefore && stringAfter)
808
- return null; // do not pair quotes inside strings
809
- var wordRe = session.$mode.tokenRe;
810
- wordRe.lastIndex = 0;
811
- var isWordBefore = wordRe.test(leftChar);
812
- wordRe.lastIndex = 0;
813
- var isWordAfter = wordRe.test(leftChar);
814
- if (isWordBefore || isWordAfter)
815
- return null; // before or after alphanumeric
816
- if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
817
- return null; // there is rightChar and it isn't closing
818
- pair = true;
819
- }
820
- return {
821
- text: pair ? quote + quote : "",
822
- selection: [1,1]
823
- };
824
- }
825
- }
826
- });
827
-
828
- this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
829
- var selected = session.doc.getTextRange(range);
830
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
831
- initContext(editor);
832
- var line = session.doc.getLine(range.start.row);
833
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
834
- if (rightChar == selected) {
835
- range.end.column++;
836
- return range;
837
- }
838
- }
839
- });
840
-
841
- };
842
-
843
-
844
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
845
- var cursor = editor.getCursorPosition();
846
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
847
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
848
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
849
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
850
- return false;
851
- }
852
- iterator.stepForward();
853
- return iterator.getCurrentTokenRow() !== cursor.row ||
854
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
855
- };
856
-
857
- CstyleBehaviour.$matchTokenType = function(token, types) {
858
- return types.indexOf(token.type || token) > -1;
859
- };
860
-
861
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
862
- var cursor = editor.getCursorPosition();
863
- var line = session.doc.getLine(cursor.row);
864
- if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
865
- context.autoInsertedBrackets = 0;
866
- context.autoInsertedRow = cursor.row;
867
- context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
868
- context.autoInsertedBrackets++;
869
- };
870
-
871
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
872
- var cursor = editor.getCursorPosition();
873
- var line = session.doc.getLine(cursor.row);
874
- if (!this.isMaybeInsertedClosing(cursor, line))
875
- context.maybeInsertedBrackets = 0;
876
- context.maybeInsertedRow = cursor.row;
877
- context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
878
- context.maybeInsertedLineEnd = line.substr(cursor.column);
879
- context.maybeInsertedBrackets++;
880
- };
881
-
882
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
883
- return context.autoInsertedBrackets > 0 &&
884
- cursor.row === context.autoInsertedRow &&
885
- bracket === context.autoInsertedLineEnd[0] &&
886
- line.substr(cursor.column) === context.autoInsertedLineEnd;
887
- };
888
-
889
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
890
- return context.maybeInsertedBrackets > 0 &&
891
- cursor.row === context.maybeInsertedRow &&
892
- line.substr(cursor.column) === context.maybeInsertedLineEnd &&
893
- line.substr(0, cursor.column) == context.maybeInsertedLineStart;
894
- };
895
-
896
- CstyleBehaviour.popAutoInsertedClosing = function() {
897
- context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
898
- context.autoInsertedBrackets--;
899
- };
900
-
901
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
902
- if (context) {
903
- context.maybeInsertedBrackets = 0;
904
- context.maybeInsertedRow = -1;
905
- }
906
- };
907
-
908
-
909
-
910
- oop.inherits(CstyleBehaviour, Behaviour);
911
-
912
- exports.CstyleBehaviour = CstyleBehaviour;
913
- });
914
-
915
558
  define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
916
559
  "use strict";
917
560
 
@@ -1052,14 +695,13 @@ oop.inherits(FoldMode, BaseFoldMode);
1052
695
 
1053
696
  });
1054
697
 
1055
- define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
698
+ define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
1056
699
  "use strict";
1057
700
 
1058
701
  var oop = require("../lib/oop");
1059
702
  var TextMode = require("./text").Mode;
1060
703
  var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1061
704
  var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1062
- var Range = require("../range").Range;
1063
705
  var WorkerClient = require("../worker/worker_client").WorkerClient;
1064
706
  var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1065
707
  var CStyleFoldMode = require("./folding/cstyle").FoldMode;
@@ -1090,7 +732,7 @@ oop.inherits(Mode, TextMode);
1090
732
  }
1091
733
 
1092
734
  if (state == "start" || state == "no_regex") {
1093
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
735
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1094
736
  if (match) {
1095
737
  indent += tab;
1096
738
  }
@@ -1283,12 +925,11 @@ var ScalaHighlightRules = function() {
1283
925
  ],
1284
926
  "tstring" : [
1285
927
  {
1286
- token : "string", // closing comment
928
+ token : "string",
1287
929
  regex : '"{3,5}',
1288
930
  next : "start"
1289
931
  }, {
1290
- token : "string", // comment spanning whole line
1291
- regex : ".+?"
932
+ defaultToken : "string"
1292
933
  }
1293
934
  ]
1294
935
  };
@@ -1311,7 +952,6 @@ var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules
1311
952
 
1312
953
  var Mode = function() {
1313
954
  JavaScriptMode.call(this);
1314
-
1315
955
  this.HighlightRules = ScalaHighlightRules;
1316
956
  };
1317
957
  oop.inherits(Mode, JavaScriptMode);