jquery-ace-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. data/README.md +36 -0
  2. data/lib/jquery-ace-rails.rb +5 -0
  3. data/lib/jquery-ace-rails/engine.rb +4 -0
  4. data/lib/jquery-ace-rails/version.rb +3 -0
  5. data/vendor/assets/javascripts/jquery-ace/jquery-ace.coffee +126 -0
  6. data/vendor/assets/javascripts/jquery-ace/jquery-ace.js +195 -0
  7. data/vendor/assets/javascripts/jquery-ace/jquery-ace.min.js +1 -0
  8. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ace.js +11 -0
  9. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-static_highlight.js +1 -0
  10. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-textarea.js +1 -0
  11. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-emacs.js +1 -0
  12. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-vim.js +1 -0
  13. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-abap.js +1 -0
  14. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-asciidoc.js +1 -0
  15. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c9search.js +1 -0
  16. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c_cpp.js +1 -0
  17. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-clojure.js +1 -0
  18. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coffee.js +1 -0
  19. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coldfusion.js +1 -0
  20. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-csharp.js +1 -0
  21. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-css.js +1 -0
  22. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dart.js +1 -0
  23. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-diff.js +1 -0
  24. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dot.js +1 -0
  25. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-glsl.js +1 -0
  26. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-golang.js +1 -0
  27. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-groovy.js +1 -0
  28. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haml.js +1 -0
  29. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haxe.js +1 -0
  30. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-html.js +1 -0
  31. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jade.js +1 -0
  32. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-java.js +1 -0
  33. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-javascript.js +1 -0
  34. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-json.js +1 -0
  35. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsp.js +1 -0
  36. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsx.js +1 -0
  37. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-latex.js +1 -0
  38. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-less.js +1 -0
  39. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-liquid.js +1 -0
  40. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lisp.js +1 -0
  41. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lua.js +1 -0
  42. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-luapage.js +1 -0
  43. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lucene.js +1 -0
  44. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-makefile.js +1 -0
  45. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-markdown.js +1 -0
  46. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-objectivec.js +1 -0
  47. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ocaml.js +1 -0
  48. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-perl.js +1 -0
  49. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-pgsql.js +1 -0
  50. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-php.js +1 -0
  51. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-powershell.js +1 -0
  52. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-python.js +1 -0
  53. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-r.js +1 -0
  54. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rdoc.js +1 -0
  55. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rhtml.js +1 -0
  56. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ruby.js +1 -0
  57. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scad.js +1 -0
  58. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scala.js +1 -0
  59. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scss.js +1 -0
  60. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sh.js +1 -0
  61. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sql.js +1 -0
  62. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-stylus.js +1 -0
  63. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-svg.js +1 -0
  64. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tcl.js +1 -0
  65. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tex.js +1 -0
  66. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-text.js +0 -0
  67. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-textile.js +1 -0
  68. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-typescript.js +1 -0
  69. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xml.js +1 -0
  70. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xquery.js +1 -0
  71. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-yaml.js +1 -0
  72. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-ambiance.js +1 -0
  73. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chaos.js +1 -0
  74. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chrome.js +1 -0
  75. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds.js +1 -0
  76. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds_midnight.js +1 -0
  77. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-cobalt.js +1 -0
  78. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-crimson_editor.js +1 -0
  79. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dawn.js +1 -0
  80. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dreamweaver.js +1 -0
  81. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-eclipse.js +1 -0
  82. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-github.js +1 -0
  83. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-idle_fingers.js +1 -0
  84. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-kr.js +1 -0
  85. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore.js +1 -0
  86. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore_soft.js +1 -0
  87. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-mono_industrial.js +1 -0
  88. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-monokai.js +1 -0
  89. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-pastel_on_dark.js +1 -0
  90. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_dark.js +1 -0
  91. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_light.js +1 -0
  92. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-textmate.js +1 -0
  93. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow.js +1 -0
  94. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night.js +1 -0
  95. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_blue.js +1 -0
  96. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_bright.js +1 -0
  97. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_eighties.js +1 -0
  98. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-twilight.js +1 -0
  99. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-vibrant_ink.js +1 -0
  100. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-xcode.js +1 -0
  101. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-coffee.js +1 -0
  102. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-css.js +1 -0
  103. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-javascript.js +1 -0
  104. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-json.js +1 -0
  105. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-xquery.js +1 -0
  106. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +14262 -0
  107. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +96 -0
  108. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +591 -0
  109. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +364 -0
  110. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +1646 -0
  111. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +259 -0
  112. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +372 -0
  113. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +187 -0
  114. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +765 -0
  115. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +325 -0
  116. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +520 -0
  117. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +1725 -0
  118. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +605 -0
  119. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +680 -0
  120. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +279 -0
  121. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +163 -0
  122. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +348 -0
  123. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +838 -0
  124. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +660 -0
  125. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +1082 -0
  126. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +440 -0
  127. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +610 -0
  128. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +1850 -0
  129. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +2035 -0
  130. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +1041 -0
  131. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +921 -0
  132. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +574 -0
  133. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +1371 -0
  134. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +635 -0
  135. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +217 -0
  136. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +394 -0
  137. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +921 -0
  138. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +142 -0
  139. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +609 -0
  140. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +2463 -0
  141. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +64 -0
  142. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +314 -0
  143. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +2228 -0
  144. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +655 -0
  145. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +448 -0
  146. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +319 -0
  147. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +928 -0
  148. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +2299 -0
  149. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +611 -0
  150. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +290 -0
  151. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +410 -0
  152. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +189 -0
  153. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +2138 -0
  154. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +410 -0
  155. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +698 -0
  156. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +1070 -0
  157. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +416 -0
  158. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +232 -0
  159. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +145 -0
  160. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +474 -0
  161. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +1490 -0
  162. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +342 -0
  163. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +171 -0
  164. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
  165. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +175 -0
  166. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +1011 -0
  167. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +792 -0
  168. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +676 -0
  169. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +298 -0
  170. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +202 -0
  171. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +167 -0
  172. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +161 -0
  173. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +135 -0
  174. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +136 -0
  175. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +150 -0
  176. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +154 -0
  177. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +146 -0
  178. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +173 -0
  179. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +122 -0
  180. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +136 -0
  181. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +136 -0
  182. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +143 -0
  183. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +135 -0
  184. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +136 -0
  185. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +148 -0
  186. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +140 -0
  187. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +148 -0
  188. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +128 -0
  189. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +131 -0
  190. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +163 -0
  191. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +147 -0
  192. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +147 -0
  193. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +145 -0
  194. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +147 -0
  195. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +144 -0
  196. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +147 -0
  197. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +131 -0
  198. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +125 -0
  199. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +6985 -0
  200. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +7741 -0
  201. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +6387 -0
  202. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +2228 -0
  203. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +21719 -0
  204. data/vendor/assets/javascripts/jquery-ace/vendor/jquery-1.8.3.min.js +2 -0
  205. metadata +249 -0
