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,792 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+ define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
32
+
33
+
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
38
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
39
+ var XmlFoldMode = require("./folding/xml").FoldMode;
40
+
41
+ var Mode = function() {
42
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
43
+ this.$behaviour = new XmlBehaviour();
44
+ this.foldingRules = new XmlFoldMode();
45
+ };
46
+
47
+ oop.inherits(Mode, TextMode);
48
+
49
+ (function() {
50
+
51
+ this.getNextLineIndent = function(state, line, tab) {
52
+ return this.$getIndent(line);
53
+ };
54
+
55
+ }).call(Mode.prototype);
56
+
57
+ exports.Mode = Mode;
58
+ });
59
+
60
+ define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
61
+
62
+
63
+ var oop = require("../lib/oop");
64
+ var xmlUtil = require("./xml_util");
65
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
66
+
67
+ var XmlHighlightRules = function() {
68
+ this.$rules = {
69
+ start : [
70
+ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
71
+ {token : "xml-pe", regex : "<\\?.*?\\?>"},
72
+ {token : "comment", regex : "<\\!--", next : "comment"},
73
+ {token : "xml-pe", regex : "<\\!.*?>"},
74
+ {token : "meta.tag", regex : "<\\/?", next : "tag"},
75
+ {token : "text", regex : "\\s+"},
76
+ {
77
+ token : "constant.character.entity",
78
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
79
+ },
80
+ {token : "text", regex : "[^<]+"}
81
+ ],
82
+
83
+ cdata : [
84
+ {token : "text", regex : "\\]\\]>", next : "start"},
85
+ {token : "text", regex : "\\s+"},
86
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
87
+ ],
88
+
89
+ comment : [
90
+ {token : "comment", regex : ".*?-->", next : "start"},
91
+ {token : "comment", regex : ".+"}
92
+ ]
93
+ };
94
+
95
+ xmlUtil.tag(this.$rules, "tag", "start");
96
+ };
97
+
98
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
99
+
100
+ exports.XmlHighlightRules = XmlHighlightRules;
101
+ });
102
+
103
+ define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
104
+
105
+
106
+ function string(state) {
107
+ return [{
108
+ token : "string",
109
+ regex : '"',
110
+ next : state + "_qqstring"
111
+ }, {
112
+ token : "string",
113
+ regex : "'",
114
+ next : state + "_qstring"
115
+ }];
116
+ }
117
+
118
+ function multiLineString(quote, state) {
119
+ return [
120
+ {token : "string", regex : quote, next : state},
121
+ {
122
+ token : "constant.language.escape",
123
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
124
+ },
125
+ {token : "string", regex : '\\w+|.|\\s+'}
126
+ ];
127
+ }
128
+
129
+ exports.tag = function(states, name, nextState, tagMap) {
130
+ states[name] = [{
131
+ token : "text",
132
+ regex : "\\s+"
133
+ }, {
134
+
135
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
136
+ if (tagMap[value])
137
+ return "meta.tag.tag-name." + tagMap[value];
138
+ else
139
+ return "meta.tag.tag-name";
140
+ },
141
+ regex : "[-_a-zA-Z0-9:]+",
142
+ next : name + "_embed_attribute_list"
143
+ }, {
144
+ token: "empty",
145
+ regex: "",
146
+ next : name + "_embed_attribute_list"
147
+ }];
148
+
149
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
150
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
151
+
152
+ states[name + "_embed_attribute_list"] = [{
153
+ token : "meta.tag.r",
154
+ regex : "/?>",
155
+ next : nextState
156
+ }, {
157
+ token : "keyword.operator",
158
+ regex : "="
159
+ }, {
160
+ token : "entity.other.attribute-name",
161
+ regex : "[-_a-zA-Z0-9:]+"
162
+ }, {
163
+ token : "constant.numeric", // float
164
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
165
+ }, {
166
+ token : "text",
167
+ regex : "\\s+"
168
+ }].concat(string(name));
169
+ };
170
+
171
+ });
172
+
173
+ define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
174
+
175
+
176
+ var oop = require("../../lib/oop");
177
+ var Behaviour = require("../behaviour").Behaviour;
178
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
179
+ var TokenIterator = require("../../token_iterator").TokenIterator;
180
+
181
+ function hasType(token, type) {
182
+ var hasType = true;
183
+ var typeList = token.type.split('.');
184
+ var needleList = type.split('.');
185
+ needleList.forEach(function(needle){
186
+ if (typeList.indexOf(needle) == -1) {
187
+ hasType = false;
188
+ return false;
189
+ }
190
+ });
191
+ return hasType;
192
+ }
193
+
194
+ var XmlBehaviour = function () {
195
+
196
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
197
+
198
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
199
+ if (text == '>') {
200
+ var position = editor.getCursorPosition();
201
+ var iterator = new TokenIterator(session, position.row, position.column);
202
+ var token = iterator.getCurrentToken();
203
+ var atCursor = false;
204
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
205
+ do {
206
+ token = iterator.stepBackward();
207
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
208
+ } else {
209
+ atCursor = true;
210
+ }
211
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
212
+ return
213
+ }
214
+ var tag = token.value;
215
+ if (atCursor){
216
+ var tag = tag.substring(0, position.column - token.start);
217
+ }
218
+
219
+ return {
220
+ text: '>' + '</' + tag + '>',
221
+ selection: [1, 1]
222
+ }
223
+ }
224
+ });
225
+
226
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
227
+ if (text == "\n") {
228
+ var cursor = editor.getCursorPosition();
229
+ var line = session.doc.getLine(cursor.row);
230
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
231
+ if (rightChars == '</') {
232
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
233
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
234
+
235
+ return {
236
+ text: '\n' + indent + '\n' + next_indent,
237
+ selection: [1, indent.length, 1, indent.length]
238
+ }
239
+ }
240
+ }
241
+ });
242
+
243
+ }
244
+ oop.inherits(XmlBehaviour, Behaviour);
245
+
246
+ exports.XmlBehaviour = XmlBehaviour;
247
+ });
248
+
249
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
250
+
251
+
252
+ var oop = require("../../lib/oop");
253
+ var Behaviour = require("../behaviour").Behaviour;
254
+ var TokenIterator = require("../../token_iterator").TokenIterator;
255
+ var lang = require("../../lib/lang");
256
+
257
+ var SAFE_INSERT_IN_TOKENS =
258
+ ["text", "paren.rparen", "punctuation.operator"];
259
+ var SAFE_INSERT_BEFORE_TOKENS =
260
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
261
+
262
+
263
+ var autoInsertedBrackets = 0;
264
+ var autoInsertedRow = -1;
265
+ var autoInsertedLineEnd = "";
266
+ var maybeInsertedBrackets = 0;
267
+ var maybeInsertedRow = -1;
268
+ var maybeInsertedLineStart = "";
269
+ var maybeInsertedLineEnd = "";
270
+
271
+ var CstyleBehaviour = function () {
272
+
273
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
274
+ var cursor = editor.getCursorPosition();
275
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
276
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
277
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
278
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
279
+ return false;
280
+ }
281
+ iterator.stepForward();
282
+ return iterator.getCurrentTokenRow() !== cursor.row ||
283
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
284
+ };
285
+
286
+ CstyleBehaviour.$matchTokenType = function(token, types) {
287
+ return types.indexOf(token.type || token) > -1;
288
+ };
289
+
290
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
291
+ var cursor = editor.getCursorPosition();
292
+ var line = session.doc.getLine(cursor.row);
293
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
294
+ autoInsertedBrackets = 0;
295
+ autoInsertedRow = cursor.row;
296
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
297
+ autoInsertedBrackets++;
298
+ };
299
+
300
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
301
+ var cursor = editor.getCursorPosition();
302
+ var line = session.doc.getLine(cursor.row);
303
+ if (!this.isMaybeInsertedClosing(cursor, line))
304
+ maybeInsertedBrackets = 0;
305
+ maybeInsertedRow = cursor.row;
306
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
307
+ maybeInsertedLineEnd = line.substr(cursor.column);
308
+ maybeInsertedBrackets++;
309
+ };
310
+
311
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
312
+ return autoInsertedBrackets > 0 &&
313
+ cursor.row === autoInsertedRow &&
314
+ bracket === autoInsertedLineEnd[0] &&
315
+ line.substr(cursor.column) === autoInsertedLineEnd;
316
+ };
317
+
318
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
319
+ return maybeInsertedBrackets > 0 &&
320
+ cursor.row === maybeInsertedRow &&
321
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
322
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
323
+ };
324
+
325
+ CstyleBehaviour.popAutoInsertedClosing = function() {
326
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
327
+ autoInsertedBrackets--;
328
+ };
329
+
330
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
331
+ maybeInsertedBrackets = 0;
332
+ maybeInsertedRow = -1;
333
+ };
334
+
335
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
336
+ var cursor = editor.getCursorPosition();
337
+ var line = session.doc.getLine(cursor.row);
338
+ if (text == '{') {
339
+ var selection = editor.getSelectionRange();
340
+ var selected = session.doc.getTextRange(selection);
341
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
342
+ return {
343
+ text: '{' + selected + '}',
344
+ selection: false
345
+ };
346
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
347
+ if (/[\]\}\)]/.test(line[cursor.column])) {
348
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
349
+ return {
350
+ text: '{}',
351
+ selection: [1, 1]
352
+ };
353
+ } else {
354
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
355
+ return {
356
+ text: '{',
357
+ selection: [1, 1]
358
+ };
359
+ }
360
+ }
361
+ } else if (text == '}') {
362
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
363
+ if (rightChar == '}') {
364
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
365
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
366
+ CstyleBehaviour.popAutoInsertedClosing();
367
+ return {
368
+ text: '',
369
+ selection: [1, 1]
370
+ };
371
+ }
372
+ }
373
+ } else if (text == "\n" || text == "\r\n") {
374
+ var closing = "";
375
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
376
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
377
+ CstyleBehaviour.clearMaybeInsertedClosing();
378
+ }
379
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
380
+ if (rightChar == '}' || closing !== "") {
381
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
382
+ if (!openBracePos)
383
+ return null;
384
+
385
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
386
+ var next_indent = this.$getIndent(line);
387
+
388
+ return {
389
+ text: '\n' + indent + '\n' + next_indent + closing,
390
+ selection: [1, indent.length, 1, indent.length]
391
+ };
392
+ }
393
+ }
394
+ });
395
+
396
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
397
+ var selected = session.doc.getTextRange(range);
398
+ if (!range.isMultiLine() && selected == '{') {
399
+ var line = session.doc.getLine(range.start.row);
400
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
401
+ if (rightChar == '}') {
402
+ range.end.column++;
403
+ return range;
404
+ } else {
405
+ maybeInsertedBrackets--;
406
+ }
407
+ }
408
+ });
409
+
410
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
411
+ if (text == '(') {
412
+ var selection = editor.getSelectionRange();
413
+ var selected = session.doc.getTextRange(selection);
414
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
415
+ return {
416
+ text: '(' + selected + ')',
417
+ selection: false
418
+ };
419
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
420
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
421
+ return {
422
+ text: '()',
423
+ selection: [1, 1]
424
+ };
425
+ }
426
+ } else if (text == ')') {
427
+ var cursor = editor.getCursorPosition();
428
+ var line = session.doc.getLine(cursor.row);
429
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
430
+ if (rightChar == ')') {
431
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
432
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
433
+ CstyleBehaviour.popAutoInsertedClosing();
434
+ return {
435
+ text: '',
436
+ selection: [1, 1]
437
+ };
438
+ }
439
+ }
440
+ }
441
+ });
442
+
443
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
444
+ var selected = session.doc.getTextRange(range);
445
+ if (!range.isMultiLine() && selected == '(') {
446
+ var line = session.doc.getLine(range.start.row);
447
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
448
+ if (rightChar == ')') {
449
+ range.end.column++;
450
+ return range;
451
+ }
452
+ }
453
+ });
454
+
455
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
456
+ if (text == '[') {
457
+ var selection = editor.getSelectionRange();
458
+ var selected = session.doc.getTextRange(selection);
459
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
460
+ return {
461
+ text: '[' + selected + ']',
462
+ selection: false
463
+ };
464
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
465
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
466
+ return {
467
+ text: '[]',
468
+ selection: [1, 1]
469
+ };
470
+ }
471
+ } else if (text == ']') {
472
+ var cursor = editor.getCursorPosition();
473
+ var line = session.doc.getLine(cursor.row);
474
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
475
+ if (rightChar == ']') {
476
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
477
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
478
+ CstyleBehaviour.popAutoInsertedClosing();
479
+ return {
480
+ text: '',
481
+ selection: [1, 1]
482
+ };
483
+ }
484
+ }
485
+ }
486
+ });
487
+
488
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
489
+ var selected = session.doc.getTextRange(range);
490
+ if (!range.isMultiLine() && selected == '[') {
491
+ var line = session.doc.getLine(range.start.row);
492
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
493
+ if (rightChar == ']') {
494
+ range.end.column++;
495
+ return range;
496
+ }
497
+ }
498
+ });
499
+
500
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
501
+ if (text == '"' || text == "'") {
502
+ var quote = text;
503
+ var selection = editor.getSelectionRange();
504
+ var selected = session.doc.getTextRange(selection);
505
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
506
+ return {
507
+ text: quote + selected + quote,
508
+ selection: false
509
+ };
510
+ } else {
511
+ var cursor = editor.getCursorPosition();
512
+ var line = session.doc.getLine(cursor.row);
513
+ var leftChar = line.substring(cursor.column-1, cursor.column);
514
+ if (leftChar == '\\') {
515
+ return null;
516
+ }
517
+ var tokens = session.getTokens(selection.start.row);
518
+ var col = 0, token;
519
+ var quotepos = -1; // Track whether we're inside an open quote.
520
+
521
+ for (var x = 0; x < tokens.length; x++) {
522
+ token = tokens[x];
523
+ if (token.type == "string") {
524
+ quotepos = -1;
525
+ } else if (quotepos < 0) {
526
+ quotepos = token.value.indexOf(quote);
527
+ }
528
+ if ((token.value.length + col) > selection.start.column) {
529
+ break;
530
+ }
531
+ col += tokens[x].value.length;
532
+ }
533
+ 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)))) {
534
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
535
+ return;
536
+ return {
537
+ text: quote + quote,
538
+ selection: [1,1]
539
+ };
540
+ } else if (token && token.type === "string") {
541
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
542
+ if (rightChar == quote) {
543
+ return {
544
+ text: '',
545
+ selection: [1, 1]
546
+ };
547
+ }
548
+ }
549
+ }
550
+ }
551
+ });
552
+
553
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
554
+ var selected = session.doc.getTextRange(range);
555
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
556
+ var line = session.doc.getLine(range.start.row);
557
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
558
+ if (rightChar == '"') {
559
+ range.end.column++;
560
+ return range;
561
+ }
562
+ }
563
+ });
564
+
565
+ };
566
+
567
+ oop.inherits(CstyleBehaviour, Behaviour);
568
+
569
+ exports.CstyleBehaviour = CstyleBehaviour;
570
+ });
571
+
572
+ define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
573
+
574
+
575
+ var oop = require("../../lib/oop");
576
+ var lang = require("../../lib/lang");
577
+ var Range = require("../../range").Range;
578
+ var BaseFoldMode = require("./fold_mode").FoldMode;
579
+ var TokenIterator = require("../../token_iterator").TokenIterator;
580
+
581
+ var FoldMode = exports.FoldMode = function(voidElements) {
582
+ BaseFoldMode.call(this);
583
+ this.voidElements = voidElements || {};
584
+ };
585
+ oop.inherits(FoldMode, BaseFoldMode);
586
+
587
+ (function() {
588
+
589
+ this.getFoldWidget = function(session, foldStyle, row) {
590
+ var tag = this._getFirstTagInLine(session, row);
591
+
592
+ if (tag.closing)
593
+ return foldStyle == "markbeginend" ? "end" : "";
594
+
595
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
596
+ return "";
597
+
598
+ if (tag.selfClosing)
599
+ return "";
600
+
601
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
602
+ return "";
603
+
604
+ return "start";
605
+ };
606
+
607
+ this._getFirstTagInLine = function(session, row) {
608
+ var tokens = session.getTokens(row);
609
+ var value = "";
610
+ for (var i = 0; i < tokens.length; i++) {
611
+ var token = tokens[i];
612
+ if (token.type.indexOf("meta.tag") === 0)
613
+ value += token.value;
614
+ else
615
+ value += lang.stringRepeat(" ", token.value.length);
616
+ }
617
+
618
+ return this._parseTag(value);
619
+ };
620
+
621
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
622
+ this._parseTag = function(tag) {
623
+
624
+ var match = this.tagRe.exec(tag);
625
+ var column = this.tagRe.lastIndex || 0;
626
+ this.tagRe.lastIndex = 0;
627
+
628
+ return {
629
+ value: tag,
630
+ match: match ? match[2] : "",
631
+ closing: match ? !!match[3] : false,
632
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
633
+ tagName: match ? match[4] : "",
634
+ column: match[1] ? column + match[1].length : column
635
+ };
636
+ };
637
+ this._readTagForward = function(iterator) {
638
+ var token = iterator.getCurrentToken();
639
+ if (!token)
640
+ return null;
641
+
642
+ var value = "";
643
+ var start;
644
+
645
+ do {
646
+ if (token.type.indexOf("meta.tag") === 0) {
647
+ if (!start) {
648
+ var start = {
649
+ row: iterator.getCurrentTokenRow(),
650
+ column: iterator.getCurrentTokenColumn()
651
+ };
652
+ }
653
+ value += token.value;
654
+ if (value.indexOf(">") !== -1) {
655
+ var tag = this._parseTag(value);
656
+ tag.start = start;
657
+ tag.end = {
658
+ row: iterator.getCurrentTokenRow(),
659
+ column: iterator.getCurrentTokenColumn() + token.value.length
660
+ };
661
+ iterator.stepForward();
662
+ return tag;
663
+ }
664
+ }
665
+ } while(token = iterator.stepForward());
666
+
667
+ return null;
668
+ };
669
+
670
+ this._readTagBackward = function(iterator) {
671
+ var token = iterator.getCurrentToken();
672
+ if (!token)
673
+ return null;
674
+
675
+ var value = "";
676
+ var end;
677
+
678
+ do {
679
+ if (token.type.indexOf("meta.tag") === 0) {
680
+ if (!end) {
681
+ end = {
682
+ row: iterator.getCurrentTokenRow(),
683
+ column: iterator.getCurrentTokenColumn() + token.value.length
684
+ };
685
+ }
686
+ value = token.value + value;
687
+ if (value.indexOf("<") !== -1) {
688
+ var tag = this._parseTag(value);
689
+ tag.end = end;
690
+ tag.start = {
691
+ row: iterator.getCurrentTokenRow(),
692
+ column: iterator.getCurrentTokenColumn()
693
+ };
694
+ iterator.stepBackward();
695
+ return tag;
696
+ }
697
+ }
698
+ } while(token = iterator.stepBackward());
699
+
700
+ return null;
701
+ };
702
+
703
+ this._pop = function(stack, tag) {
704
+ while (stack.length) {
705
+
706
+ var top = stack[stack.length-1];
707
+ if (!tag || top.tagName == tag.tagName) {
708
+ return stack.pop();
709
+ }
710
+ else if (this.voidElements[tag.tagName]) {
711
+ return;
712
+ }
713
+ else if (this.voidElements[top.tagName]) {
714
+ stack.pop();
715
+ continue;
716
+ } else {
717
+ return null;
718
+ }
719
+ }
720
+ };
721
+
722
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
723
+ var firstTag = this._getFirstTagInLine(session, row);
724
+
725
+ if (!firstTag.match)
726
+ return null;
727
+
728
+ var isBackward = firstTag.closing || firstTag.selfClosing;
729
+ var stack = [];
730
+ var tag;
731
+
732
+ if (!isBackward) {
733
+ var iterator = new TokenIterator(session, row, firstTag.column);
734
+ var start = {
735
+ row: row,
736
+ column: firstTag.column + firstTag.tagName.length + 2
737
+ };
738
+ while (tag = this._readTagForward(iterator)) {
739
+ if (tag.selfClosing) {
740
+ if (!stack.length) {
741
+ tag.start.column += tag.tagName.length + 2;
742
+ tag.end.column -= 2;
743
+ return Range.fromPoints(tag.start, tag.end);
744
+ } else
745
+ continue;
746
+ }
747
+
748
+ if (tag.closing) {
749
+ this._pop(stack, tag);
750
+ if (stack.length == 0)
751
+ return Range.fromPoints(start, tag.start);
752
+ }
753
+ else {
754
+ stack.push(tag)
755
+ }
756
+ }
757
+ }
758
+ else {
759
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
760
+ var end = {
761
+ row: row,
762
+ column: firstTag.column
763
+ };
764
+
765
+ while (tag = this._readTagBackward(iterator)) {
766
+ if (tag.selfClosing) {
767
+ if (!stack.length) {
768
+ tag.start.column += tag.tagName.length + 2;
769
+ tag.end.column -= 2;
770
+ return Range.fromPoints(tag.start, tag.end);
771
+ } else
772
+ continue;
773
+ }
774
+
775
+ if (!tag.closing) {
776
+ this._pop(stack, tag);
777
+ if (stack.length == 0) {
778
+ tag.start.column += tag.tagName.length + 2;
779
+ return Range.fromPoints(tag.start, end);
780
+ }
781
+ }
782
+ else {
783
+ stack.push(tag)
784
+ }
785
+ }
786
+ }
787
+
788
+ };
789
+
790
+ }).call(FoldMode.prototype);
791
+
792
+ });