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,680 @@
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/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
32
+
33
+
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
38
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
39
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
40
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
41
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
42
+
43
+ var Mode = function() {
44
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
45
+ this.$outdent = new MatchingBraceOutdent();
46
+ this.$behaviour = new CstyleBehaviour();
47
+ this.foldingRules = new CStyleFoldMode();
48
+ };
49
+ oop.inherits(Mode, TextMode);
50
+
51
+ (function() {
52
+
53
+ this.foldingRules = "cStyle";
54
+
55
+ this.getNextLineIndent = function(state, line, tab) {
56
+ var indent = this.$getIndent(line);
57
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
58
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
59
+ return indent;
60
+ }
61
+
62
+ var match = line.match(/^.*\{\s*$/);
63
+ if (match) {
64
+ indent += tab;
65
+ }
66
+
67
+ return indent;
68
+ };
69
+
70
+ this.checkOutdent = function(state, line, input) {
71
+ return this.$outdent.checkOutdent(line, input);
72
+ };
73
+
74
+ this.autoOutdent = function(state, doc, row) {
75
+ this.$outdent.autoOutdent(doc, row);
76
+ };
77
+
78
+ this.createWorker = function(session) {
79
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
80
+ worker.attachToDocument(session.getDocument());
81
+
82
+ worker.on("csslint", function(e) {
83
+ session.setAnnotations(e.data);
84
+ });
85
+
86
+ worker.on("terminate", function() {
87
+ session.clearAnnotations();
88
+ });
89
+
90
+ return worker;
91
+ };
92
+
93
+ }).call(Mode.prototype);
94
+
95
+ exports.Mode = Mode;
96
+
97
+ });
98
+
99
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
100
+
101
+
102
+ var oop = require("../lib/oop");
103
+ var lang = require("../lib/lang");
104
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
105
+ var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
106
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
107
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
108
+ var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
109
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
110
+
111
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
112
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
113
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
114
+
115
+ var CssHighlightRules = function() {
116
+
117
+ var keywordMapper = this.createKeywordMapper({
118
+ "support.function": supportFunction,
119
+ "support.constant": supportConstant,
120
+ "support.type": supportType,
121
+ "support.constant.color": supportConstantColor,
122
+ "support.constant.fonts": supportConstantFonts
123
+ }, "text", true);
124
+
125
+ var base_ruleset = [
126
+ {
127
+ token : "comment", // multi line comment
128
+ regex : "\\/\\*",
129
+ next : "ruleset_comment"
130
+ }, {
131
+ token : "string", // single line
132
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
133
+ }, {
134
+ token : "string", // single line
135
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
136
+ }, {
137
+ token : ["constant.numeric", "keyword"],
138
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
139
+ }, {
140
+ token : "constant.numeric",
141
+ regex : numRe
142
+ }, {
143
+ token : "constant.numeric", // hex6 color
144
+ regex : "#[a-f0-9]{6}"
145
+ }, {
146
+ token : "constant.numeric", // hex3 color
147
+ regex : "#[a-f0-9]{3}"
148
+ }, {
149
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
150
+ regex : pseudoElements
151
+ }, {
152
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
153
+ regex : pseudoClasses
154
+ }, {
155
+ token : keywordMapper,
156
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
157
+ }
158
+ ];
159
+
160
+ var ruleset = lang.copyArray(base_ruleset);
161
+ ruleset.unshift({
162
+ token : "paren.rparen",
163
+ regex : "\\}",
164
+ next: "start"
165
+ });
166
+
167
+ var media_ruleset = lang.copyArray( base_ruleset );
168
+ media_ruleset.unshift({
169
+ token : "paren.rparen",
170
+ regex : "\\}",
171
+ next: "media"
172
+ });
173
+
174
+ var base_comment = [{
175
+ token : "comment", // comment spanning whole line
176
+ regex : ".+"
177
+ }];
178
+
179
+ var comment = lang.copyArray(base_comment);
180
+ comment.unshift({
181
+ token : "comment", // closing comment
182
+ regex : ".*?\\*\\/",
183
+ next : "start"
184
+ });
185
+
186
+ var media_comment = lang.copyArray(base_comment);
187
+ media_comment.unshift({
188
+ token : "comment", // closing comment
189
+ regex : ".*?\\*\\/",
190
+ next : "media"
191
+ });
192
+
193
+ var ruleset_comment = lang.copyArray(base_comment);
194
+ ruleset_comment.unshift({
195
+ token : "comment", // closing comment
196
+ regex : ".*?\\*\\/",
197
+ next : "ruleset"
198
+ });
199
+
200
+ this.$rules = {
201
+ "start" : [{
202
+ token : "comment", // multi line comment
203
+ regex : "\\/\\*",
204
+ next : "comment"
205
+ }, {
206
+ token: "paren.lparen",
207
+ regex: "\\{",
208
+ next: "ruleset"
209
+ }, {
210
+ token: "string",
211
+ regex: "@.*?{",
212
+ next: "media"
213
+ },{
214
+ token: "keyword",
215
+ regex: "#[a-z0-9-_]+"
216
+ },{
217
+ token: "variable",
218
+ regex: "\\.[a-z0-9-_]+"
219
+ },{
220
+ token: "string",
221
+ regex: ":[a-z0-9-_]+"
222
+ },{
223
+ token: "constant",
224
+ regex: "[a-z0-9-_]+"
225
+ }],
226
+
227
+ "media" : [ {
228
+ token : "comment", // multi line comment
229
+ regex : "\\/\\*",
230
+ next : "media_comment"
231
+ }, {
232
+ token: "paren.lparen",
233
+ regex: "\\{",
234
+ next: "media_ruleset"
235
+ },{
236
+ token: "string",
237
+ regex: "\\}",
238
+ next: "start"
239
+ },{
240
+ token: "keyword",
241
+ regex: "#[a-z0-9-_]+"
242
+ },{
243
+ token: "variable",
244
+ regex: "\\.[a-z0-9-_]+"
245
+ },{
246
+ token: "string",
247
+ regex: ":[a-z0-9-_]+"
248
+ },{
249
+ token: "constant",
250
+ regex: "[a-z0-9-_]+"
251
+ }],
252
+
253
+ "comment" : comment,
254
+
255
+ "ruleset" : ruleset,
256
+ "ruleset_comment" : ruleset_comment,
257
+
258
+ "media_ruleset" : media_ruleset,
259
+ "media_comment" : media_comment
260
+ };
261
+ };
262
+
263
+ oop.inherits(CssHighlightRules, TextHighlightRules);
264
+
265
+ exports.CssHighlightRules = CssHighlightRules;
266
+
267
+ });
268
+
269
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
270
+
271
+
272
+ var Range = require("../range").Range;
273
+
274
+ var MatchingBraceOutdent = function() {};
275
+
276
+ (function() {
277
+
278
+ this.checkOutdent = function(line, input) {
279
+ if (! /^\s+$/.test(line))
280
+ return false;
281
+
282
+ return /^\s*\}/.test(input);
283
+ };
284
+
285
+ this.autoOutdent = function(doc, row) {
286
+ var line = doc.getLine(row);
287
+ var match = line.match(/^(\s*\})/);
288
+
289
+ if (!match) return 0;
290
+
291
+ var column = match[1].length;
292
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
293
+
294
+ if (!openBracePos || openBracePos.row == row) return 0;
295
+
296
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
297
+ doc.replace(new Range(row, 0, row, column-1), indent);
298
+ };
299
+
300
+ this.$getIndent = function(line) {
301
+ var match = line.match(/^(\s+)/);
302
+ if (match) {
303
+ return match[1];
304
+ }
305
+
306
+ return "";
307
+ };
308
+
309
+ }).call(MatchingBraceOutdent.prototype);
310
+
311
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
312
+ });
313
+
314
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
315
+
316
+
317
+ var oop = require("../../lib/oop");
318
+ var Behaviour = require("../behaviour").Behaviour;
319
+ var TokenIterator = require("../../token_iterator").TokenIterator;
320
+ var lang = require("../../lib/lang");
321
+
322
+ var SAFE_INSERT_IN_TOKENS =
323
+ ["text", "paren.rparen", "punctuation.operator"];
324
+ var SAFE_INSERT_BEFORE_TOKENS =
325
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
326
+
327
+
328
+ var autoInsertedBrackets = 0;
329
+ var autoInsertedRow = -1;
330
+ var autoInsertedLineEnd = "";
331
+ var maybeInsertedBrackets = 0;
332
+ var maybeInsertedRow = -1;
333
+ var maybeInsertedLineStart = "";
334
+ var maybeInsertedLineEnd = "";
335
+
336
+ var CstyleBehaviour = function () {
337
+
338
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
339
+ var cursor = editor.getCursorPosition();
340
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
341
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
342
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
343
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
344
+ return false;
345
+ }
346
+ iterator.stepForward();
347
+ return iterator.getCurrentTokenRow() !== cursor.row ||
348
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
349
+ };
350
+
351
+ CstyleBehaviour.$matchTokenType = function(token, types) {
352
+ return types.indexOf(token.type || token) > -1;
353
+ };
354
+
355
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
356
+ var cursor = editor.getCursorPosition();
357
+ var line = session.doc.getLine(cursor.row);
358
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
359
+ autoInsertedBrackets = 0;
360
+ autoInsertedRow = cursor.row;
361
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
362
+ autoInsertedBrackets++;
363
+ };
364
+
365
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
366
+ var cursor = editor.getCursorPosition();
367
+ var line = session.doc.getLine(cursor.row);
368
+ if (!this.isMaybeInsertedClosing(cursor, line))
369
+ maybeInsertedBrackets = 0;
370
+ maybeInsertedRow = cursor.row;
371
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
372
+ maybeInsertedLineEnd = line.substr(cursor.column);
373
+ maybeInsertedBrackets++;
374
+ };
375
+
376
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
377
+ return autoInsertedBrackets > 0 &&
378
+ cursor.row === autoInsertedRow &&
379
+ bracket === autoInsertedLineEnd[0] &&
380
+ line.substr(cursor.column) === autoInsertedLineEnd;
381
+ };
382
+
383
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
384
+ return maybeInsertedBrackets > 0 &&
385
+ cursor.row === maybeInsertedRow &&
386
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
387
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
388
+ };
389
+
390
+ CstyleBehaviour.popAutoInsertedClosing = function() {
391
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
392
+ autoInsertedBrackets--;
393
+ };
394
+
395
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
396
+ maybeInsertedBrackets = 0;
397
+ maybeInsertedRow = -1;
398
+ };
399
+
400
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
401
+ var cursor = editor.getCursorPosition();
402
+ var line = session.doc.getLine(cursor.row);
403
+ if (text == '{') {
404
+ var selection = editor.getSelectionRange();
405
+ var selected = session.doc.getTextRange(selection);
406
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
407
+ return {
408
+ text: '{' + selected + '}',
409
+ selection: false
410
+ };
411
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
412
+ if (/[\]\}\)]/.test(line[cursor.column])) {
413
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
414
+ return {
415
+ text: '{}',
416
+ selection: [1, 1]
417
+ };
418
+ } else {
419
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
420
+ return {
421
+ text: '{',
422
+ selection: [1, 1]
423
+ };
424
+ }
425
+ }
426
+ } else if (text == '}') {
427
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
428
+ if (rightChar == '}') {
429
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
430
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
431
+ CstyleBehaviour.popAutoInsertedClosing();
432
+ return {
433
+ text: '',
434
+ selection: [1, 1]
435
+ };
436
+ }
437
+ }
438
+ } else if (text == "\n" || text == "\r\n") {
439
+ var closing = "";
440
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
441
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
442
+ CstyleBehaviour.clearMaybeInsertedClosing();
443
+ }
444
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
445
+ if (rightChar == '}' || closing !== "") {
446
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
447
+ if (!openBracePos)
448
+ return null;
449
+
450
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
451
+ var next_indent = this.$getIndent(line);
452
+
453
+ return {
454
+ text: '\n' + indent + '\n' + next_indent + closing,
455
+ selection: [1, indent.length, 1, indent.length]
456
+ };
457
+ }
458
+ }
459
+ });
460
+
461
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
462
+ var selected = session.doc.getTextRange(range);
463
+ if (!range.isMultiLine() && selected == '{') {
464
+ var line = session.doc.getLine(range.start.row);
465
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
466
+ if (rightChar == '}') {
467
+ range.end.column++;
468
+ return range;
469
+ } else {
470
+ maybeInsertedBrackets--;
471
+ }
472
+ }
473
+ });
474
+
475
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
476
+ if (text == '(') {
477
+ var selection = editor.getSelectionRange();
478
+ var selected = session.doc.getTextRange(selection);
479
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
480
+ return {
481
+ text: '(' + selected + ')',
482
+ selection: false
483
+ };
484
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
485
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
486
+ return {
487
+ text: '()',
488
+ selection: [1, 1]
489
+ };
490
+ }
491
+ } else if (text == ')') {
492
+ var cursor = editor.getCursorPosition();
493
+ var line = session.doc.getLine(cursor.row);
494
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
495
+ if (rightChar == ')') {
496
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
497
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
498
+ CstyleBehaviour.popAutoInsertedClosing();
499
+ return {
500
+ text: '',
501
+ selection: [1, 1]
502
+ };
503
+ }
504
+ }
505
+ }
506
+ });
507
+
508
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
509
+ var selected = session.doc.getTextRange(range);
510
+ if (!range.isMultiLine() && selected == '(') {
511
+ var line = session.doc.getLine(range.start.row);
512
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
513
+ if (rightChar == ')') {
514
+ range.end.column++;
515
+ return range;
516
+ }
517
+ }
518
+ });
519
+
520
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
521
+ if (text == '[') {
522
+ var selection = editor.getSelectionRange();
523
+ var selected = session.doc.getTextRange(selection);
524
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
525
+ return {
526
+ text: '[' + selected + ']',
527
+ selection: false
528
+ };
529
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
530
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
531
+ return {
532
+ text: '[]',
533
+ selection: [1, 1]
534
+ };
535
+ }
536
+ } else if (text == ']') {
537
+ var cursor = editor.getCursorPosition();
538
+ var line = session.doc.getLine(cursor.row);
539
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
540
+ if (rightChar == ']') {
541
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
542
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
543
+ CstyleBehaviour.popAutoInsertedClosing();
544
+ return {
545
+ text: '',
546
+ selection: [1, 1]
547
+ };
548
+ }
549
+ }
550
+ }
551
+ });
552
+
553
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
554
+ var selected = session.doc.getTextRange(range);
555
+ if (!range.isMultiLine() && 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
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
566
+ if (text == '"' || text == "'") {
567
+ var quote = text;
568
+ var selection = editor.getSelectionRange();
569
+ var selected = session.doc.getTextRange(selection);
570
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
571
+ return {
572
+ text: quote + selected + quote,
573
+ selection: false
574
+ };
575
+ } else {
576
+ var cursor = editor.getCursorPosition();
577
+ var line = session.doc.getLine(cursor.row);
578
+ var leftChar = line.substring(cursor.column-1, cursor.column);
579
+ if (leftChar == '\\') {
580
+ return null;
581
+ }
582
+ var tokens = session.getTokens(selection.start.row);
583
+ var col = 0, token;
584
+ var quotepos = -1; // Track whether we're inside an open quote.
585
+
586
+ for (var x = 0; x < tokens.length; x++) {
587
+ token = tokens[x];
588
+ if (token.type == "string") {
589
+ quotepos = -1;
590
+ } else if (quotepos < 0) {
591
+ quotepos = token.value.indexOf(quote);
592
+ }
593
+ if ((token.value.length + col) > selection.start.column) {
594
+ break;
595
+ }
596
+ col += tokens[x].value.length;
597
+ }
598
+ 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)))) {
599
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
600
+ return;
601
+ return {
602
+ text: quote + quote,
603
+ selection: [1,1]
604
+ };
605
+ } else if (token && token.type === "string") {
606
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
607
+ if (rightChar == quote) {
608
+ return {
609
+ text: '',
610
+ selection: [1, 1]
611
+ };
612
+ }
613
+ }
614
+ }
615
+ }
616
+ });
617
+
618
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
619
+ var selected = session.doc.getTextRange(range);
620
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
621
+ var line = session.doc.getLine(range.start.row);
622
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
623
+ if (rightChar == '"') {
624
+ range.end.column++;
625
+ return range;
626
+ }
627
+ }
628
+ });
629
+
630
+ };
631
+
632
+ oop.inherits(CstyleBehaviour, Behaviour);
633
+
634
+ exports.CstyleBehaviour = CstyleBehaviour;
635
+ });
636
+
637
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
638
+
639
+
640
+ var oop = require("../../lib/oop");
641
+ var Range = require("../../range").Range;
642
+ var BaseFoldMode = require("./fold_mode").FoldMode;
643
+
644
+ var FoldMode = exports.FoldMode = function() {};
645
+ oop.inherits(FoldMode, BaseFoldMode);
646
+
647
+ (function() {
648
+
649
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
650
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
651
+
652
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
653
+ var line = session.getLine(row);
654
+ var match = line.match(this.foldingStartMarker);
655
+ if (match) {
656
+ var i = match.index;
657
+
658
+ if (match[1])
659
+ return this.openingBracketBlock(session, match[1], row, i);
660
+
661
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
662
+ }
663
+
664
+ if (foldStyle !== "markbeginend")
665
+ return;
666
+
667
+ var match = line.match(this.foldingStopMarker);
668
+ if (match) {
669
+ var i = match.index + match[0].length;
670
+
671
+ if (match[1])
672
+ return this.closingBracketBlock(session, match[1], row, i);
673
+
674
+ return session.getCommentFoldRange(row, i, -1);
675
+ }
676
+ };
677
+
678
+ }).call(FoldMode.prototype);
679
+
680
+ });