@@ -0,0 +1,676 @@
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
+ define('ace/mode/xquery', ['require', 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xquery_highlight_rules', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
31
+
32
+
33
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var XQueryHighlightRules = require("./xquery_highlight_rules").XQueryHighlightRules;
38
+ var Range = require("../range").Range;
39
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
40
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
41
+
42
+
43
+ var Mode = function(parent) {
44
+ this.$tokenizer = new Tokenizer(new XQueryHighlightRules().getRules());
45
+ this.$behaviour = new CstyleBehaviour(parent);
46
+ this.foldingRules = new CStyleFoldMode();
47
+ };
48
+
49
+ oop.inherits(Mode, TextMode);
50
+
51
+ (function() {
52
+
53
+ this.getNextLineIndent = function(state, line, tab) {
54
+ var indent = this.$getIndent(line);
55
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
56
+ if (match)
57
+ indent += tab;
58
+ return indent;
59
+ };
60
+
61
+ this.checkOutdent = function(state, line, input) {
62
+ if (! /^\s+$/.test(line))
63
+ return false;
64
+
65
+ return /^\s*[\}\)]/.test(input);
66
+ };
67
+
68
+ this.autoOutdent = function(state, doc, row) {
69
+ var line = doc.getLine(row);
70
+ var match = line.match(/^(\s*[\}\)])/);
71
+
72
+ if (!match) return 0;
73
+
74
+ var column = match[1].length;
75
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
76
+
77
+ if (!openBracePos || openBracePos.row == row) return 0;
78
+
79
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
80
+ doc.replace(new Range(row, 0, row, column-1), indent);
81
+ };
82
+
83
+ this.$getIndent = function(line) {
84
+ var match = line.match(/^(\s+)/);
85
+ if (match) {
86
+ return match[1];
87
+ }
88
+
89
+ return "";
90
+ };
91
+
92
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
93
+ var i, line;
94
+ var outdent = true;
95
+ var re = /^\s*\(:(.*):\)/;
96
+
97
+ for (i=startRow; i<= endRow; i++) {
98
+ if (!re.test(doc.getLine(i))) {
99
+ outdent = false;
100
+ break;
101
+ }
102
+ }
103
+
104
+ var range = new Range(0, 0, 0, 0);
105
+ for (i=startRow; i<= endRow; i++) {
106
+ line = doc.getLine(i);
107
+ range.start.row = i;
108
+ range.end.row = i;
109
+ range.end.column = line.length;
110
+
111
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
112
+ }
113
+ };
114
+
115
+ this.createWorker = function(session) {
116
+ this.$deltas = [];
117
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
118
+ var that = this;
119
+
120
+ session.getDocument().on('change', function(evt){
121
+ that.$deltas.push(evt.data);
122
+ });
123
+
124
+ worker.attachToDocument(session.getDocument());
125
+
126
+ worker.on("start", function(e) {
127
+ that.$deltas = [];
128
+ });
129
+
130
+ worker.on("error", function(e) {
131
+ session.setAnnotations([e.data]);
132
+ });
133
+
134
+ worker.on("ok", function(e) {
135
+ session.clearAnnotations();
136
+ });
137
+
138
+ worker.on("highlight", function(tokens) {
139
+ var firstRow = 0;
140
+ var lastRow = session.getLength() - 1;
141
+
142
+ var lines = tokens.data.lines;
143
+ var states = tokens.data.states;
144
+
145
+ for(var i=0; i < that.$deltas.length; i++)
146
+ {
147
+ var delta = that.$deltas[i];
148
+
149
+ if (delta.action === "insertLines")
150
+ {
151
+ var newLineCount = delta.lines.length;
152
+ for (var i = 0; i < newLineCount; i++) {
153
+ lines.splice(delta.range.start.row + i, 0, undefined);
154
+ states.splice(delta.range.start.row + i, 0, undefined);
155
+ }
156
+ }
157
+ else if (delta.action === "insertText")
158
+ {
159
+ if (session.getDocument().isNewLine(delta.text))
160
+ {
161
+ lines.splice(delta.range.end.row, 0, undefined);
162
+ states.splice(delta.range.end.row, 0, undefined);
163
+ } else {
164
+ lines[delta.range.start.row] = undefined;
165
+ states[delta.range.start.row] = undefined;
166
+ }
167
+ } else if (delta.action === "removeLines") {
168
+ var oldLineCount = delta.lines.length;
169
+ lines.splice(delta.range.start.row, oldLineCount);
170
+ states.splice(delta.range.start.row, oldLineCount);
171
+ } else if (delta.action === "removeText") {
172
+ if (session.getDocument().isNewLine(delta.text))
173
+ {
174
+ lines[delta.range.start.row] = undefined;
175
+ lines.splice(delta.range.end.row, 1);
176
+ states[delta.range.start.row] = undefined;
177
+ states.splice(delta.range.end.row, 1);
178
+ } else {
179
+ lines[delta.range.start.row] = undefined;
180
+ states[delta.range.start.row] = undefined;
181
+ }
182
+ }
183
+ }
184
+ session.bgTokenizer.lines = lines;
185
+ session.bgTokenizer.states = states;
186
+ session.bgTokenizer.fireUpdateEvent(firstRow, lastRow);
187
+ });
188
+
189
+ return worker;
190
+ };
191
+
192
+ }).call(Mode.prototype);
193
+
194
+ exports.Mode = Mode;
195
+ });
196
+ define('ace/mode/xquery_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
197
+
198
+
199
+ var oop = require("../lib/oop");
200
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
201
+
202
+ var XQueryHighlightRules = function() {
203
+
204
+ var keywordMapper = this.createKeywordMapper({
205
+ keyword: "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position"
206
+ }, "identifier");
207
+
208
+ this.$rules = {
209
+ start : [ {
210
+ token : "text",
211
+ regex : "<\\!\\[CDATA\\[",
212
+ next : "cdata"
213
+ }, {
214
+ token : "xml-pe",
215
+ regex : "<\\?.*?\\?>"
216
+ }, {
217
+ token : "comment",
218
+ regex : "<\\!--",
219
+ next : "comment"
220
+ }, {
221
+ token : "comment",
222
+ regex : "\\(:",
223
+ next : "comment"
224
+ }, {
225
+ token : "text", // opening tag
226
+ regex : "<\\/?",
227
+ next : "tag"
228
+ }, {
229
+ token : "constant", // number
230
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
231
+ }, {
232
+ token : "variable", // variable
233
+ regex : "\\$[a-zA-Z_][a-zA-Z0-9_\\-:]*\\b"
234
+ }, {
235
+ token: "string",
236
+ regex : '".*?"'
237
+ }, {
238
+ token: "string",
239
+ regex : "'.*?'"
240
+ }, {
241
+ token : "text",
242
+ regex : "\\s+"
243
+ }, {
244
+ token: "support.function",
245
+ regex: "\\w[\\w+_\\-:]+(?=\\()"
246
+ }, {
247
+ token : keywordMapper,
248
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
249
+ }, {
250
+ token: "keyword.operator",
251
+ regex: "\\*|=|<|>|\\-|\\+"
252
+ }, {
253
+ token: "lparen",
254
+ regex: "[[({]"
255
+ }, {
256
+ token: "rparen",
257
+ regex: "[\\])}]"
258
+ } ],
259
+
260
+ tag : [ {
261
+ token : "text",
262
+ regex : ">",
263
+ next : "start"
264
+ }, {
265
+ token : "meta.tag",
266
+ regex : "[-_a-zA-Z0-9:]+"
267
+ }, {
268
+ token : "text",
269
+ regex : "\\s+"
270
+ }, {
271
+ token : "string",
272
+ regex : '".*?"'
273
+ }, {
274
+ token : "string",
275
+ regex : "'.*?'"
276
+ } ],
277
+
278
+ cdata : [ {
279
+ token : "comment",
280
+ regex : "\\]\\]>",
281
+ next : "start"
282
+ }, {
283
+ token : "comment",
284
+ regex : "\\s+"
285
+ }, {
286
+ token : "comment",
287
+ regex : "(?:[^\\]]|\\](?!\\]>))+"
288
+ } ],
289
+
290
+ comment : [ {
291
+ token : "comment",
292
+ regex : ".*?-->",
293
+ next : "start"
294
+ }, {
295
+ token: "comment",
296
+ regex : ".*:\\)",
297
+ next : "start"
298
+ }, {
299
+ token : "comment",
300
+ regex : ".+"
301
+ } ]
302
+ };
303
+ };
304
+
305
+ oop.inherits(XQueryHighlightRules, TextHighlightRules);
306
+
307
+ exports.XQueryHighlightRules = XQueryHighlightRules;
308
+ });
309
+
310
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
311
+
312
+
313
+ var oop = require("../../lib/oop");
314
+ var Behaviour = require("../behaviour").Behaviour;
315
+ var TokenIterator = require("../../token_iterator").TokenIterator;
316
+ var lang = require("../../lib/lang");
317
+
318
+ var SAFE_INSERT_IN_TOKENS =
319
+ ["text", "paren.rparen", "punctuation.operator"];
320
+ var SAFE_INSERT_BEFORE_TOKENS =
321
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
322
+
323
+
324
+ var autoInsertedBrackets = 0;
325
+ var autoInsertedRow = -1;
326
+ var autoInsertedLineEnd = "";
327
+ var maybeInsertedBrackets = 0;
328
+ var maybeInsertedRow = -1;
329
+ var maybeInsertedLineStart = "";
330
+ var maybeInsertedLineEnd = "";
331
+
332
+ var CstyleBehaviour = function () {
333
+
334
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
335
+ var cursor = editor.getCursorPosition();
336
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
337
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
338
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
339
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
340
+ return false;
341
+ }
342
+ iterator.stepForward();
343
+ return iterator.getCurrentTokenRow() !== cursor.row ||
344
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
345
+ };
346
+
347
+ CstyleBehaviour.$matchTokenType = function(token, types) {
348
+ return types.indexOf(token.type || token) > -1;
349
+ };
350
+
351
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
352
+ var cursor = editor.getCursorPosition();
353
+ var line = session.doc.getLine(cursor.row);
354
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
355
+ autoInsertedBrackets = 0;
356
+ autoInsertedRow = cursor.row;
357
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
358
+ autoInsertedBrackets++;
359
+ };
360
+
361
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
362
+ var cursor = editor.getCursorPosition();
363
+ var line = session.doc.getLine(cursor.row);
364
+ if (!this.isMaybeInsertedClosing(cursor, line))
365
+ maybeInsertedBrackets = 0;
366
+ maybeInsertedRow = cursor.row;
367
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
368
+ maybeInsertedLineEnd = line.substr(cursor.column);
369
+ maybeInsertedBrackets++;
370
+ };
371
+
372
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
373
+ return autoInsertedBrackets > 0 &&
374
+ cursor.row === autoInsertedRow &&
375
+ bracket === autoInsertedLineEnd[0] &&
376
+ line.substr(cursor.column) === autoInsertedLineEnd;
377
+ };
378
+
379
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
380
+ return maybeInsertedBrackets > 0 &&
381
+ cursor.row === maybeInsertedRow &&
382
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
383
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
384
+ };
385
+
386
+ CstyleBehaviour.popAutoInsertedClosing = function() {
387
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
388
+ autoInsertedBrackets--;
389
+ };
390
+
391
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
392
+ maybeInsertedBrackets = 0;
393
+ maybeInsertedRow = -1;
394
+ };
395
+
396
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
397
+ var cursor = editor.getCursorPosition();
398
+ var line = session.doc.getLine(cursor.row);
399
+ if (text == '{') {
400
+ var selection = editor.getSelectionRange();
401
+ var selected = session.doc.getTextRange(selection);
402
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
403
+ return {
404
+ text: '{' + selected + '}',
405
+ selection: false
406
+ };
407
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
408
+ if (/[\]\}\)]/.test(line[cursor.column])) {
409
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
410
+ return {
411
+ text: '{}',
412
+ selection: [1, 1]
413
+ };
414
+ } else {
415
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
416
+ return {
417
+ text: '{',
418
+ selection: [1, 1]
419
+ };
420
+ }
421
+ }
422
+ } else if (text == '}') {
423
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
424
+ if (rightChar == '}') {
425
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
426
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
427
+ CstyleBehaviour.popAutoInsertedClosing();
428
+ return {
429
+ text: '',
430
+ selection: [1, 1]
431
+ };
432
+ }
433
+ }
434
+ } else if (text == "\n" || text == "\r\n") {
435
+ var closing = "";
436
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
437
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
438
+ CstyleBehaviour.clearMaybeInsertedClosing();
439
+ }
440
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
441
+ if (rightChar == '}' || closing !== "") {
442
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
443
+ if (!openBracePos)
444
+ return null;
445
+
446
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
447
+ var next_indent = this.$getIndent(line);
448
+
449
+ return {
450
+ text: '\n' + indent + '\n' + next_indent + closing,
451
+ selection: [1, indent.length, 1, indent.length]
452
+ };
453
+ }
454
+ }
455
+ });
456
+
457
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
458
+ var selected = session.doc.getTextRange(range);
459
+ if (!range.isMultiLine() && selected == '{') {
460
+ var line = session.doc.getLine(range.start.row);
461
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
462
+ if (rightChar == '}') {
463
+ range.end.column++;
464
+ return range;
465
+ } else {
466
+ maybeInsertedBrackets--;
467
+ }
468
+ }
469
+ });
470
+
471
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
472
+ if (text == '(') {
473
+ var selection = editor.getSelectionRange();
474
+ var selected = session.doc.getTextRange(selection);
475
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
476
+ return {
477
+ text: '(' + selected + ')',
478
+ selection: false
479
+ };
480
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
481
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
482
+ return {
483
+ text: '()',
484
+ selection: [1, 1]
485
+ };
486
+ }
487
+ } else if (text == ')') {
488
+ var cursor = editor.getCursorPosition();
489
+ var line = session.doc.getLine(cursor.row);
490
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
491
+ if (rightChar == ')') {
492
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
493
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
494
+ CstyleBehaviour.popAutoInsertedClosing();
495
+ return {
496
+ text: '',
497
+ selection: [1, 1]
498
+ };
499
+ }
500
+ }
501
+ }
502
+ });
503
+
504
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
505
+ var selected = session.doc.getTextRange(range);
506
+ if (!range.isMultiLine() && selected == '(') {
507
+ var line = session.doc.getLine(range.start.row);
508
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
509
+ if (rightChar == ')') {
510
+ range.end.column++;
511
+ return range;
512
+ }
513
+ }
514
+ });
515
+
516
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
517
+ if (text == '[') {
518
+ var selection = editor.getSelectionRange();
519
+ var selected = session.doc.getTextRange(selection);
520
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
521
+ return {
522
+ text: '[' + selected + ']',
523
+ selection: false
524
+ };
525
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
526
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
527
+ return {
528
+ text: '[]',
529
+ selection: [1, 1]
530
+ };
531
+ }
532
+ } else if (text == ']') {
533
+ var cursor = editor.getCursorPosition();
534
+ var line = session.doc.getLine(cursor.row);
535
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
536
+ if (rightChar == ']') {
537
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
538
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
539
+ CstyleBehaviour.popAutoInsertedClosing();
540
+ return {
541
+ text: '',
542
+ selection: [1, 1]
543
+ };
544
+ }
545
+ }
546
+ }
547
+ });
548
+
549
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
550
+ var selected = session.doc.getTextRange(range);
551
+ if (!range.isMultiLine() && selected == '[') {
552
+ var line = session.doc.getLine(range.start.row);
553
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
554
+ if (rightChar == ']') {
555
+ range.end.column++;
556
+ return range;
557
+ }
558
+ }
559
+ });
560
+
561
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
562
+ if (text == '"' || text == "'") {
563
+ var quote = text;
564
+ var selection = editor.getSelectionRange();
565
+ var selected = session.doc.getTextRange(selection);
566
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
567
+ return {
568
+ text: quote + selected + quote,
569
+ selection: false
570
+ };
571
+ } else {
572
+ var cursor = editor.getCursorPosition();
573
+ var line = session.doc.getLine(cursor.row);
574
+ var leftChar = line.substring(cursor.column-1, cursor.column);
575
+ if (leftChar == '\\') {
576
+ return null;
577
+ }
578
+ var tokens = session.getTokens(selection.start.row);
579
+ var col = 0, token;
580
+ var quotepos = -1; // Track whether we're inside an open quote.
581
+
582
+ for (var x = 0; x < tokens.length; x++) {
583
+ token = tokens[x];
584
+ if (token.type == "string") {
585
+ quotepos = -1;
586
+ } else if (quotepos < 0) {
587
+ quotepos = token.value.indexOf(quote);
588
+ }
589
+ if ((token.value.length + col) > selection.start.column) {
590
+ break;
591
+ }
592
+ col += tokens[x].value.length;
593
+ }
594
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
595
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
596
+ return;
597
+ return {
598
+ text: quote + quote,
599
+ selection: [1,1]
600
+ };
601
+ } else if (token && token.type === "string") {
602
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
603
+ if (rightChar == quote) {
604
+ return {
605
+ text: '',
606
+ selection: [1, 1]
607
+ };
608
+ }
609
+ }
610
+ }
611
+ }
612
+ });
613
+
614
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
615
+ var selected = session.doc.getTextRange(range);
616
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
617
+ var line = session.doc.getLine(range.start.row);
618
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
619
+ if (rightChar == '"') {
620
+ range.end.column++;
621
+ return range;
622
+ }
623
+ }
624
+ });
625
+
626
+ };
627
+
628
+ oop.inherits(CstyleBehaviour, Behaviour);
629
+
630
+ exports.CstyleBehaviour = CstyleBehaviour;
631
+ });
632
+
633
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
634
+
635
+
636
+ var oop = require("../../lib/oop");
637
+ var Range = require("../../range").Range;
638
+ var BaseFoldMode = require("./fold_mode").FoldMode;
639
+
640
+ var FoldMode = exports.FoldMode = function() {};
641
+ oop.inherits(FoldMode, BaseFoldMode);
642
+
643
+ (function() {
644
+
645
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
646
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
647
+
648
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
649
+ var line = session.getLine(row);
650
+ var match = line.match(this.foldingStartMarker);
651
+ if (match) {
652
+ var i = match.index;
653
+
654
+ if (match[1])
655
+ return this.openingBracketBlock(session, match[1], row, i);
656
+
657
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
658
+ }
659
+
660
+ if (foldStyle !== "markbeginend")
661
+ return;
662
+
663
+ var match = line.match(this.foldingStopMarker);
664
+ if (match) {
665
+ var i = match.index + match[0].length;
666
+
667
+ if (match[1])
668
+ return this.closingBracketBlock(session, match[1], row, i);
669
+
670
+ return session.getCommentFoldRange(row, i, -1);
671
+ }
672
+ };
673
+
674
+ }).call(FoldMode.prototype);
675
+
676
+ });