jquery-ace-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/lib/jquery-ace-rails.rb +5 -0
- data/lib/jquery-ace-rails/engine.rb +4 -0
- data/lib/jquery-ace-rails/version.rb +3 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.coffee +126 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.js +195 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.min.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ace.js +11 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-static_highlight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-textarea.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-emacs.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-vim.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-abap.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-asciidoc.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c9search.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c_cpp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-clojure.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coffee.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coldfusion.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-csharp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-css.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dart.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-diff.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dot.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-glsl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-golang.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-groovy.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haxe.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-html.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jade.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-java.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-javascript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-json.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsx.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-latex.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-less.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-liquid.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lisp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lua.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-luapage.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lucene.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-makefile.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-markdown.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-objectivec.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ocaml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-perl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-pgsql.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-php.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-powershell.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-python.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-r.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rdoc.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rhtml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ruby.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scad.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scala.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scss.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sh.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sql.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-stylus.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-svg.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tcl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tex.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-text.js +0 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-textile.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-typescript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xquery.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-yaml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-ambiance.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chaos.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chrome.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds_midnight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-cobalt.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-crimson_editor.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dawn.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dreamweaver.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-eclipse.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-github.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-idle_fingers.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-kr.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore_soft.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-mono_industrial.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-monokai.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-pastel_on_dark.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_dark.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_light.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-textmate.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_blue.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_bright.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_eighties.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-twilight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-vibrant_ink.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-xcode.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-coffee.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-css.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-javascript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-json.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-xquery.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +14262 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +96 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +591 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +364 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +1646 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +259 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +372 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +187 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +765 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +325 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +520 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +1725 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +605 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +680 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +279 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +163 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +348 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +838 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +660 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +1082 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +440 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +610 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +1850 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +2035 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +1041 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +921 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +574 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +1371 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +635 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +217 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +394 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +921 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +142 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +609 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +2463 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +64 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +314 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +2228 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +655 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +448 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +319 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +928 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +2299 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +611 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +290 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +410 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +189 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +2138 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +410 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +698 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +1070 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +416 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +232 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +145 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +474 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +1490 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +342 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +171 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +175 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +1011 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +792 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +676 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +298 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +202 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +167 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +161 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +135 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +150 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +154 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +146 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +173 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +122 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +143 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +135 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +148 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +140 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +148 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +128 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +131 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +163 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +145 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +144 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +131 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +125 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +6985 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +7741 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +6387 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +2228 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +21719 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/jquery-1.8.3.min.js +2 -0
- metadata +249 -0
@@ -0,0 +1,574 @@
|
|
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/json', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(require, exports, module) {
|
32
|
+
|
33
|
+
|
34
|
+
var oop = require("../lib/oop");
|
35
|
+
var TextMode = require("./text").Mode;
|
36
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
37
|
+
var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
|
38
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
39
|
+
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
40
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
41
|
+
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
42
|
+
|
43
|
+
var Mode = function() {
|
44
|
+
this.$tokenizer = new Tokenizer(new HighlightRules().getRules());
|
45
|
+
this.$outdent = new MatchingBraceOutdent();
|
46
|
+
this.$behaviour = new CstyleBehaviour();
|
47
|
+
this.foldingRules = new CStyleFoldMode();
|
48
|
+
};
|
49
|
+
oop.inherits(Mode, TextMode);
|
50
|
+
|
51
|
+
(function() {
|
52
|
+
|
53
|
+
this.getNextLineIndent = function(state, line, tab) {
|
54
|
+
var indent = this.$getIndent(line);
|
55
|
+
|
56
|
+
if (state == "start") {
|
57
|
+
var match = line.match(/^.*[\{\(\[]\s*$/);
|
58
|
+
if (match) {
|
59
|
+
indent += tab;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
return indent;
|
64
|
+
};
|
65
|
+
|
66
|
+
this.checkOutdent = function(state, line, input) {
|
67
|
+
return this.$outdent.checkOutdent(line, input);
|
68
|
+
};
|
69
|
+
|
70
|
+
this.autoOutdent = function(state, doc, row) {
|
71
|
+
this.$outdent.autoOutdent(doc, row);
|
72
|
+
};
|
73
|
+
|
74
|
+
this.createWorker = function(session) {
|
75
|
+
var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
|
76
|
+
worker.attachToDocument(session.getDocument());
|
77
|
+
|
78
|
+
worker.on("error", function(e) {
|
79
|
+
session.setAnnotations([e.data]);
|
80
|
+
});
|
81
|
+
|
82
|
+
worker.on("ok", function() {
|
83
|
+
session.clearAnnotations();
|
84
|
+
});
|
85
|
+
|
86
|
+
return worker;
|
87
|
+
};
|
88
|
+
|
89
|
+
|
90
|
+
}).call(Mode.prototype);
|
91
|
+
|
92
|
+
exports.Mode = Mode;
|
93
|
+
});
|
94
|
+
|
95
|
+
define('ace/mode/json_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
96
|
+
|
97
|
+
|
98
|
+
var oop = require("../lib/oop");
|
99
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
100
|
+
|
101
|
+
var JsonHighlightRules = function() {
|
102
|
+
this.$rules = {
|
103
|
+
"start" : [
|
104
|
+
{
|
105
|
+
token : "variable", // single line
|
106
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
|
107
|
+
}, {
|
108
|
+
token : "string", // single line
|
109
|
+
regex : '"',
|
110
|
+
next : "string"
|
111
|
+
}, {
|
112
|
+
token : "constant.numeric", // hex
|
113
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
114
|
+
}, {
|
115
|
+
token : "constant.numeric", // float
|
116
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
117
|
+
}, {
|
118
|
+
token : "constant.language.boolean",
|
119
|
+
regex : "(?:true|false)\\b"
|
120
|
+
}, {
|
121
|
+
token : "invalid.illegal", // single quoted strings are not allowed
|
122
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
123
|
+
}, {
|
124
|
+
token : "invalid.illegal", // comments are not allowed
|
125
|
+
regex : "\\/\\/.*$"
|
126
|
+
}, {
|
127
|
+
token : "paren.lparen",
|
128
|
+
regex : "[[({]"
|
129
|
+
}, {
|
130
|
+
token : "paren.rparen",
|
131
|
+
regex : "[\\])}]"
|
132
|
+
}, {
|
133
|
+
token : "text",
|
134
|
+
regex : "\\s+"
|
135
|
+
}
|
136
|
+
],
|
137
|
+
"string" : [
|
138
|
+
{
|
139
|
+
token : "constant.language.escape",
|
140
|
+
regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
|
141
|
+
}, {
|
142
|
+
token : "string",
|
143
|
+
regex : '[^"\\\\]+',
|
144
|
+
}, {
|
145
|
+
token : "string",
|
146
|
+
regex : '"',
|
147
|
+
next : "start",
|
148
|
+
}, {
|
149
|
+
token : "string",
|
150
|
+
regex : "",
|
151
|
+
next : "start",
|
152
|
+
}
|
153
|
+
]
|
154
|
+
};
|
155
|
+
|
156
|
+
};
|
157
|
+
|
158
|
+
oop.inherits(JsonHighlightRules, TextHighlightRules);
|
159
|
+
|
160
|
+
exports.JsonHighlightRules = JsonHighlightRules;
|
161
|
+
});
|
162
|
+
|
163
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
164
|
+
|
165
|
+
|
166
|
+
var Range = require("../range").Range;
|
167
|
+
|
168
|
+
var MatchingBraceOutdent = function() {};
|
169
|
+
|
170
|
+
(function() {
|
171
|
+
|
172
|
+
this.checkOutdent = function(line, input) {
|
173
|
+
if (! /^\s+$/.test(line))
|
174
|
+
return false;
|
175
|
+
|
176
|
+
return /^\s*\}/.test(input);
|
177
|
+
};
|
178
|
+
|
179
|
+
this.autoOutdent = function(doc, row) {
|
180
|
+
var line = doc.getLine(row);
|
181
|
+
var match = line.match(/^(\s*\})/);
|
182
|
+
|
183
|
+
if (!match) return 0;
|
184
|
+
|
185
|
+
var column = match[1].length;
|
186
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
187
|
+
|
188
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
189
|
+
|
190
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
191
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
192
|
+
};
|
193
|
+
|
194
|
+
this.$getIndent = function(line) {
|
195
|
+
var match = line.match(/^(\s+)/);
|
196
|
+
if (match) {
|
197
|
+
return match[1];
|
198
|
+
}
|
199
|
+
|
200
|
+
return "";
|
201
|
+
};
|
202
|
+
|
203
|
+
}).call(MatchingBraceOutdent.prototype);
|
204
|
+
|
205
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
206
|
+
});
|
207
|
+
|
208
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
|
209
|
+
|
210
|
+
|
211
|
+
var oop = require("../../lib/oop");
|
212
|
+
var Behaviour = require("../behaviour").Behaviour;
|
213
|
+
var TokenIterator = require("../../token_iterator").TokenIterator;
|
214
|
+
var lang = require("../../lib/lang");
|
215
|
+
|
216
|
+
var SAFE_INSERT_IN_TOKENS =
|
217
|
+
["text", "paren.rparen", "punctuation.operator"];
|
218
|
+
var SAFE_INSERT_BEFORE_TOKENS =
|
219
|
+
["text", "paren.rparen", "punctuation.operator", "comment"];
|
220
|
+
|
221
|
+
|
222
|
+
var autoInsertedBrackets = 0;
|
223
|
+
var autoInsertedRow = -1;
|
224
|
+
var autoInsertedLineEnd = "";
|
225
|
+
var maybeInsertedBrackets = 0;
|
226
|
+
var maybeInsertedRow = -1;
|
227
|
+
var maybeInsertedLineStart = "";
|
228
|
+
var maybeInsertedLineEnd = "";
|
229
|
+
|
230
|
+
var CstyleBehaviour = function () {
|
231
|
+
|
232
|
+
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
233
|
+
var cursor = editor.getCursorPosition();
|
234
|
+
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
235
|
+
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
236
|
+
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
237
|
+
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
238
|
+
return false;
|
239
|
+
}
|
240
|
+
iterator.stepForward();
|
241
|
+
return iterator.getCurrentTokenRow() !== cursor.row ||
|
242
|
+
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
243
|
+
};
|
244
|
+
|
245
|
+
CstyleBehaviour.$matchTokenType = function(token, types) {
|
246
|
+
return types.indexOf(token.type || token) > -1;
|
247
|
+
};
|
248
|
+
|
249
|
+
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
250
|
+
var cursor = editor.getCursorPosition();
|
251
|
+
var line = session.doc.getLine(cursor.row);
|
252
|
+
if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
|
253
|
+
autoInsertedBrackets = 0;
|
254
|
+
autoInsertedRow = cursor.row;
|
255
|
+
autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
256
|
+
autoInsertedBrackets++;
|
257
|
+
};
|
258
|
+
|
259
|
+
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
260
|
+
var cursor = editor.getCursorPosition();
|
261
|
+
var line = session.doc.getLine(cursor.row);
|
262
|
+
if (!this.isMaybeInsertedClosing(cursor, line))
|
263
|
+
maybeInsertedBrackets = 0;
|
264
|
+
maybeInsertedRow = cursor.row;
|
265
|
+
maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
266
|
+
maybeInsertedLineEnd = line.substr(cursor.column);
|
267
|
+
maybeInsertedBrackets++;
|
268
|
+
};
|
269
|
+
|
270
|
+
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
271
|
+
return autoInsertedBrackets > 0 &&
|
272
|
+
cursor.row === autoInsertedRow &&
|
273
|
+
bracket === autoInsertedLineEnd[0] &&
|
274
|
+
line.substr(cursor.column) === autoInsertedLineEnd;
|
275
|
+
};
|
276
|
+
|
277
|
+
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
278
|
+
return maybeInsertedBrackets > 0 &&
|
279
|
+
cursor.row === maybeInsertedRow &&
|
280
|
+
line.substr(cursor.column) === maybeInsertedLineEnd &&
|
281
|
+
line.substr(0, cursor.column) == maybeInsertedLineStart;
|
282
|
+
};
|
283
|
+
|
284
|
+
CstyleBehaviour.popAutoInsertedClosing = function() {
|
285
|
+
autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
|
286
|
+
autoInsertedBrackets--;
|
287
|
+
};
|
288
|
+
|
289
|
+
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
290
|
+
maybeInsertedBrackets = 0;
|
291
|
+
maybeInsertedRow = -1;
|
292
|
+
};
|
293
|
+
|
294
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
295
|
+
var cursor = editor.getCursorPosition();
|
296
|
+
var line = session.doc.getLine(cursor.row);
|
297
|
+
if (text == '{') {
|
298
|
+
var selection = editor.getSelectionRange();
|
299
|
+
var selected = session.doc.getTextRange(selection);
|
300
|
+
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
301
|
+
return {
|
302
|
+
text: '{' + selected + '}',
|
303
|
+
selection: false
|
304
|
+
};
|
305
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
306
|
+
if (/[\]\}\)]/.test(line[cursor.column])) {
|
307
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
308
|
+
return {
|
309
|
+
text: '{}',
|
310
|
+
selection: [1, 1]
|
311
|
+
};
|
312
|
+
} else {
|
313
|
+
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
314
|
+
return {
|
315
|
+
text: '{',
|
316
|
+
selection: [1, 1]
|
317
|
+
};
|
318
|
+
}
|
319
|
+
}
|
320
|
+
} else if (text == '}') {
|
321
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
322
|
+
if (rightChar == '}') {
|
323
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
324
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
325
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
326
|
+
return {
|
327
|
+
text: '',
|
328
|
+
selection: [1, 1]
|
329
|
+
};
|
330
|
+
}
|
331
|
+
}
|
332
|
+
} else if (text == "\n" || text == "\r\n") {
|
333
|
+
var closing = "";
|
334
|
+
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
335
|
+
closing = lang.stringRepeat("}", maybeInsertedBrackets);
|
336
|
+
CstyleBehaviour.clearMaybeInsertedClosing();
|
337
|
+
}
|
338
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
339
|
+
if (rightChar == '}' || closing !== "") {
|
340
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
|
341
|
+
if (!openBracePos)
|
342
|
+
return null;
|
343
|
+
|
344
|
+
var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
|
345
|
+
var next_indent = this.$getIndent(line);
|
346
|
+
|
347
|
+
return {
|
348
|
+
text: '\n' + indent + '\n' + next_indent + closing,
|
349
|
+
selection: [1, indent.length, 1, indent.length]
|
350
|
+
};
|
351
|
+
}
|
352
|
+
}
|
353
|
+
});
|
354
|
+
|
355
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
356
|
+
var selected = session.doc.getTextRange(range);
|
357
|
+
if (!range.isMultiLine() && selected == '{') {
|
358
|
+
var line = session.doc.getLine(range.start.row);
|
359
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
360
|
+
if (rightChar == '}') {
|
361
|
+
range.end.column++;
|
362
|
+
return range;
|
363
|
+
} else {
|
364
|
+
maybeInsertedBrackets--;
|
365
|
+
}
|
366
|
+
}
|
367
|
+
});
|
368
|
+
|
369
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
370
|
+
if (text == '(') {
|
371
|
+
var selection = editor.getSelectionRange();
|
372
|
+
var selected = session.doc.getTextRange(selection);
|
373
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
374
|
+
return {
|
375
|
+
text: '(' + selected + ')',
|
376
|
+
selection: false
|
377
|
+
};
|
378
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
379
|
+
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
380
|
+
return {
|
381
|
+
text: '()',
|
382
|
+
selection: [1, 1]
|
383
|
+
};
|
384
|
+
}
|
385
|
+
} else if (text == ')') {
|
386
|
+
var cursor = editor.getCursorPosition();
|
387
|
+
var line = session.doc.getLine(cursor.row);
|
388
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
389
|
+
if (rightChar == ')') {
|
390
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
391
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
392
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
393
|
+
return {
|
394
|
+
text: '',
|
395
|
+
selection: [1, 1]
|
396
|
+
};
|
397
|
+
}
|
398
|
+
}
|
399
|
+
}
|
400
|
+
});
|
401
|
+
|
402
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
403
|
+
var selected = session.doc.getTextRange(range);
|
404
|
+
if (!range.isMultiLine() && selected == '(') {
|
405
|
+
var line = session.doc.getLine(range.start.row);
|
406
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
407
|
+
if (rightChar == ')') {
|
408
|
+
range.end.column++;
|
409
|
+
return range;
|
410
|
+
}
|
411
|
+
}
|
412
|
+
});
|
413
|
+
|
414
|
+
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
415
|
+
if (text == '[') {
|
416
|
+
var selection = editor.getSelectionRange();
|
417
|
+
var selected = session.doc.getTextRange(selection);
|
418
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
419
|
+
return {
|
420
|
+
text: '[' + selected + ']',
|
421
|
+
selection: false
|
422
|
+
};
|
423
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
424
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
425
|
+
return {
|
426
|
+
text: '[]',
|
427
|
+
selection: [1, 1]
|
428
|
+
};
|
429
|
+
}
|
430
|
+
} else if (text == ']') {
|
431
|
+
var cursor = editor.getCursorPosition();
|
432
|
+
var line = session.doc.getLine(cursor.row);
|
433
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
434
|
+
if (rightChar == ']') {
|
435
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
436
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
437
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
438
|
+
return {
|
439
|
+
text: '',
|
440
|
+
selection: [1, 1]
|
441
|
+
};
|
442
|
+
}
|
443
|
+
}
|
444
|
+
}
|
445
|
+
});
|
446
|
+
|
447
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
448
|
+
var selected = session.doc.getTextRange(range);
|
449
|
+
if (!range.isMultiLine() && selected == '[') {
|
450
|
+
var line = session.doc.getLine(range.start.row);
|
451
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
452
|
+
if (rightChar == ']') {
|
453
|
+
range.end.column++;
|
454
|
+
return range;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
});
|
458
|
+
|
459
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
460
|
+
if (text == '"' || text == "'") {
|
461
|
+
var quote = text;
|
462
|
+
var selection = editor.getSelectionRange();
|
463
|
+
var selected = session.doc.getTextRange(selection);
|
464
|
+
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
465
|
+
return {
|
466
|
+
text: quote + selected + quote,
|
467
|
+
selection: false
|
468
|
+
};
|
469
|
+
} else {
|
470
|
+
var cursor = editor.getCursorPosition();
|
471
|
+
var line = session.doc.getLine(cursor.row);
|
472
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
473
|
+
if (leftChar == '\\') {
|
474
|
+
return null;
|
475
|
+
}
|
476
|
+
var tokens = session.getTokens(selection.start.row);
|
477
|
+
var col = 0, token;
|
478
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
479
|
+
|
480
|
+
for (var x = 0; x < tokens.length; x++) {
|
481
|
+
token = tokens[x];
|
482
|
+
if (token.type == "string") {
|
483
|
+
quotepos = -1;
|
484
|
+
} else if (quotepos < 0) {
|
485
|
+
quotepos = token.value.indexOf(quote);
|
486
|
+
}
|
487
|
+
if ((token.value.length + col) > selection.start.column) {
|
488
|
+
break;
|
489
|
+
}
|
490
|
+
col += tokens[x].value.length;
|
491
|
+
}
|
492
|
+
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)))) {
|
493
|
+
if (!CstyleBehaviour.isSaneInsertion(editor, session))
|
494
|
+
return;
|
495
|
+
return {
|
496
|
+
text: quote + quote,
|
497
|
+
selection: [1,1]
|
498
|
+
};
|
499
|
+
} else if (token && token.type === "string") {
|
500
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
501
|
+
if (rightChar == quote) {
|
502
|
+
return {
|
503
|
+
text: '',
|
504
|
+
selection: [1, 1]
|
505
|
+
};
|
506
|
+
}
|
507
|
+
}
|
508
|
+
}
|
509
|
+
}
|
510
|
+
});
|
511
|
+
|
512
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
513
|
+
var selected = session.doc.getTextRange(range);
|
514
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
515
|
+
var line = session.doc.getLine(range.start.row);
|
516
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
517
|
+
if (rightChar == '"') {
|
518
|
+
range.end.column++;
|
519
|
+
return range;
|
520
|
+
}
|
521
|
+
}
|
522
|
+
});
|
523
|
+
|
524
|
+
};
|
525
|
+
|
526
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
527
|
+
|
528
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
529
|
+
});
|
530
|
+
|
531
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
532
|
+
|
533
|
+
|
534
|
+
var oop = require("../../lib/oop");
|
535
|
+
var Range = require("../../range").Range;
|
536
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
537
|
+
|
538
|
+
var FoldMode = exports.FoldMode = function() {};
|
539
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
540
|
+
|
541
|
+
(function() {
|
542
|
+
|
543
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
544
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
545
|
+
|
546
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
547
|
+
var line = session.getLine(row);
|
548
|
+
var match = line.match(this.foldingStartMarker);
|
549
|
+
if (match) {
|
550
|
+
var i = match.index;
|
551
|
+
|
552
|
+
if (match[1])
|
553
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
554
|
+
|
555
|
+
return session.getCommentFoldRange(row, i + match[0].length, 1);
|
556
|
+
}
|
557
|
+
|
558
|
+
if (foldStyle !== "markbeginend")
|
559
|
+
return;
|
560
|
+
|
561
|
+
var match = line.match(this.foldingStopMarker);
|
562
|
+
if (match) {
|
563
|
+
var i = match.index + match[0].length;
|
564
|
+
|
565
|
+
if (match[1])
|
566
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
567
|
+
|
568
|
+
return session.getCommentFoldRange(row, i, -1);
|
569
|
+
}
|
570
|
+
};
|
571
|
+
|
572
|
+
}).call(FoldMode.prototype);
|
573
|
+
|
574
|
+
});
|