jquery-ace-rails 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. data/lib/jquery-ace-rails/version.rb +1 -1
  2. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ace.js +0 -0
  3. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ext-static_highlight.js +0 -0
  4. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ext-textarea.js +0 -0
  5. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/keybinding-emacs.js +0 -0
  6. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/keybinding-vim.js +0 -0
  7. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-abap.js +0 -0
  8. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-asciidoc.js +0 -0
  9. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-c9search.js +0 -0
  10. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-c_cpp.js +0 -0
  11. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-clojure.js +0 -0
  12. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-coffee.js +0 -0
  13. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-coldfusion.js +0 -0
  14. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-csharp.js +0 -0
  15. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-css.js +0 -0
  16. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-dart.js +0 -0
  17. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-diff.js +0 -0
  18. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-dot.js +0 -0
  19. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-glsl.js +0 -0
  20. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-golang.js +0 -0
  21. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-groovy.js +0 -0
  22. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-haml.js +0 -0
  23. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-haxe.js +0 -0
  24. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-html.js +0 -0
  25. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jade.js +0 -0
  26. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-java.js +0 -0
  27. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-javascript.js +0 -0
  28. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-json.js +0 -0
  29. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jsp.js +0 -0
  30. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jsx.js +0 -0
  31. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-latex.js +0 -0
  32. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-less.js +0 -0
  33. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-liquid.js +0 -0
  34. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lisp.js +0 -0
  35. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lua.js +0 -0
  36. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-luapage.js +0 -0
  37. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lucene.js +0 -0
  38. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-makefile.js +0 -0
  39. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-markdown.js +0 -0
  40. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-objectivec.js +0 -0
  41. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-ocaml.js +0 -0
  42. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-perl.js +0 -0
  43. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-pgsql.js +0 -0
  44. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-php.js +0 -0
  45. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-powershell.js +0 -0
  46. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-python.js +0 -0
  47. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-r.js +0 -0
  48. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-rdoc.js +0 -0
  49. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-rhtml.js +0 -0
  50. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-ruby.js +0 -0
  51. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scad.js +0 -0
  52. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scala.js +0 -0
  53. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scss.js +0 -0
  54. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-sh.js +0 -0
  55. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-sql.js +0 -0
  56. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-stylus.js +0 -0
  57. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-svg.js +0 -0
  58. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-tcl.js +0 -0
  59. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-tex.js +0 -0
  60. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-text.js +0 -0
  61. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-textile.js +0 -0
  62. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-typescript.js +0 -0
  63. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-xml.js +0 -0
  64. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-xquery.js +0 -0
  65. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-yaml.js +0 -0
  66. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-ambiance.js +0 -0
  67. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-chaos.js +0 -0
  68. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-chrome.js +0 -0
  69. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-clouds.js +0 -0
  70. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-clouds_midnight.js +0 -0
  71. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-cobalt.js +0 -0
  72. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-crimson_editor.js +0 -0
  73. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-dawn.js +0 -0
  74. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-dreamweaver.js +0 -0
  75. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-eclipse.js +0 -0
  76. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-github.js +0 -0
  77. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-idle_fingers.js +0 -0
  78. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-kr.js +0 -0
  79. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-merbivore.js +0 -0
  80. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-merbivore_soft.js +0 -0
  81. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-mono_industrial.js +0 -0
  82. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-monokai.js +0 -0
  83. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-pastel_on_dark.js +0 -0
  84. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-solarized_dark.js +0 -0
  85. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-solarized_light.js +0 -0
  86. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-textmate.js +0 -0
  87. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow.js +0 -0
  88. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night.js +0 -0
  89. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_blue.js +0 -0
  90. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_bright.js +0 -0
  91. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_eighties.js +0 -0
  92. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-twilight.js +0 -0
  93. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-vibrant_ink.js +0 -0
  94. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-xcode.js +0 -0
  95. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-coffee.js +0 -0
  96. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-css.js +0 -0
  97. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-javascript.js +0 -0
  98. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-json.js +0 -0
  99. data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-xquery.js +0 -0
  100. data/vendor/assets/javascripts/{jquery-ace/jquery-ace.coffee → jquery-ace.coffee} +1 -1
  101. data/vendor/assets/javascripts/{jquery-ace/jquery-ace.js → jquery-ace.js} +1 -1
  102. data/vendor/assets/javascripts/{jquery-ace/jquery-ace.min.js → jquery-ace.min.js} +1 -1
  103. data/vendor/assets/javascripts/{jquery-ace/vendor → jquery}/jquery-1.8.3.min.js +0 -0
  104. metadata +104 -202
  105. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +0 -14262
  106. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +0 -96
  107. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +0 -591
  108. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +0 -364
  109. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +0 -1646
  110. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +0 -259
  111. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +0 -372
  112. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +0 -187
  113. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +0 -765
  114. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +0 -325
  115. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +0 -520
  116. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +0 -1725
  117. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +0 -605
  118. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +0 -680
  119. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +0 -279
  120. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +0 -163
  121. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +0 -348
  122. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +0 -838
  123. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +0 -660
  124. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +0 -1082
  125. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +0 -440
  126. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +0 -610
  127. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +0 -1850
  128. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +0 -2035
  129. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +0 -1041
  130. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +0 -921
  131. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +0 -574
  132. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +0 -1371
  133. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +0 -635
  134. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +0 -217
  135. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +0 -394
  136. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +0 -921
  137. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +0 -142
  138. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +0 -609
  139. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +0 -2463
  140. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +0 -64
  141. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +0 -314
  142. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +0 -2228
  143. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +0 -655
  144. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +0 -448
  145. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +0 -319
  146. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +0 -928
  147. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +0 -2299
  148. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +0 -611
  149. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +0 -290
  150. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +0 -410
  151. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +0 -189
  152. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +0 -2138
  153. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +0 -410
  154. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +0 -698
  155. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +0 -1070
  156. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +0 -416
  157. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +0 -232
  158. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +0 -145
  159. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +0 -474
  160. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +0 -1490
  161. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +0 -342
  162. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +0 -171
  163. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
  164. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +0 -175
  165. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +0 -1011
  166. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +0 -792
  167. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +0 -676
  168. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +0 -298
  169. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +0 -202
  170. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +0 -167
  171. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +0 -161
  172. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +0 -135
  173. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +0 -136
  174. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +0 -150
  175. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +0 -154
  176. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +0 -146
  177. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +0 -173
  178. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +0 -122
  179. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +0 -136
  180. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +0 -136
  181. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +0 -143
  182. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +0 -135
  183. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +0 -136
  184. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +0 -148
  185. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +0 -140
  186. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +0 -148
  187. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +0 -128
  188. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +0 -131
  189. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +0 -163
  190. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +0 -147
  191. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +0 -147
  192. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +0 -145
  193. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +0 -147
  194. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +0 -144
  195. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +0 -147
  196. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +0 -131
  197. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +0 -125
  198. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +0 -6985
  199. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +0 -7741
  200. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +0 -6387
  201. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +0 -2228
  202. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +0 -21719
@@ -1,64 +0,0 @@
1
- define('ace/mode/lucene', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lucene_highlight_rules'], function(require, exports, module) {
2
-
3
-
4
- var oop = require("../lib/oop");
5
- var TextMode = require("./text").Mode;
6
- var Tokenizer = require("../tokenizer").Tokenizer;
7
- var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
8
-
9
- var Mode = function() {
10
- this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules());
11
- };
12
-
13
- oop.inherits(Mode, TextMode);
14
-
15
- exports.Mode = Mode;
16
- });define('ace/mode/lucene_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
17
-
18
-
19
- var oop = require("../lib/oop");
20
- var lang = require("../lib/lang");
21
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
22
-
23
- var LuceneHighlightRules = function() {
24
- this.$rules = {
25
- "start" : [
26
- {
27
- token : "constant.character.negation",
28
- regex : "[\\-]"
29
- }, {
30
- token : "constant.character.interro",
31
- regex : "[\\?]"
32
- }, {
33
- token : "constant.character.asterisk",
34
- regex : "[\\*]"
35
- }, {
36
- token: 'constant.character.proximity',
37
- regex: '~[0-9]+\\b'
38
- }, {
39
- token : 'keyword.operator',
40
- regex: '(?:AND|OR|NOT)\\b'
41
- }, {
42
- token : "paren.lparen",
43
- regex : "[\\(]"
44
- }, {
45
- token : "paren.rparen",
46
- regex : "[\\)]"
47
- }, {
48
- token : "keyword",
49
- regex : "[\\S]+:"
50
- }, {
51
- token : "string", // " string
52
- regex : '".*?"'
53
- }, {
54
- token : "text",
55
- regex : "\\s+"
56
- }
57
- ]
58
- };
59
- };
60
-
61
- oop.inherits(LuceneHighlightRules, TextHighlightRules);
62
-
63
- exports.LuceneHighlightRules = LuceneHighlightRules;
64
- });
@@ -1,314 +0,0 @@
1
- /* ***** BEGIN LICENSE BLOCK *****
2
- * Distributed under the BSD license:
3
- *
4
- * Copyright (c) 2012, Ajax.org B.V.
5
- * All rights reserved.
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- * * Redistributions of source code must retain the above copyright
10
- * notice, this list of conditions and the following disclaimer.
11
- * * Redistributions in binary form must reproduce the above copyright
12
- * notice, this list of conditions and the following disclaimer in the
13
- * documentation and/or other materials provided with the distribution.
14
- * * Neither the name of Ajax.org B.V. nor the
15
- * names of its contributors may be used to endorse or promote products
16
- * derived from this software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *
29
- *
30
- * Contributor(s):
31
- *
32
- *
33
- *
34
- * ***** END LICENSE BLOCK ***** */
35
-
36
- define('ace/mode/makefile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/makefile_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
37
-
38
-
39
- var oop = require("../lib/oop");
40
- var TextMode = require("./text").Mode;
41
- var Tokenizer = require("../tokenizer").Tokenizer;
42
- var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
43
- var FoldMode = require("./folding/coffee").FoldMode;
44
-
45
- var Mode = function() {
46
- var highlighter = new MakefileHighlightRules();
47
- this.foldingRules = new FoldMode();
48
-
49
- this.$tokenizer = new Tokenizer(highlighter.getRules());
50
- };
51
- oop.inherits(Mode, TextMode);
52
-
53
- (function() {
54
- }).call(Mode.prototype);
55
-
56
- exports.Mode = Mode;
57
- });define('ace/mode/makefile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/sh_highlight_rules'], function(require, exports, module) {
58
-
59
-
60
- var oop = require("../lib/oop");
61
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
62
-
63
- var ShHighlightFile = require("./sh_highlight_rules");
64
-
65
- var MakefileHighlightRules = function() {
66
-
67
- var keywordMapper = this.createKeywordMapper({
68
- "keyword": ShHighlightFile.reservedKeywords,
69
- "support.function.builtin": ShHighlightFile.languageConstructs,
70
- "invalid.deprecated": "debugger"
71
- }, "string");
72
-
73
- this.$rules =
74
- {
75
- "start": [
76
- {
77
- "token": "string.interpolated.backtick.makefile",
78
- "regex": "`",
79
- "next": "shell-start"
80
- },
81
- {
82
- "token": "punctuation.definition.comment.makefile",
83
- "regex": /#(?=.)/,
84
- "next": "comment"
85
- },
86
- {
87
- "token": [ "keyword.control.makefile"],
88
- "regex": "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"
89
- },
90
- {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*
91
- "token": ["entity.name.function.makefile", "text"],
92
- "regex": "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"
93
- }
94
- ],
95
- "comment": [
96
- {
97
- "token" : "punctuation.definition.comment.makefile",
98
- "regex" : /.+\\/
99
- },
100
- {
101
- "token" : "punctuation.definition.comment.makefile",
102
- "regex" : ".+",
103
- "next" : "start"
104
- }
105
- ],
106
- "shell-start": [
107
- {
108
- "token": keywordMapper,
109
- "regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
110
- },
111
- {
112
- "token": "string",
113
- "regex" : "\\w+"
114
- },
115
- {
116
- "token" : "string.interpolated.backtick.makefile",
117
- "regex" : "`",
118
- "next" : "start"
119
- }
120
- ]
121
- }
122
-
123
- };
124
-
125
- oop.inherits(MakefileHighlightRules, TextHighlightRules);
126
-
127
- exports.MakefileHighlightRules = MakefileHighlightRules;
128
- });
129
-
130
- define('ace/mode/sh_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
131
-
132
-
133
- var oop = require("../lib/oop");
134
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
135
-
136
- var reservedKeywords = exports.reservedKeywords = (
137
- '!|{|}|case|do|done|elif|else|'+
138
- 'esac|fi|for|if|in|then|until|while|'+
139
- '&|;|export|local|read|typeset|unset|'+
140
- 'elif|select|set'
141
- );
142
-
143
- var languageConstructs = exports.languageConstructs = (
144
- '[|]|alias|bg|bind|break|builtin|'+
145
- 'cd|command|compgen|complete|continue|'+
146
- 'dirs|disown|echo|enable|eval|exec|'+
147
- 'exit|fc|fg|getopts|hash|help|history|'+
148
- 'jobs|kill|let|logout|popd|printf|pushd|'+
149
- 'pwd|return|set|shift|shopt|source|'+
150
- 'suspend|test|times|trap|type|ulimit|'+
151
- 'umask|unalias|wait'
152
- );
153
-
154
- var ShHighlightRules = function() {
155
- var keywordMapper = this.createKeywordMapper({
156
- "keyword": reservedKeywords,
157
- "support.function.builtin": languageConstructs,
158
- "invalid.deprecated": "debugger"
159
- }, "identifier");
160
-
161
- var integer = "(?:(?:[1-9]\\d*)|(?:0))";
162
-
163
- var fraction = "(?:\\.\\d+)";
164
- var intPart = "(?:\\d+)";
165
- var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
166
- var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
167
- var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
168
- var fileDescriptor = "(?:&" + intPart + ")";
169
-
170
- var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
171
- var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
172
-
173
- var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
174
-
175
- var func = "(?:" + variableName + "\\s*\\(\\))";
176
-
177
- this.$rules = {
178
- "start" : [ {
179
- token : "comment",
180
- regex : "#.*$"
181
- }, {
182
- token : "string", // " string
183
- regex : '"(?:[^\\\\]|\\\\.)*?"'
184
- }, {
185
- token : "variable.language",
186
- regex : builtinVariable
187
- }, {
188
- token : "variable",
189
- regex : variable
190
- }, {
191
- token : "support.function",
192
- regex : func
193
- }, {
194
- token : "support.function",
195
- regex : fileDescriptor
196
- }, {
197
- token : "string", // ' string
198
- regex : "'(?:[^\\\\]|\\\\.)*?'"
199
- }, {
200
- token : "constant.numeric", // float
201
- regex : floatNumber
202
- }, {
203
- token : "constant.numeric", // integer
204
- regex : integer + "\\b"
205
- }, {
206
- token : keywordMapper,
207
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
208
- }, {
209
- token : "keyword.operator",
210
- regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
211
- }, {
212
- token : "paren.lparen",
213
- regex : "[\\[\\(\\{]"
214
- }, {
215
- token : "paren.rparen",
216
- regex : "[\\]\\)\\}]"
217
- }, {
218
- token : "text",
219
- regex : "\\s+"
220
- } ]
221
- };
222
- };
223
-
224
- oop.inherits(ShHighlightRules, TextHighlightRules);
225
-
226
- exports.ShHighlightRules = ShHighlightRules;
227
- });
228
-
229
- define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
230
-
231
-
232
- var oop = require("../../lib/oop");
233
- var BaseFoldMode = require("./fold_mode").FoldMode;
234
- var Range = require("../../range").Range;
235
-
236
- var FoldMode = exports.FoldMode = function() {};
237
- oop.inherits(FoldMode, BaseFoldMode);
238
-
239
- (function() {
240
-
241
- this.getFoldWidgetRange = function(session, foldStyle, row) {
242
- var range = this.indentationBlock(session, row);
243
- if (range)
244
- return range;
245
-
246
- var re = /\S/;
247
- var line = session.getLine(row);
248
- var startLevel = line.search(re);
249
- if (startLevel == -1 || line[startLevel] != "#")
250
- return;
251
-
252
- var startColumn = line.length;
253
- var maxRow = session.getLength();
254
- var startRow = row;
255
- var endRow = row;
256
-
257
- while (++row < maxRow) {
258
- line = session.getLine(row);
259
- var level = line.search(re);
260
-
261
- if (level == -1)
262
- continue;
263
-
264
- if (line[level] != "#")
265
- break;
266
-
267
- endRow = row;
268
- }
269
-
270
- if (endRow > startRow) {
271
- var endColumn = session.getLine(endRow).length;
272
- return new Range(startRow, startColumn, endRow, endColumn);
273
- }
274
- };
275
- this.getFoldWidget = function(session, foldStyle, row) {
276
- var line = session.getLine(row);
277
- var indent = line.search(/\S/);
278
- var next = session.getLine(row + 1);
279
- var prev = session.getLine(row - 1);
280
- var prevIndent = prev.search(/\S/);
281
- var nextIndent = next.search(/\S/);
282
-
283
- if (indent == -1) {
284
- session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
285
- return "";
286
- }
287
- if (prevIndent == -1) {
288
- if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
289
- session.foldWidgets[row - 1] = "";
290
- session.foldWidgets[row + 1] = "";
291
- return "start";
292
- }
293
- } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
294
- if (session.getLine(row - 2).search(/\S/) == -1) {
295
- session.foldWidgets[row - 1] = "start";
296
- session.foldWidgets[row + 1] = "";
297
- return "";
298
- }
299
- }
300
-
301
- if (prevIndent!= -1 && prevIndent < indent)
302
- session.foldWidgets[row - 1] = "start";
303
- else
304
- session.foldWidgets[row - 1] = "";
305
-
306
- if (indent < nextIndent)
307
- return "start";
308
- else
309
- return "";
310
- };
311
-
312
- }).call(FoldMode.prototype);
313
-
314
- });
@@ -1,2228 +0,0 @@
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/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules', 'ace/mode/folding/markdown'], function(require, exports, module) {
32
-
33
-
34
- var oop = require("../lib/oop");
35
- var TextMode = require("./text").Mode;
36
- var JavaScriptMode = require("./javascript").Mode;
37
- var XmlMode = require("./xml").Mode;
38
- var HtmlMode = require("./html").Mode;
39
- var Tokenizer = require("../tokenizer").Tokenizer;
40
- var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
41
- var MarkdownFoldMode = require("./folding/markdown").FoldMode;
42
-
43
- var Mode = function() {
44
- var highlighter = new MarkdownHighlightRules();
45
-
46
- this.$tokenizer = new Tokenizer(highlighter.getRules());
47
- this.$embeds = highlighter.getEmbeds();
48
- this.createModeDelegates({
49
- "js-": JavaScriptMode,
50
- "xml-": XmlMode,
51
- "html-": HtmlMode
52
- });
53
-
54
- this.foldingRules = new MarkdownFoldMode();
55
- };
56
- oop.inherits(Mode, TextMode);
57
-
58
- (function() {
59
- this.getNextLineIndent = function(state, line, tab) {
60
- if (state == "listblock") {
61
- var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
62
- if (!match)
63
- return "";
64
- var marker = match[2];
65
- if (!marker)
66
- marker = parseInt(match[3], 10) + 1 + ".";
67
- return match[1] + marker + match[4];
68
- } else {
69
- return this.$getIndent(line);
70
- }
71
- };
72
- }).call(Mode.prototype);
73
-
74
- exports.Mode = Mode;
75
- });
76
-
77
- define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
78
-
79
-
80
- var oop = require("../lib/oop");
81
- var TextMode = require("./text").Mode;
82
- var Tokenizer = require("../tokenizer").Tokenizer;
83
- var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
84
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
85
- var Range = require("../range").Range;
86
- var WorkerClient = require("../worker/worker_client").WorkerClient;
87
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
88
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
89
-
90
- var Mode = function() {
91
- this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
92
- this.$outdent = new MatchingBraceOutdent();
93
- this.$behaviour = new CstyleBehaviour();
94
- this.foldingRules = new CStyleFoldMode();
95
- };
96
- oop.inherits(Mode, TextMode);
97
-
98
- (function() {
99
-
100
-
101
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
102
- var outdent = true;
103
- var re = /^(\s*)\/\//;
104
-
105
- for (var i=startRow; i<= endRow; i++) {
106
- if (!re.test(doc.getLine(i))) {
107
- outdent = false;
108
- break;
109
- }
110
- }
111
-
112
- if (outdent) {
113
- var deleteRange = new Range(0, 0, 0, 0);
114
- for (var i=startRow; i<= endRow; i++)
115
- {
116
- var line = doc.getLine(i);
117
- var m = line.match(re);
118
- deleteRange.start.row = i;
119
- deleteRange.end.row = i;
120
- deleteRange.end.column = m[0].length;
121
- doc.replace(deleteRange, m[1]);
122
- }
123
- }
124
- else {
125
- doc.indentRows(startRow, endRow, "//");
126
- }
127
- };
128
-
129
- this.getNextLineIndent = function(state, line, tab) {
130
- var indent = this.$getIndent(line);
131
-
132
- var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
133
- var tokens = tokenizedLine.tokens;
134
- var endState = tokenizedLine.state;
135
-
136
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
137
- return indent;
138
- }
139
-
140
- if (state == "start" || state == "regex_allowed") {
141
- var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
142
- if (match) {
143
- indent += tab;
144
- }
145
- } else if (state == "doc-start") {
146
- if (endState == "start" || state == "regex_allowed") {
147
- return "";
148
- }
149
- var match = line.match(/^\s*(\/?)\*/);
150
- if (match) {
151
- if (match[1]) {
152
- indent += " ";
153
- }
154
- indent += "* ";
155
- }
156
- }
157
-
158
- return indent;
159
- };
160
-
161
- this.checkOutdent = function(state, line, input) {
162
- return this.$outdent.checkOutdent(line, input);
163
- };
164
-
165
- this.autoOutdent = function(state, doc, row) {
166
- this.$outdent.autoOutdent(doc, row);
167
- };
168
-
169
- this.createWorker = function(session) {
170
- var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
171
- worker.attachToDocument(session.getDocument());
172
-
173
- worker.on("jslint", function(results) {
174
- session.setAnnotations(results.data);
175
- });
176
-
177
- worker.on("terminate", function() {
178
- session.clearAnnotations();
179
- });
180
-
181
- return worker;
182
- };
183
-
184
- }).call(Mode.prototype);
185
-
186
- exports.Mode = Mode;
187
- });
188
-
189
- define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
190
-
191
-
192
- var oop = require("../lib/oop");
193
- var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
194
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
195
-
196
- var JavaScriptHighlightRules = function() {
197
- var keywordMapper = this.createKeywordMapper({
198
- "variable.language":
199
- "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
200
- "Namespace|QName|XML|XMLList|" + // E4X
201
- "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
202
- "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
203
- "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
204
- "SyntaxError|TypeError|URIError|" +
205
- "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
206
- "isNaN|parseFloat|parseInt|" +
207
- "JSON|Math|" + // Other
208
- "this|arguments|prototype|window|document" , // Pseudo
209
- "keyword":
210
- "const|yield|import|get|set|" +
211
- "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
212
- "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
213
- "__parent__|__count__|escape|unescape|with|__proto__|" +
214
- "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
215
- "storage.type":
216
- "const|let|var|function",
217
- "constant.language":
218
- "null|Infinity|NaN|undefined",
219
- "support.function":
220
- "alert"
221
- }, "identifier");
222
- var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
223
- var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
224
-
225
- var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
226
- "u[0-9a-fA-F]{4}|" + // unicode
227
- "[0-2][0-7]{0,2}|" + // oct
228
- "3[0-6][0-7]?|" + // oct
229
- "37[0-7]?|" + // oct
230
- "[4-7][0-7]?|" + //oct
231
- ".)";
232
-
233
- this.$rules = {
234
- "start" : [
235
- {
236
- token : "comment",
237
- regex : /\/\/.*$/
238
- },
239
- DocCommentHighlightRules.getStartRule("doc-start"),
240
- {
241
- token : "comment", // multi line comment
242
- regex : /\/\*/,
243
- next : "comment"
244
- }, {
245
- token : "string",
246
- regex : "'(?=.)",
247
- next : "qstring"
248
- }, {
249
- token : "string",
250
- regex : '"(?=.)',
251
- next : "qqstring"
252
- }, {
253
- token : "constant.numeric", // hex
254
- regex : /0[xX][0-9a-fA-F]+\b/
255
- }, {
256
- token : "constant.numeric", // float
257
- regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
258
- }, {
259
- token : [
260
- "storage.type", "punctuation.operator", "support.function",
261
- "punctuation.operator", "entity.name.function", "text","keyword.operator"
262
- ],
263
- regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
264
- next: "function_arguments"
265
- }, {
266
- token : [
267
- "storage.type", "punctuation.operator", "entity.name.function", "text",
268
- "keyword.operator", "text", "storage.type", "text", "paren.lparen"
269
- ],
270
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
271
- next: "function_arguments"
272
- }, {
273
- token : [
274
- "entity.name.function", "text", "keyword.operator", "text", "storage.type",
275
- "text", "paren.lparen"
276
- ],
277
- regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
278
- next: "function_arguments"
279
- }, {
280
- token : [
281
- "storage.type", "punctuation.operator", "entity.name.function", "text",
282
- "keyword.operator", "text",
283
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
284
- ],
285
- regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
286
- next: "function_arguments"
287
- }, {
288
- token : [
289
- "storage.type", "text", "entity.name.function", "text", "paren.lparen"
290
- ],
291
- regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
292
- next: "function_arguments"
293
- }, {
294
- token : [
295
- "entity.name.function", "text", "punctuation.operator",
296
- "text", "storage.type", "text", "paren.lparen"
297
- ],
298
- regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
299
- next: "function_arguments"
300
- }, {
301
- token : [
302
- "text", "text", "storage.type", "text", "paren.lparen"
303
- ],
304
- regex : "(:)(\\s*)(function)(\\s*)(\\()",
305
- next: "function_arguments"
306
- }, {
307
- token : "constant.language.boolean",
308
- regex : /(?:true|false)\b/
309
- }, {
310
- token : "keyword",
311
- regex : "(?:" + kwBeforeRe + ")\\b",
312
- next : "regex_allowed"
313
- }, {
314
- token : ["punctuation.operator", "support.function"],
315
- regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
316
- }, {
317
- token : ["punctuation.operator", "support.function.dom"],
318
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
319
- }, {
320
- token : ["punctuation.operator", "support.constant"],
321
- regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
322
- }, {
323
- token : ["storage.type", "punctuation.operator", "support.function.firebug"],
324
- regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
325
- }, {
326
- token : keywordMapper,
327
- regex : identifierRe
328
- }, {
329
- token : "keyword.operator",
330
- regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
331
- next : "regex_allowed"
332
- }, {
333
- token : "punctuation.operator",
334
- regex : /\?|\:|\,|\;|\./,
335
- next : "regex_allowed"
336
- }, {
337
- token : "paren.lparen",
338
- regex : /[\[({]/,
339
- next : "regex_allowed"
340
- }, {
341
- token : "paren.rparen",
342
- regex : /[\])}]/
343
- }, {
344
- token : "keyword.operator",
345
- regex : /\/=?/,
346
- next : "regex_allowed"
347
- }, {
348
- token: "comment",
349
- regex: /^#!.*$/
350
- }, {
351
- token : "text",
352
- regex : /\s+/
353
- }
354
- ],
355
- "regex_allowed": [
356
- DocCommentHighlightRules.getStartRule("doc-start"),
357
- {
358
- token : "comment", // multi line comment
359
- regex : "\\/\\*",
360
- next : "comment_regex_allowed"
361
- }, {
362
- token : "comment",
363
- regex : "\\/\\/.*$"
364
- }, {
365
- token: "string.regexp",
366
- regex: "\\/",
367
- next: "regex",
368
- }, {
369
- token : "text",
370
- regex : "\\s+"
371
- }, {
372
- token: "empty",
373
- regex: "",
374
- next: "start"
375
- }
376
- ],
377
- "regex": [
378
- {
379
- token: "regexp.keyword.operator",
380
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
381
- }, {
382
- token: "string.regexp",
383
- regex: "/\\w*",
384
- next: "start",
385
- }, {
386
- token : "invalid",
387
- regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
388
- }, {
389
- token : "constant.language.escape",
390
- regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
391
- }, {
392
- token: "string.regexp",
393
- regex: /{|[^{\[\/\\(|)$^+*?]+/,
394
- }, {
395
- token: "constant.language.escape",
396
- regex: /\[\^?/,
397
- next: "regex_character_class",
398
- }, {
399
- token: "empty",
400
- regex: "",
401
- next: "start"
402
- }
403
- ],
404
- "regex_character_class": [
405
- {
406
- token: "regexp.keyword.operator",
407
- regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
408
- }, {
409
- token: "constant.language.escape",
410
- regex: "]",
411
- next: "regex",
412
- }, {
413
- token: "constant.language.escape",
414
- regex: "-"
415
- }, {
416
- token: "string.regexp.charachterclass",
417
- regex: /[^\]\-\\]+/,
418
- }, {
419
- token: "empty",
420
- regex: "",
421
- next: "start"
422
- }
423
- ],
424
- "function_arguments": [
425
- {
426
- token: "variable.parameter",
427
- regex: identifierRe
428
- }, {
429
- token: "punctuation.operator",
430
- regex: "[, ]+",
431
- }, {
432
- token: "punctuation.operator",
433
- regex: "$",
434
- }, {
435
- token: "empty",
436
- regex: "",
437
- next: "start"
438
- }
439
- ],
440
- "comment_regex_allowed" : [
441
- {
442
- token : "comment", // closing comment
443
- regex : ".*?\\*\\/",
444
- next : "regex_allowed"
445
- }, {
446
- token : "comment", // comment spanning whole line
447
- regex : ".+"
448
- }
449
- ],
450
- "comment" : [
451
- {
452
- token : "comment", // closing comment
453
- regex : ".*?\\*\\/",
454
- next : "start"
455
- }, {
456
- token : "comment", // comment spanning whole line
457
- regex : ".+"
458
- }
459
- ],
460
- "qqstring" : [
461
- {
462
- token : "constant.language.escape",
463
- regex : escapedRe
464
- }, {
465
- token : "string",
466
- regex : "\\\\$",
467
- next : "qqstring",
468
- }, {
469
- token : "string",
470
- regex : '"|$',
471
- next : "start",
472
- }, {
473
- token : "string",
474
- regex : '.|\\w+|\\s+',
475
- }
476
- ],
477
- "qstring" : [
478
- {
479
- token : "constant.language.escape",
480
- regex : escapedRe
481
- }, {
482
- token : "string",
483
- regex : "\\\\$",
484
- next : "qstring",
485
- }, {
486
- token : "string",
487
- regex : "'|$",
488
- next : "start",
489
- }, {
490
- token : "string",
491
- regex : '.|\\w+|\\s+',
492
- }
493
- ]
494
- };
495
-
496
- this.embedRules(DocCommentHighlightRules, "doc-",
497
- [ DocCommentHighlightRules.getEndRule("start") ]);
498
- };
499
-
500
- oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
501
-
502
- exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
503
- });
504
-
505
- define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
506
-
507
-
508
- var oop = require("../lib/oop");
509
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
510
-
511
- var DocCommentHighlightRules = function() {
512
-
513
- this.$rules = {
514
- "start" : [ {
515
- token : "comment.doc.tag",
516
- regex : "@[\\w\\d_]+" // TODO: fix email addresses
517
- }, {
518
- token : "comment.doc",
519
- regex : "\\s+"
520
- }, {
521
- token : "comment.doc",
522
- regex : "TODO"
523
- }, {
524
- token : "comment.doc",
525
- regex : "[^@\\*]+"
526
- }, {
527
- token : "comment.doc",
528
- regex : "."
529
- }]
530
- };
531
- };
532
-
533
- oop.inherits(DocCommentHighlightRules, TextHighlightRules);
534
-
535
- DocCommentHighlightRules.getStartRule = function(start) {
536
- return {
537
- token : "comment.doc", // doc comment
538
- regex : "\\/\\*(?=\\*)",
539
- next : start
540
- };
541
- };
542
-
543
- DocCommentHighlightRules.getEndRule = function (start) {
544
- return {
545
- token : "comment.doc", // closing comment
546
- regex : "\\*\\/",
547
- next : start
548
- };
549
- };
550
-
551
-
552
- exports.DocCommentHighlightRules = DocCommentHighlightRules;
553
-
554
- });
555
-
556
- define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
557
-
558
-
559
- var Range = require("../range").Range;
560
-
561
- var MatchingBraceOutdent = function() {};
562
-
563
- (function() {
564
-
565
- this.checkOutdent = function(line, input) {
566
- if (! /^\s+$/.test(line))
567
- return false;
568
-
569
- return /^\s*\}/.test(input);
570
- };
571
-
572
- this.autoOutdent = function(doc, row) {
573
- var line = doc.getLine(row);
574
- var match = line.match(/^(\s*\})/);
575
-
576
- if (!match) return 0;
577
-
578
- var column = match[1].length;
579
- var openBracePos = doc.findMatchingBracket({row: row, column: column});
580
-
581
- if (!openBracePos || openBracePos.row == row) return 0;
582
-
583
- var indent = this.$getIndent(doc.getLine(openBracePos.row));
584
- doc.replace(new Range(row, 0, row, column-1), indent);
585
- };
586
-
587
- this.$getIndent = function(line) {
588
- var match = line.match(/^(\s+)/);
589
- if (match) {
590
- return match[1];
591
- }
592
-
593
- return "";
594
- };
595
-
596
- }).call(MatchingBraceOutdent.prototype);
597
-
598
- exports.MatchingBraceOutdent = MatchingBraceOutdent;
599
- });
600
-
601
- define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
602
-
603
-
604
- var oop = require("../../lib/oop");
605
- var Behaviour = require("../behaviour").Behaviour;
606
- var TokenIterator = require("../../token_iterator").TokenIterator;
607
- var lang = require("../../lib/lang");
608
-
609
- var SAFE_INSERT_IN_TOKENS =
610
- ["text", "paren.rparen", "punctuation.operator"];
611
- var SAFE_INSERT_BEFORE_TOKENS =
612
- ["text", "paren.rparen", "punctuation.operator", "comment"];
613
-
614
-
615
- var autoInsertedBrackets = 0;
616
- var autoInsertedRow = -1;
617
- var autoInsertedLineEnd = "";
618
- var maybeInsertedBrackets = 0;
619
- var maybeInsertedRow = -1;
620
- var maybeInsertedLineStart = "";
621
- var maybeInsertedLineEnd = "";
622
-
623
- var CstyleBehaviour = function () {
624
-
625
- CstyleBehaviour.isSaneInsertion = function(editor, session) {
626
- var cursor = editor.getCursorPosition();
627
- var iterator = new TokenIterator(session, cursor.row, cursor.column);
628
- if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
629
- var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
630
- if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
631
- return false;
632
- }
633
- iterator.stepForward();
634
- return iterator.getCurrentTokenRow() !== cursor.row ||
635
- this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
636
- };
637
-
638
- CstyleBehaviour.$matchTokenType = function(token, types) {
639
- return types.indexOf(token.type || token) > -1;
640
- };
641
-
642
- CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
643
- var cursor = editor.getCursorPosition();
644
- var line = session.doc.getLine(cursor.row);
645
- if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
646
- autoInsertedBrackets = 0;
647
- autoInsertedRow = cursor.row;
648
- autoInsertedLineEnd = bracket + line.substr(cursor.column);
649
- autoInsertedBrackets++;
650
- };
651
-
652
- CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
653
- var cursor = editor.getCursorPosition();
654
- var line = session.doc.getLine(cursor.row);
655
- if (!this.isMaybeInsertedClosing(cursor, line))
656
- maybeInsertedBrackets = 0;
657
- maybeInsertedRow = cursor.row;
658
- maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
659
- maybeInsertedLineEnd = line.substr(cursor.column);
660
- maybeInsertedBrackets++;
661
- };
662
-
663
- CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
664
- return autoInsertedBrackets > 0 &&
665
- cursor.row === autoInsertedRow &&
666
- bracket === autoInsertedLineEnd[0] &&
667
- line.substr(cursor.column) === autoInsertedLineEnd;
668
- };
669
-
670
- CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
671
- return maybeInsertedBrackets > 0 &&
672
- cursor.row === maybeInsertedRow &&
673
- line.substr(cursor.column) === maybeInsertedLineEnd &&
674
- line.substr(0, cursor.column) == maybeInsertedLineStart;
675
- };
676
-
677
- CstyleBehaviour.popAutoInsertedClosing = function() {
678
- autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
679
- autoInsertedBrackets--;
680
- };
681
-
682
- CstyleBehaviour.clearMaybeInsertedClosing = function() {
683
- maybeInsertedBrackets = 0;
684
- maybeInsertedRow = -1;
685
- };
686
-
687
- this.add("braces", "insertion", function (state, action, editor, session, text) {
688
- var cursor = editor.getCursorPosition();
689
- var line = session.doc.getLine(cursor.row);
690
- if (text == '{') {
691
- var selection = editor.getSelectionRange();
692
- var selected = session.doc.getTextRange(selection);
693
- if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
694
- return {
695
- text: '{' + selected + '}',
696
- selection: false
697
- };
698
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
699
- if (/[\]\}\)]/.test(line[cursor.column])) {
700
- CstyleBehaviour.recordAutoInsert(editor, session, "}");
701
- return {
702
- text: '{}',
703
- selection: [1, 1]
704
- };
705
- } else {
706
- CstyleBehaviour.recordMaybeInsert(editor, session, "{");
707
- return {
708
- text: '{',
709
- selection: [1, 1]
710
- };
711
- }
712
- }
713
- } else if (text == '}') {
714
- var rightChar = line.substring(cursor.column, cursor.column + 1);
715
- if (rightChar == '}') {
716
- var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
717
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
718
- CstyleBehaviour.popAutoInsertedClosing();
719
- return {
720
- text: '',
721
- selection: [1, 1]
722
- };
723
- }
724
- }
725
- } else if (text == "\n" || text == "\r\n") {
726
- var closing = "";
727
- if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
728
- closing = lang.stringRepeat("}", maybeInsertedBrackets);
729
- CstyleBehaviour.clearMaybeInsertedClosing();
730
- }
731
- var rightChar = line.substring(cursor.column, cursor.column + 1);
732
- if (rightChar == '}' || closing !== "") {
733
- var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
734
- if (!openBracePos)
735
- return null;
736
-
737
- var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
738
- var next_indent = this.$getIndent(line);
739
-
740
- return {
741
- text: '\n' + indent + '\n' + next_indent + closing,
742
- selection: [1, indent.length, 1, indent.length]
743
- };
744
- }
745
- }
746
- });
747
-
748
- this.add("braces", "deletion", function (state, action, editor, session, range) {
749
- var selected = session.doc.getTextRange(range);
750
- if (!range.isMultiLine() && selected == '{') {
751
- var line = session.doc.getLine(range.start.row);
752
- var rightChar = line.substring(range.end.column, range.end.column + 1);
753
- if (rightChar == '}') {
754
- range.end.column++;
755
- return range;
756
- } else {
757
- maybeInsertedBrackets--;
758
- }
759
- }
760
- });
761
-
762
- this.add("parens", "insertion", function (state, action, editor, session, text) {
763
- if (text == '(') {
764
- var selection = editor.getSelectionRange();
765
- var selected = session.doc.getTextRange(selection);
766
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
767
- return {
768
- text: '(' + selected + ')',
769
- selection: false
770
- };
771
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
772
- CstyleBehaviour.recordAutoInsert(editor, session, ")");
773
- return {
774
- text: '()',
775
- selection: [1, 1]
776
- };
777
- }
778
- } else if (text == ')') {
779
- var cursor = editor.getCursorPosition();
780
- var line = session.doc.getLine(cursor.row);
781
- var rightChar = line.substring(cursor.column, cursor.column + 1);
782
- if (rightChar == ')') {
783
- var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
784
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
785
- CstyleBehaviour.popAutoInsertedClosing();
786
- return {
787
- text: '',
788
- selection: [1, 1]
789
- };
790
- }
791
- }
792
- }
793
- });
794
-
795
- this.add("parens", "deletion", function (state, action, editor, session, range) {
796
- var selected = session.doc.getTextRange(range);
797
- if (!range.isMultiLine() && selected == '(') {
798
- var line = session.doc.getLine(range.start.row);
799
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
800
- if (rightChar == ')') {
801
- range.end.column++;
802
- return range;
803
- }
804
- }
805
- });
806
-
807
- this.add("brackets", "insertion", function (state, action, editor, session, text) {
808
- if (text == '[') {
809
- var selection = editor.getSelectionRange();
810
- var selected = session.doc.getTextRange(selection);
811
- if (selected !== "" && editor.getWrapBehavioursEnabled()) {
812
- return {
813
- text: '[' + selected + ']',
814
- selection: false
815
- };
816
- } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
817
- CstyleBehaviour.recordAutoInsert(editor, session, "]");
818
- return {
819
- text: '[]',
820
- selection: [1, 1]
821
- };
822
- }
823
- } else if (text == ']') {
824
- var cursor = editor.getCursorPosition();
825
- var line = session.doc.getLine(cursor.row);
826
- var rightChar = line.substring(cursor.column, cursor.column + 1);
827
- if (rightChar == ']') {
828
- var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
829
- if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
830
- CstyleBehaviour.popAutoInsertedClosing();
831
- return {
832
- text: '',
833
- selection: [1, 1]
834
- };
835
- }
836
- }
837
- }
838
- });
839
-
840
- this.add("brackets", "deletion", function (state, action, editor, session, range) {
841
- var selected = session.doc.getTextRange(range);
842
- if (!range.isMultiLine() && selected == '[') {
843
- var line = session.doc.getLine(range.start.row);
844
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
845
- if (rightChar == ']') {
846
- range.end.column++;
847
- return range;
848
- }
849
- }
850
- });
851
-
852
- this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
853
- if (text == '"' || text == "'") {
854
- var quote = text;
855
- var selection = editor.getSelectionRange();
856
- var selected = session.doc.getTextRange(selection);
857
- if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
858
- return {
859
- text: quote + selected + quote,
860
- selection: false
861
- };
862
- } else {
863
- var cursor = editor.getCursorPosition();
864
- var line = session.doc.getLine(cursor.row);
865
- var leftChar = line.substring(cursor.column-1, cursor.column);
866
- if (leftChar == '\\') {
867
- return null;
868
- }
869
- var tokens = session.getTokens(selection.start.row);
870
- var col = 0, token;
871
- var quotepos = -1; // Track whether we're inside an open quote.
872
-
873
- for (var x = 0; x < tokens.length; x++) {
874
- token = tokens[x];
875
- if (token.type == "string") {
876
- quotepos = -1;
877
- } else if (quotepos < 0) {
878
- quotepos = token.value.indexOf(quote);
879
- }
880
- if ((token.value.length + col) > selection.start.column) {
881
- break;
882
- }
883
- col += tokens[x].value.length;
884
- }
885
- 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)))) {
886
- if (!CstyleBehaviour.isSaneInsertion(editor, session))
887
- return;
888
- return {
889
- text: quote + quote,
890
- selection: [1,1]
891
- };
892
- } else if (token && token.type === "string") {
893
- var rightChar = line.substring(cursor.column, cursor.column + 1);
894
- if (rightChar == quote) {
895
- return {
896
- text: '',
897
- selection: [1, 1]
898
- };
899
- }
900
- }
901
- }
902
- }
903
- });
904
-
905
- this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
906
- var selected = session.doc.getTextRange(range);
907
- if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
908
- var line = session.doc.getLine(range.start.row);
909
- var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
910
- if (rightChar == '"') {
911
- range.end.column++;
912
- return range;
913
- }
914
- }
915
- });
916
-
917
- };
918
-
919
- oop.inherits(CstyleBehaviour, Behaviour);
920
-
921
- exports.CstyleBehaviour = CstyleBehaviour;
922
- });
923
-
924
- define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
925
-
926
-
927
- var oop = require("../../lib/oop");
928
- var Range = require("../../range").Range;
929
- var BaseFoldMode = require("./fold_mode").FoldMode;
930
-
931
- var FoldMode = exports.FoldMode = function() {};
932
- oop.inherits(FoldMode, BaseFoldMode);
933
-
934
- (function() {
935
-
936
- this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
937
- this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
938
-
939
- this.getFoldWidgetRange = function(session, foldStyle, row) {
940
- var line = session.getLine(row);
941
- var match = line.match(this.foldingStartMarker);
942
- if (match) {
943
- var i = match.index;
944
-
945
- if (match[1])
946
- return this.openingBracketBlock(session, match[1], row, i);
947
-
948
- return session.getCommentFoldRange(row, i + match[0].length, 1);
949
- }
950
-
951
- if (foldStyle !== "markbeginend")
952
- return;
953
-
954
- var match = line.match(this.foldingStopMarker);
955
- if (match) {
956
- var i = match.index + match[0].length;
957
-
958
- if (match[1])
959
- return this.closingBracketBlock(session, match[1], row, i);
960
-
961
- return session.getCommentFoldRange(row, i, -1);
962
- }
963
- };
964
-
965
- }).call(FoldMode.prototype);
966
-
967
- });
968
-
969
- 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) {
970
-
971
-
972
- var oop = require("../lib/oop");
973
- var TextMode = require("./text").Mode;
974
- var Tokenizer = require("../tokenizer").Tokenizer;
975
- var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
976
- var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
977
- var XmlFoldMode = require("./folding/xml").FoldMode;
978
-
979
- var Mode = function() {
980
- this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
981
- this.$behaviour = new XmlBehaviour();
982
- this.foldingRules = new XmlFoldMode();
983
- };
984
-
985
- oop.inherits(Mode, TextMode);
986
-
987
- (function() {
988
-
989
- this.getNextLineIndent = function(state, line, tab) {
990
- return this.$getIndent(line);
991
- };
992
-
993
- }).call(Mode.prototype);
994
-
995
- exports.Mode = Mode;
996
- });
997
-
998
- 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) {
999
-
1000
-
1001
- var oop = require("../lib/oop");
1002
- var xmlUtil = require("./xml_util");
1003
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1004
-
1005
- var XmlHighlightRules = function() {
1006
- this.$rules = {
1007
- start : [
1008
- {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
1009
- {token : "xml-pe", regex : "<\\?.*?\\?>"},
1010
- {token : "comment", regex : "<\\!--", next : "comment"},
1011
- {token : "xml-pe", regex : "<\\!.*?>"},
1012
- {token : "meta.tag", regex : "<\\/?", next : "tag"},
1013
- {token : "text", regex : "\\s+"},
1014
- {
1015
- token : "constant.character.entity",
1016
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1017
- },
1018
- {token : "text", regex : "[^<]+"}
1019
- ],
1020
-
1021
- cdata : [
1022
- {token : "text", regex : "\\]\\]>", next : "start"},
1023
- {token : "text", regex : "\\s+"},
1024
- {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
1025
- ],
1026
-
1027
- comment : [
1028
- {token : "comment", regex : ".*?-->", next : "start"},
1029
- {token : "comment", regex : ".+"}
1030
- ]
1031
- };
1032
-
1033
- xmlUtil.tag(this.$rules, "tag", "start");
1034
- };
1035
-
1036
- oop.inherits(XmlHighlightRules, TextHighlightRules);
1037
-
1038
- exports.XmlHighlightRules = XmlHighlightRules;
1039
- });
1040
-
1041
- define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
1042
-
1043
-
1044
- function string(state) {
1045
- return [{
1046
- token : "string",
1047
- regex : '"',
1048
- next : state + "_qqstring"
1049
- }, {
1050
- token : "string",
1051
- regex : "'",
1052
- next : state + "_qstring"
1053
- }];
1054
- }
1055
-
1056
- function multiLineString(quote, state) {
1057
- return [
1058
- {token : "string", regex : quote, next : state},
1059
- {
1060
- token : "constant.language.escape",
1061
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1062
- },
1063
- {token : "string", regex : '\\w+|.|\\s+'}
1064
- ];
1065
- }
1066
-
1067
- exports.tag = function(states, name, nextState, tagMap) {
1068
- states[name] = [{
1069
- token : "text",
1070
- regex : "\\s+"
1071
- }, {
1072
-
1073
- token : !tagMap ? "meta.tag.tag-name" : function(value) {
1074
- if (tagMap[value])
1075
- return "meta.tag.tag-name." + tagMap[value];
1076
- else
1077
- return "meta.tag.tag-name";
1078
- },
1079
- regex : "[-_a-zA-Z0-9:]+",
1080
- next : name + "_embed_attribute_list"
1081
- }, {
1082
- token: "empty",
1083
- regex: "",
1084
- next : name + "_embed_attribute_list"
1085
- }];
1086
-
1087
- states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
1088
- states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
1089
-
1090
- states[name + "_embed_attribute_list"] = [{
1091
- token : "meta.tag.r",
1092
- regex : "/?>",
1093
- next : nextState
1094
- }, {
1095
- token : "keyword.operator",
1096
- regex : "="
1097
- }, {
1098
- token : "entity.other.attribute-name",
1099
- regex : "[-_a-zA-Z0-9:]+"
1100
- }, {
1101
- token : "constant.numeric", // float
1102
- regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1103
- }, {
1104
- token : "text",
1105
- regex : "\\s+"
1106
- }].concat(string(name));
1107
- };
1108
-
1109
- });
1110
-
1111
- 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) {
1112
-
1113
-
1114
- var oop = require("../../lib/oop");
1115
- var Behaviour = require("../behaviour").Behaviour;
1116
- var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1117
- var TokenIterator = require("../../token_iterator").TokenIterator;
1118
-
1119
- function hasType(token, type) {
1120
- var hasType = true;
1121
- var typeList = token.type.split('.');
1122
- var needleList = type.split('.');
1123
- needleList.forEach(function(needle){
1124
- if (typeList.indexOf(needle) == -1) {
1125
- hasType = false;
1126
- return false;
1127
- }
1128
- });
1129
- return hasType;
1130
- }
1131
-
1132
- var XmlBehaviour = function () {
1133
-
1134
- this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
1135
-
1136
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1137
- if (text == '>') {
1138
- var position = editor.getCursorPosition();
1139
- var iterator = new TokenIterator(session, position.row, position.column);
1140
- var token = iterator.getCurrentToken();
1141
- var atCursor = false;
1142
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
1143
- do {
1144
- token = iterator.stepBackward();
1145
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
1146
- } else {
1147
- atCursor = true;
1148
- }
1149
- if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
1150
- return
1151
- }
1152
- var tag = token.value;
1153
- if (atCursor){
1154
- var tag = tag.substring(0, position.column - token.start);
1155
- }
1156
-
1157
- return {
1158
- text: '>' + '</' + tag + '>',
1159
- selection: [1, 1]
1160
- }
1161
- }
1162
- });
1163
-
1164
- this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
1165
- if (text == "\n") {
1166
- var cursor = editor.getCursorPosition();
1167
- var line = session.doc.getLine(cursor.row);
1168
- var rightChars = line.substring(cursor.column, cursor.column + 2);
1169
- if (rightChars == '</') {
1170
- var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
1171
- var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
1172
-
1173
- return {
1174
- text: '\n' + indent + '\n' + next_indent,
1175
- selection: [1, indent.length, 1, indent.length]
1176
- }
1177
- }
1178
- }
1179
- });
1180
-
1181
- }
1182
- oop.inherits(XmlBehaviour, Behaviour);
1183
-
1184
- exports.XmlBehaviour = XmlBehaviour;
1185
- });
1186
-
1187
- 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) {
1188
-
1189
-
1190
- var oop = require("../../lib/oop");
1191
- var lang = require("../../lib/lang");
1192
- var Range = require("../../range").Range;
1193
- var BaseFoldMode = require("./fold_mode").FoldMode;
1194
- var TokenIterator = require("../../token_iterator").TokenIterator;
1195
-
1196
- var FoldMode = exports.FoldMode = function(voidElements) {
1197
- BaseFoldMode.call(this);
1198
- this.voidElements = voidElements || {};
1199
- };
1200
- oop.inherits(FoldMode, BaseFoldMode);
1201
-
1202
- (function() {
1203
-
1204
- this.getFoldWidget = function(session, foldStyle, row) {
1205
- var tag = this._getFirstTagInLine(session, row);
1206
-
1207
- if (tag.closing)
1208
- return foldStyle == "markbeginend" ? "end" : "";
1209
-
1210
- if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
1211
- return "";
1212
-
1213
- if (tag.selfClosing)
1214
- return "";
1215
-
1216
- if (tag.value.indexOf("/" + tag.tagName) !== -1)
1217
- return "";
1218
-
1219
- return "start";
1220
- };
1221
-
1222
- this._getFirstTagInLine = function(session, row) {
1223
- var tokens = session.getTokens(row);
1224
- var value = "";
1225
- for (var i = 0; i < tokens.length; i++) {
1226
- var token = tokens[i];
1227
- if (token.type.indexOf("meta.tag") === 0)
1228
- value += token.value;
1229
- else
1230
- value += lang.stringRepeat(" ", token.value.length);
1231
- }
1232
-
1233
- return this._parseTag(value);
1234
- };
1235
-
1236
- this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
1237
- this._parseTag = function(tag) {
1238
-
1239
- var match = this.tagRe.exec(tag);
1240
- var column = this.tagRe.lastIndex || 0;
1241
- this.tagRe.lastIndex = 0;
1242
-
1243
- return {
1244
- value: tag,
1245
- match: match ? match[2] : "",
1246
- closing: match ? !!match[3] : false,
1247
- selfClosing: match ? !!match[5] || match[2] == "/>" : false,
1248
- tagName: match ? match[4] : "",
1249
- column: match[1] ? column + match[1].length : column
1250
- };
1251
- };
1252
- this._readTagForward = function(iterator) {
1253
- var token = iterator.getCurrentToken();
1254
- if (!token)
1255
- return null;
1256
-
1257
- var value = "";
1258
- var start;
1259
-
1260
- do {
1261
- if (token.type.indexOf("meta.tag") === 0) {
1262
- if (!start) {
1263
- var start = {
1264
- row: iterator.getCurrentTokenRow(),
1265
- column: iterator.getCurrentTokenColumn()
1266
- };
1267
- }
1268
- value += token.value;
1269
- if (value.indexOf(">") !== -1) {
1270
- var tag = this._parseTag(value);
1271
- tag.start = start;
1272
- tag.end = {
1273
- row: iterator.getCurrentTokenRow(),
1274
- column: iterator.getCurrentTokenColumn() + token.value.length
1275
- };
1276
- iterator.stepForward();
1277
- return tag;
1278
- }
1279
- }
1280
- } while(token = iterator.stepForward());
1281
-
1282
- return null;
1283
- };
1284
-
1285
- this._readTagBackward = function(iterator) {
1286
- var token = iterator.getCurrentToken();
1287
- if (!token)
1288
- return null;
1289
-
1290
- var value = "";
1291
- var end;
1292
-
1293
- do {
1294
- if (token.type.indexOf("meta.tag") === 0) {
1295
- if (!end) {
1296
- end = {
1297
- row: iterator.getCurrentTokenRow(),
1298
- column: iterator.getCurrentTokenColumn() + token.value.length
1299
- };
1300
- }
1301
- value = token.value + value;
1302
- if (value.indexOf("<") !== -1) {
1303
- var tag = this._parseTag(value);
1304
- tag.end = end;
1305
- tag.start = {
1306
- row: iterator.getCurrentTokenRow(),
1307
- column: iterator.getCurrentTokenColumn()
1308
- };
1309
- iterator.stepBackward();
1310
- return tag;
1311
- }
1312
- }
1313
- } while(token = iterator.stepBackward());
1314
-
1315
- return null;
1316
- };
1317
-
1318
- this._pop = function(stack, tag) {
1319
- while (stack.length) {
1320
-
1321
- var top = stack[stack.length-1];
1322
- if (!tag || top.tagName == tag.tagName) {
1323
- return stack.pop();
1324
- }
1325
- else if (this.voidElements[tag.tagName]) {
1326
- return;
1327
- }
1328
- else if (this.voidElements[top.tagName]) {
1329
- stack.pop();
1330
- continue;
1331
- } else {
1332
- return null;
1333
- }
1334
- }
1335
- };
1336
-
1337
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1338
- var firstTag = this._getFirstTagInLine(session, row);
1339
-
1340
- if (!firstTag.match)
1341
- return null;
1342
-
1343
- var isBackward = firstTag.closing || firstTag.selfClosing;
1344
- var stack = [];
1345
- var tag;
1346
-
1347
- if (!isBackward) {
1348
- var iterator = new TokenIterator(session, row, firstTag.column);
1349
- var start = {
1350
- row: row,
1351
- column: firstTag.column + firstTag.tagName.length + 2
1352
- };
1353
- while (tag = this._readTagForward(iterator)) {
1354
- if (tag.selfClosing) {
1355
- if (!stack.length) {
1356
- tag.start.column += tag.tagName.length + 2;
1357
- tag.end.column -= 2;
1358
- return Range.fromPoints(tag.start, tag.end);
1359
- } else
1360
- continue;
1361
- }
1362
-
1363
- if (tag.closing) {
1364
- this._pop(stack, tag);
1365
- if (stack.length == 0)
1366
- return Range.fromPoints(start, tag.start);
1367
- }
1368
- else {
1369
- stack.push(tag)
1370
- }
1371
- }
1372
- }
1373
- else {
1374
- var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
1375
- var end = {
1376
- row: row,
1377
- column: firstTag.column
1378
- };
1379
-
1380
- while (tag = this._readTagBackward(iterator)) {
1381
- if (tag.selfClosing) {
1382
- if (!stack.length) {
1383
- tag.start.column += tag.tagName.length + 2;
1384
- tag.end.column -= 2;
1385
- return Range.fromPoints(tag.start, tag.end);
1386
- } else
1387
- continue;
1388
- }
1389
-
1390
- if (!tag.closing) {
1391
- this._pop(stack, tag);
1392
- if (stack.length == 0) {
1393
- tag.start.column += tag.tagName.length + 2;
1394
- return Range.fromPoints(tag.start, end);
1395
- }
1396
- }
1397
- else {
1398
- stack.push(tag)
1399
- }
1400
- }
1401
- }
1402
-
1403
- };
1404
-
1405
- }).call(FoldMode.prototype);
1406
-
1407
- });
1408
-
1409
- define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(require, exports, module) {
1410
-
1411
-
1412
- var oop = require("../lib/oop");
1413
- var TextMode = require("./text").Mode;
1414
- var JavaScriptMode = require("./javascript").Mode;
1415
- var CssMode = require("./css").Mode;
1416
- var Tokenizer = require("../tokenizer").Tokenizer;
1417
- var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
1418
- var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
1419
- var HtmlFoldMode = require("./folding/html").FoldMode;
1420
-
1421
- var Mode = function() {
1422
- var highlighter = new HtmlHighlightRules();
1423
- this.$tokenizer = new Tokenizer(highlighter.getRules());
1424
- this.$behaviour = new HtmlBehaviour();
1425
-
1426
- this.$embeds = highlighter.getEmbeds();
1427
- this.createModeDelegates({
1428
- "js-": JavaScriptMode,
1429
- "css-": CssMode
1430
- });
1431
-
1432
- this.foldingRules = new HtmlFoldMode();
1433
- };
1434
- oop.inherits(Mode, TextMode);
1435
-
1436
- (function() {
1437
-
1438
-
1439
- this.toggleCommentLines = function(state, doc, startRow, endRow) {
1440
- return 0;
1441
- };
1442
-
1443
- this.getNextLineIndent = function(state, line, tab) {
1444
- return this.$getIndent(line);
1445
- };
1446
-
1447
- this.checkOutdent = function(state, line, input) {
1448
- return false;
1449
- };
1450
-
1451
- }).call(Mode.prototype);
1452
-
1453
- exports.Mode = Mode;
1454
- });
1455
-
1456
- 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) {
1457
-
1458
-
1459
- var oop = require("../lib/oop");
1460
- var TextMode = require("./text").Mode;
1461
- var Tokenizer = require("../tokenizer").Tokenizer;
1462
- var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1463
- var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1464
- var WorkerClient = require("../worker/worker_client").WorkerClient;
1465
- var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1466
- var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1467
-
1468
- var Mode = function() {
1469
- this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
1470
- this.$outdent = new MatchingBraceOutdent();
1471
- this.$behaviour = new CstyleBehaviour();
1472
- this.foldingRules = new CStyleFoldMode();
1473
- };
1474
- oop.inherits(Mode, TextMode);
1475
-
1476
- (function() {
1477
-
1478
- this.foldingRules = "cStyle";
1479
-
1480
- this.getNextLineIndent = function(state, line, tab) {
1481
- var indent = this.$getIndent(line);
1482
- var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
1483
- if (tokens.length && tokens[tokens.length-1].type == "comment") {
1484
- return indent;
1485
- }
1486
-
1487
- var match = line.match(/^.*\{\s*$/);
1488
- if (match) {
1489
- indent += tab;
1490
- }
1491
-
1492
- return indent;
1493
- };
1494
-
1495
- this.checkOutdent = function(state, line, input) {
1496
- return this.$outdent.checkOutdent(line, input);
1497
- };
1498
-
1499
- this.autoOutdent = function(state, doc, row) {
1500
- this.$outdent.autoOutdent(doc, row);
1501
- };
1502
-
1503
- this.createWorker = function(session) {
1504
- var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1505
- worker.attachToDocument(session.getDocument());
1506
-
1507
- worker.on("csslint", function(e) {
1508
- session.setAnnotations(e.data);
1509
- });
1510
-
1511
- worker.on("terminate", function() {
1512
- session.clearAnnotations();
1513
- });
1514
-
1515
- return worker;
1516
- };
1517
-
1518
- }).call(Mode.prototype);
1519
-
1520
- exports.Mode = Mode;
1521
-
1522
- });
1523
-
1524
- define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1525
-
1526
-
1527
- var oop = require("../lib/oop");
1528
- var lang = require("../lib/lang");
1529
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1530
- 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";
1531
- var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
1532
- 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";
1533
- var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
1534
- 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";
1535
-
1536
- var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1537
- var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1538
- 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";
1539
-
1540
- var CssHighlightRules = function() {
1541
-
1542
- var keywordMapper = this.createKeywordMapper({
1543
- "support.function": supportFunction,
1544
- "support.constant": supportConstant,
1545
- "support.type": supportType,
1546
- "support.constant.color": supportConstantColor,
1547
- "support.constant.fonts": supportConstantFonts
1548
- }, "text", true);
1549
-
1550
- var base_ruleset = [
1551
- {
1552
- token : "comment", // multi line comment
1553
- regex : "\\/\\*",
1554
- next : "ruleset_comment"
1555
- }, {
1556
- token : "string", // single line
1557
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1558
- }, {
1559
- token : "string", // single line
1560
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1561
- }, {
1562
- token : ["constant.numeric", "keyword"],
1563
- 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|%)"
1564
- }, {
1565
- token : "constant.numeric",
1566
- regex : numRe
1567
- }, {
1568
- token : "constant.numeric", // hex6 color
1569
- regex : "#[a-f0-9]{6}"
1570
- }, {
1571
- token : "constant.numeric", // hex3 color
1572
- regex : "#[a-f0-9]{3}"
1573
- }, {
1574
- token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1575
- regex : pseudoElements
1576
- }, {
1577
- token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1578
- regex : pseudoClasses
1579
- }, {
1580
- token : keywordMapper,
1581
- regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1582
- }
1583
- ];
1584
-
1585
- var ruleset = lang.copyArray(base_ruleset);
1586
- ruleset.unshift({
1587
- token : "paren.rparen",
1588
- regex : "\\}",
1589
- next: "start"
1590
- });
1591
-
1592
- var media_ruleset = lang.copyArray( base_ruleset );
1593
- media_ruleset.unshift({
1594
- token : "paren.rparen",
1595
- regex : "\\}",
1596
- next: "media"
1597
- });
1598
-
1599
- var base_comment = [{
1600
- token : "comment", // comment spanning whole line
1601
- regex : ".+"
1602
- }];
1603
-
1604
- var comment = lang.copyArray(base_comment);
1605
- comment.unshift({
1606
- token : "comment", // closing comment
1607
- regex : ".*?\\*\\/",
1608
- next : "start"
1609
- });
1610
-
1611
- var media_comment = lang.copyArray(base_comment);
1612
- media_comment.unshift({
1613
- token : "comment", // closing comment
1614
- regex : ".*?\\*\\/",
1615
- next : "media"
1616
- });
1617
-
1618
- var ruleset_comment = lang.copyArray(base_comment);
1619
- ruleset_comment.unshift({
1620
- token : "comment", // closing comment
1621
- regex : ".*?\\*\\/",
1622
- next : "ruleset"
1623
- });
1624
-
1625
- this.$rules = {
1626
- "start" : [{
1627
- token : "comment", // multi line comment
1628
- regex : "\\/\\*",
1629
- next : "comment"
1630
- }, {
1631
- token: "paren.lparen",
1632
- regex: "\\{",
1633
- next: "ruleset"
1634
- }, {
1635
- token: "string",
1636
- regex: "@.*?{",
1637
- next: "media"
1638
- },{
1639
- token: "keyword",
1640
- regex: "#[a-z0-9-_]+"
1641
- },{
1642
- token: "variable",
1643
- regex: "\\.[a-z0-9-_]+"
1644
- },{
1645
- token: "string",
1646
- regex: ":[a-z0-9-_]+"
1647
- },{
1648
- token: "constant",
1649
- regex: "[a-z0-9-_]+"
1650
- }],
1651
-
1652
- "media" : [ {
1653
- token : "comment", // multi line comment
1654
- regex : "\\/\\*",
1655
- next : "media_comment"
1656
- }, {
1657
- token: "paren.lparen",
1658
- regex: "\\{",
1659
- next: "media_ruleset"
1660
- },{
1661
- token: "string",
1662
- regex: "\\}",
1663
- next: "start"
1664
- },{
1665
- token: "keyword",
1666
- regex: "#[a-z0-9-_]+"
1667
- },{
1668
- token: "variable",
1669
- regex: "\\.[a-z0-9-_]+"
1670
- },{
1671
- token: "string",
1672
- regex: ":[a-z0-9-_]+"
1673
- },{
1674
- token: "constant",
1675
- regex: "[a-z0-9-_]+"
1676
- }],
1677
-
1678
- "comment" : comment,
1679
-
1680
- "ruleset" : ruleset,
1681
- "ruleset_comment" : ruleset_comment,
1682
-
1683
- "media_ruleset" : media_ruleset,
1684
- "media_comment" : media_comment
1685
- };
1686
- };
1687
-
1688
- oop.inherits(CssHighlightRules, TextHighlightRules);
1689
-
1690
- exports.CssHighlightRules = CssHighlightRules;
1691
-
1692
- });
1693
-
1694
- define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1695
-
1696
-
1697
- var oop = require("../lib/oop");
1698
- var lang = require("../lib/lang");
1699
- var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1700
- var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1701
- var xmlUtil = require("./xml_util");
1702
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1703
-
1704
- var tagMap = lang.createMap({
1705
- a : 'anchor',
1706
- button : 'form',
1707
- form : 'form',
1708
- img : 'image',
1709
- input : 'form',
1710
- label : 'form',
1711
- script : 'script',
1712
- select : 'form',
1713
- textarea : 'form',
1714
- style : 'style',
1715
- table : 'table',
1716
- tbody : 'table',
1717
- td : 'table',
1718
- tfoot : 'table',
1719
- th : 'table',
1720
- tr : 'table'
1721
- });
1722
-
1723
- var HtmlHighlightRules = function() {
1724
- this.$rules = {
1725
- start : [{
1726
- token : "text",
1727
- regex : "<\\!\\[CDATA\\[",
1728
- next : "cdata"
1729
- }, {
1730
- token : "xml-pe",
1731
- regex : "<\\?.*?\\?>"
1732
- }, {
1733
- token : "comment",
1734
- regex : "<\\!--",
1735
- next : "comment"
1736
- }, {
1737
- token : "xml-pe",
1738
- regex : "<\\!.*?>"
1739
- }, {
1740
- token : "meta.tag",
1741
- regex : "<(?=script\\b)",
1742
- next : "script"
1743
- }, {
1744
- token : "meta.tag",
1745
- regex : "<(?=style\\b)",
1746
- next : "style"
1747
- }, {
1748
- token : "meta.tag", // opening tag
1749
- regex : "<\\/?",
1750
- next : "tag"
1751
- }, {
1752
- token : "text",
1753
- regex : "\\s+"
1754
- }, {
1755
- token : "constant.character.entity",
1756
- regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1757
- }, {
1758
- token : "text",
1759
- regex : "[^<]+"
1760
- } ],
1761
-
1762
- cdata : [ {
1763
- token : "text",
1764
- regex : "\\]\\]>",
1765
- next : "start"
1766
- }, {
1767
- token : "text",
1768
- regex : "\\s+"
1769
- }, {
1770
- token : "text",
1771
- regex : ".+"
1772
- } ],
1773
-
1774
- comment : [ {
1775
- token : "comment",
1776
- regex : ".*?-->",
1777
- next : "start"
1778
- }, {
1779
- token : "comment",
1780
- regex : ".+"
1781
- } ]
1782
- };
1783
-
1784
- xmlUtil.tag(this.$rules, "tag", "start", tagMap);
1785
- xmlUtil.tag(this.$rules, "style", "css-start", tagMap);
1786
- xmlUtil.tag(this.$rules, "script", "js-start", tagMap);
1787
-
1788
- this.embedRules(JavaScriptHighlightRules, "js-", [{
1789
- token: "comment",
1790
- regex: "\\/\\/.*(?=<\\/script>)",
1791
- next: "tag"
1792
- }, {
1793
- token: "meta.tag",
1794
- regex: "<\\/(?=script)",
1795
- next: "tag"
1796
- }]);
1797
-
1798
- this.embedRules(CssHighlightRules, "css-", [{
1799
- token: "meta.tag",
1800
- regex: "<\\/(?=style)",
1801
- next: "tag"
1802
- }]);
1803
- };
1804
-
1805
- oop.inherits(HtmlHighlightRules, TextHighlightRules);
1806
-
1807
- exports.HtmlHighlightRules = HtmlHighlightRules;
1808
- });
1809
-
1810
- define('ace/mode/behaviour/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
1811
-
1812
-
1813
- var oop = require("../../lib/oop");
1814
- var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1815
- var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1816
- var TokenIterator = require("../../token_iterator").TokenIterator;
1817
- var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
1818
-
1819
- function hasType(token, type) {
1820
- var hasType = true;
1821
- var typeList = token.type.split('.');
1822
- var needleList = type.split('.');
1823
- needleList.forEach(function(needle){
1824
- if (typeList.indexOf(needle) == -1) {
1825
- hasType = false;
1826
- return false;
1827
- }
1828
- });
1829
- return hasType;
1830
- }
1831
-
1832
- var HtmlBehaviour = function () {
1833
-
1834
- this.inherit(XmlBehaviour); // Get xml behaviour
1835
-
1836
- this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1837
- if (text == '>') {
1838
- var position = editor.getCursorPosition();
1839
- var iterator = new TokenIterator(session, position.row, position.column);
1840
- var token = iterator.getCurrentToken();
1841
- var atCursor = false;
1842
- if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
1843
- do {
1844
- token = iterator.stepBackward();
1845
- } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
1846
- } else {
1847
- atCursor = true;
1848
- }
1849
- if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
1850
- return
1851
- }
1852
- var element = token.value;
1853
- if (atCursor){
1854
- var element = element.substring(0, position.column - token.start);
1855
- }
1856
- if (voidElements.indexOf(element) !== -1){
1857
- return;
1858
- }
1859
- return {
1860
- text: '>' + '</' + element + '>',
1861
- selection: [1, 1]
1862
- }
1863
- }
1864
- });
1865
- }
1866
- oop.inherits(HtmlBehaviour, XmlBehaviour);
1867
-
1868
- exports.HtmlBehaviour = HtmlBehaviour;
1869
- });
1870
-
1871
- define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
1872
-
1873
-
1874
- var oop = require("../../lib/oop");
1875
- var MixedFoldMode = require("./mixed").FoldMode;
1876
- var XmlFoldMode = require("./xml").FoldMode;
1877
- var CStyleFoldMode = require("./cstyle").FoldMode;
1878
-
1879
- var FoldMode = exports.FoldMode = function() {
1880
- MixedFoldMode.call(this, new XmlFoldMode({
1881
- "area": 1,
1882
- "base": 1,
1883
- "br": 1,
1884
- "col": 1,
1885
- "command": 1,
1886
- "embed": 1,
1887
- "hr": 1,
1888
- "img": 1,
1889
- "input": 1,
1890
- "keygen": 1,
1891
- "link": 1,
1892
- "meta": 1,
1893
- "param": 1,
1894
- "source": 1,
1895
- "track": 1,
1896
- "wbr": 1,
1897
- "li": 1,
1898
- "dt": 1,
1899
- "dd": 1,
1900
- "p": 1,
1901
- "rt": 1,
1902
- "rp": 1,
1903
- "optgroup": 1,
1904
- "option": 1,
1905
- "colgroup": 1,
1906
- "td": 1,
1907
- "th": 1
1908
- }), {
1909
- "js-": new CStyleFoldMode(),
1910
- "css-": new CStyleFoldMode()
1911
- });
1912
- };
1913
-
1914
- oop.inherits(FoldMode, MixedFoldMode);
1915
-
1916
- });
1917
-
1918
- define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
1919
-
1920
-
1921
- var oop = require("../../lib/oop");
1922
- var BaseFoldMode = require("./fold_mode").FoldMode;
1923
-
1924
- var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1925
- this.defaultMode = defaultMode;
1926
- this.subModes = subModes;
1927
- };
1928
- oop.inherits(FoldMode, BaseFoldMode);
1929
-
1930
- (function() {
1931
-
1932
-
1933
- this.$getMode = function(state) {
1934
- for (var key in this.subModes) {
1935
- if (state.indexOf(key) === 0)
1936
- return this.subModes[key];
1937
- }
1938
- return null;
1939
- };
1940
-
1941
- this.$tryMode = function(state, session, foldStyle, row) {
1942
- var mode = this.$getMode(state);
1943
- return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1944
- };
1945
-
1946
- this.getFoldWidget = function(session, foldStyle, row) {
1947
- return (
1948
- this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1949
- this.$tryMode(session.getState(row), session, foldStyle, row) ||
1950
- this.defaultMode.getFoldWidget(session, foldStyle, row)
1951
- );
1952
- };
1953
-
1954
- this.getFoldWidgetRange = function(session, foldStyle, row) {
1955
- var mode = this.$getMode(session.getState(row-1));
1956
-
1957
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1958
- mode = this.$getMode(session.getState(row));
1959
-
1960
- if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1961
- mode = this.defaultMode;
1962
-
1963
- return mode.getFoldWidgetRange(session, foldStyle, row);
1964
- };
1965
-
1966
- }).call(FoldMode.prototype);
1967
-
1968
- });
1969
-
1970
- define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
1971
-
1972
-
1973
- var oop = require("../lib/oop");
1974
- var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1975
- var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1976
- var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1977
- var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
1978
- var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1979
-
1980
- function github_embed(tag, prefix) {
1981
- return { // Github style block
1982
- token : "support.function",
1983
- regex : "^```" + tag + "\\s*$",
1984
- next : prefix + "start"
1985
- };
1986
- }
1987
-
1988
- var MarkdownHighlightRules = function() {
1989
-
1990
- this.$rules = {
1991
- "start" : [ {
1992
- token : "empty_line",
1993
- regex : '^$'
1994
- }, { // code span `
1995
- token : ["support.function", "support.function", "support.function"],
1996
- regex : "(`+)([^\\r]*?[^`])(\\1)"
1997
- }, { // code block
1998
- token : "support.function",
1999
- regex : "^[ ]{4}.+"
2000
- }, { // h1
2001
- token: "markup.heading.1",
2002
- regex: "^=+(?=\\s*$)"
2003
- }, { // h2
2004
- token: "markup.heading.2",
2005
- regex: "^\\-+(?=\\s*$)"
2006
- }, { // header
2007
- token : function(value) {
2008
- return "markup.heading." + value.search(/[^#]/);
2009
- },
2010
- regex : "^#{1,6}(?:[^ #].*| +.*(?:[^ #].*|[^ ]+.* +#+ *))$"
2011
- }, github_embed("(?:javascript|js)", "js-"),
2012
- github_embed("xml", "xml-"),
2013
- github_embed("html", "html-"),
2014
- github_embed("css", "css-"),
2015
- { // Github style block
2016
- token : "support.function",
2017
- regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
2018
- next : "githubblock"
2019
- }, { // block quote
2020
- token : "string",
2021
- regex : "^>[ ].+$",
2022
- next : "blockquote"
2023
- }, { // reference
2024
- token : ["text", "constant", "text", "url", "string", "text"],
2025
- regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
2026
- }, { // link by reference
2027
- token : ["text", "string", "text", "constant", "text"],
2028
- regex : "(\\[)((?:[[^\\]]*\\]|[^\\[\\]])*)(\\][ ]?(?:\\n[ ]*)?\\[)(.*?)(\\])"
2029
- }, { // link by url
2030
- token : ["text", "string", "text", "markup.underline", "string", "text"],
2031
- regex : "(\\[)"+
2032
- "(\\[[^\\]]*\\]|[^\\[\\]]*)"+
2033
- "(\\]\\([ \\t]*)"+
2034
- "(<?(?:(?:[^\\(]*?\\([^\\)]*?\\)\\S*?)|(?:.*?))>?)"+
2035
- "((?:[ \t]*\"(?:.*?)\"[ \\t]*)?)"+
2036
- "(\\))"
2037
- }, { // HR *
2038
- token : "constant",
2039
- regex : "^[ ]{0,2}(?:[ ]?\\*[ ]?){3,}\\s*$"
2040
- }, { // HR -
2041
- token : "constant",
2042
- regex : "^[ ]{0,2}(?:[ ]?\\-[ ]?){3,}\\s*$"
2043
- }, { // HR _
2044
- token : "constant",
2045
- regex : "^[ ]{0,2}(?:[ ]?\\_[ ]?){3,}\\s*$"
2046
- }, { // list
2047
- token : "markup.list",
2048
- regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
2049
- next : "listblock"
2050
- }, { // strong ** __
2051
- token : ["string", "string", "string"],
2052
- regex : "([*]{2}|[_]{2}(?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
2053
- }, { // emphasis * _
2054
- token : ["string", "string", "string"],
2055
- regex : "([*]|[_](?=\\S))([^\\r]*?\\S[*_]*)(\\1)"
2056
- }, { //
2057
- token : ["text", "url", "text"],
2058
- regex : "(<)("+
2059
- "(?:https?|ftp|dict):[^'\">\\s]+"+
2060
- "|"+
2061
- "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
2062
- ")(>)"
2063
- }, {
2064
- token : "text",
2065
- regex : "[^\\*_%$`\\[#<>]+"
2066
- } ],
2067
-
2068
- "listblock" : [ { // Lists only escape on completely blank lines.
2069
- token : "empty_line",
2070
- regex : "^$",
2071
- next : "start"
2072
- }, {
2073
- token : "markup.list",
2074
- regex : ".+"
2075
- } ],
2076
-
2077
- "blockquote" : [ { // BLockquotes only escape on blank lines.
2078
- token : "empty_line",
2079
- regex : "^\\s*$",
2080
- next : "start"
2081
- }, {
2082
- token : "string",
2083
- regex : ".+"
2084
- } ],
2085
-
2086
- "githubblock" : [ {
2087
- token : "support.function",
2088
- regex : "^```",
2089
- next : "start"
2090
- }, {
2091
- token : "support.function",
2092
- regex : ".+"
2093
- } ]
2094
- };
2095
-
2096
- this.embedRules(JavaScriptHighlightRules, "js-", [{
2097
- token : "support.function",
2098
- regex : "^```",
2099
- next : "start"
2100
- }]);
2101
-
2102
- this.embedRules(HtmlHighlightRules, "html-", [{
2103
- token : "support.function",
2104
- regex : "^```",
2105
- next : "start"
2106
- }]);
2107
-
2108
- this.embedRules(CssHighlightRules, "css-", [{
2109
- token : "support.function",
2110
- regex : "^```",
2111
- next : "start"
2112
- }]);
2113
-
2114
- this.embedRules(XmlHighlightRules, "xml-", [{
2115
- token : "support.function",
2116
- regex : "^```",
2117
- next : "start"
2118
- }]);
2119
-
2120
- var html = new HtmlHighlightRules().getRules();
2121
- for (var i in html) {
2122
- if (this.$rules[i])
2123
- this.$rules[i] = this.$rules[i].concat(html[i]);
2124
- else
2125
- this.$rules[i] = html[i];
2126
- }
2127
-
2128
- };
2129
- oop.inherits(MarkdownHighlightRules, TextHighlightRules);
2130
-
2131
- exports.MarkdownHighlightRules = MarkdownHighlightRules;
2132
- });
2133
-
2134
- define('ace/mode/folding/markdown', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
2135
-
2136
-
2137
- var oop = require("../../lib/oop");
2138
- var BaseFoldMode = require("./fold_mode").FoldMode;
2139
- var Range = require("../../range").Range;
2140
-
2141
- var FoldMode = exports.FoldMode = function() {};
2142
- oop.inherits(FoldMode, BaseFoldMode);
2143
-
2144
- (function() {
2145
- this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/;
2146
-
2147
- this.getFoldWidget = function(session, foldStyle, row) {
2148
- var line = session.getLine(row);
2149
- if (!this.foldingStartMarker.test(line))
2150
- return "";
2151
-
2152
- if (line[0] == "`") {
2153
- if (session.bgTokenizer.getState(row) == "start")
2154
- return "end";
2155
- return "start";
2156
- }
2157
-
2158
- return "start";
2159
- };
2160
-
2161
- this.getFoldWidgetRange = function(session, foldStyle, row) {
2162
- var line = session.getLine(row);
2163
- var startColumn = line.length;
2164
- var maxRow = session.getLength();
2165
- var startRow = row;
2166
- var endRow = row;
2167
- if (!line.match(this.foldingStartMarker))
2168
- return;
2169
-
2170
- if (line[0] == "`") {
2171
- if (session.bgTokenizer.getState(row) !== "start") {
2172
- while (++row < maxRow) {
2173
- line = session.getLine(row);
2174
- if (line[0] == "`" & line.substring(0, 3) == "```")
2175
- break;
2176
- }
2177
- return new Range(startRow, startColumn, row, 0);
2178
- } else {
2179
- while (row -- > 0) {
2180
- line = session.getLine(row);
2181
- if (line[0] == "`" & line.substring(0, 3) == "```")
2182
- break;
2183
- }
2184
- return new Range(row, line.length, startRow, 0);
2185
- }
2186
- }
2187
-
2188
- var token;
2189
- function isHeading(row) {
2190
- token = session.getTokens(row)[0];
2191
- return token && token.type.lastIndexOf(heading, 0) === 0;
2192
- }
2193
-
2194
- var heading = "markup.heading";
2195
- function getLevel() {
2196
- var ch = token.value[0];
2197
- if (ch == "=") return 6;
2198
- if (ch == "-") return 5;
2199
- return 7 - token.value.search(/[^#]/);
2200
- }
2201
-
2202
- if (isHeading(row)) {
2203
- var startHeadingLevel = getLevel();
2204
- while (++row < maxRow) {
2205
- if (!isHeading(row))
2206
- continue;
2207
- var level = getLevel();
2208
- if (level >= startHeadingLevel)
2209
- break;
2210
- }
2211
-
2212
- endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2);
2213
-
2214
- if (endRow > startRow) {
2215
- while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
2216
- endRow--;
2217
- }
2218
-
2219
- if (endRow > startRow) {
2220
- var endColumn = session.getLine(endRow).length;
2221
- return new Range(startRow, startColumn, endRow, endColumn);
2222
- }
2223
- }
2224
- };
2225
-
2226
- }).call(FoldMode.prototype);
2227
-
2228
- });