ace-rails-ap 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace.js +15680 -1
- data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
- data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
- data/vendor/assets/javascripts/mode-c9search.js +275 -0
- data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
- data/vendor/assets/javascripts/mode-clojure.js +364 -1
- data/vendor/assets/javascripts/mode-coffee.js +527 -1
- data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
- data/vendor/assets/javascripts/mode-csharp.js +633 -1
- data/vendor/assets/javascripts/mode-css.js +499 -1
- data/vendor/assets/javascripts/mode-diff.js +250 -0
- data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
- data/vendor/assets/javascripts/mode-golang.js +681 -1
- data/vendor/assets/javascripts/mode-groovy.js +1240 -1
- data/vendor/assets/javascripts/mode-haxe.js +633 -1
- data/vendor/assets/javascripts/mode-html.js +2064 -1
- data/vendor/assets/javascripts/mode-java.js +1202 -1
- data/vendor/assets/javascripts/mode-javascript.js +1069 -1
- data/vendor/assets/javascripts/mode-json.js +588 -1
- data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
- data/vendor/assets/javascripts/mode-latex.js +95 -1
- data/vendor/assets/javascripts/mode-less.js +512 -1
- data/vendor/assets/javascripts/mode-liquid.js +1125 -1
- data/vendor/assets/javascripts/mode-lua.js +551 -1
- data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
- data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
- data/vendor/assets/javascripts/mode-markdown.js +2369 -1
- data/vendor/assets/javascripts/mode-ocaml.js +464 -1
- data/vendor/assets/javascripts/mode-perl.js +432 -1
- data/vendor/assets/javascripts/mode-pgsql.js +970 -1
- data/vendor/assets/javascripts/mode-php.js +1718 -1
- data/vendor/assets/javascripts/mode-powershell.js +610 -1
- data/vendor/assets/javascripts/mode-python.js +397 -1
- data/vendor/assets/javascripts/mode-ruby.js +318 -1
- data/vendor/assets/javascripts/mode-scad.js +732 -1
- data/vendor/assets/javascripts/mode-scala.js +1237 -1
- data/vendor/assets/javascripts/mode-scss.js +537 -1
- data/vendor/assets/javascripts/mode-sh.js +250 -1
- data/vendor/assets/javascripts/mode-sql.js +140 -1
- data/vendor/assets/javascripts/mode-svg.js +1681 -1
- data/vendor/assets/javascripts/mode-tcl.js +320 -0
- data/vendor/assets/javascripts/mode-textile.js +182 -1
- data/vendor/assets/javascripts/mode-xml.js +829 -1
- data/vendor/assets/javascripts/mode-xquery.js +605 -1
- data/vendor/assets/javascripts/mode-yaml.js +189 -0
- data/vendor/assets/javascripts/theme-chrome.js +213 -1
- data/vendor/assets/javascripts/theme-clouds.js +167 -1
- data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
- data/vendor/assets/javascripts/theme-cobalt.js +194 -1
- data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
- data/vendor/assets/javascripts/theme-dawn.js +198 -1
- data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
- data/vendor/assets/javascripts/theme-eclipse.js +157 -1
- data/vendor/assets/javascripts/theme-github.js +182 -0
- data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
- data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
- data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
- data/vendor/assets/javascripts/theme-monokai.js +194 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
- data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
- data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
- data/vendor/assets/javascripts/theme-textmate.js +216 -0
- data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
- data/vendor/assets/javascripts/theme-twilight.js +211 -1
- data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
- data/vendor/assets/javascripts/worker-coffee.js +83 -893
- data/vendor/assets/javascripts/worker-css.js +88 -1402
- data/vendor/assets/javascripts/worker-javascript.js +97 -812
- data/vendor/assets/javascripts/worker-json.js +84 -761
- data/vendor/assets/javascripts/worker-xquery.js +66464 -0
- metadata +12 -195
- data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
- data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
- data/vendor/assets/javascripts/ace-compat.js +0 -1
- data/vendor/assets/javascripts/ace-noconflict.js +0 -10
- data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
- data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
- data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
- data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
- data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
- data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
- data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
- data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
- data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
- data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
- data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
- data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
- data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
- data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
- data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
- data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
- data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
- data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
- data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
- data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
- data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
- data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
- data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
- data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
- data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
- data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
- data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
- data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
- data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
- data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
- data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
- data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
- data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
- data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
- data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
- data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
- data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
- data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
- data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
- data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
- data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
- data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
- data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
- data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
- data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
- data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
- data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
- data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
- data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
- data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
- data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
- data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
- data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
- data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
- data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
- data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
- data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
- data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
- data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
- data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
- data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
- data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
- data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
- data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
- data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
- data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
- data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
- data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
- data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
- data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
- data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
- data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
- data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
- data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
- data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
- data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
- data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
- data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
- data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
- data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
- data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
- data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
- data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
- data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
- data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1,641 +0,0 @@
|
|
1
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
3
|
-
*
|
4
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
5
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
6
|
-
* the License. You may obtain a copy of the License at
|
7
|
-
* http://www.mozilla.org/MPL/
|
8
|
-
*
|
9
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
10
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
11
|
-
* for the specific language governing rights and limitations under the
|
12
|
-
* License.
|
13
|
-
*
|
14
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
15
|
-
*
|
16
|
-
* The Initial Developer of the Original Code is
|
17
|
-
* Ajax.org B.V.
|
18
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
19
|
-
* the Initial Developer. All Rights Reserved.
|
20
|
-
*
|
21
|
-
* Contributor(s):
|
22
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
23
|
-
*
|
24
|
-
* Alternatively, the contents of this file may be used under the terms of
|
25
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
26
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
27
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
28
|
-
* of those above. If you wish to allow use of your version of this file only
|
29
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
30
|
-
* use your version of this file under the terms of the MPL, indicate your
|
31
|
-
* decision by deleting the provisions above and replace them with the notice
|
32
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
33
|
-
* the provisions above, a recipient may use your version of this file under
|
34
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
35
|
-
*
|
36
|
-
* ***** END LICENSE BLOCK ***** */
|
37
|
-
|
38
|
-
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/folding/cstyle'], function(require, exports, module) {
|
39
|
-
"use strict";
|
40
|
-
|
41
|
-
var oop = require("../lib/oop");
|
42
|
-
var TextMode = require("./text").Mode;
|
43
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
44
|
-
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
|
45
|
-
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
46
|
-
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
47
|
-
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
48
|
-
|
49
|
-
var Mode = function() {
|
50
|
-
this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
|
51
|
-
this.$outdent = new MatchingBraceOutdent();
|
52
|
-
this.foldingRules = new CStyleFoldMode();
|
53
|
-
};
|
54
|
-
oop.inherits(Mode, TextMode);
|
55
|
-
|
56
|
-
(function() {
|
57
|
-
|
58
|
-
this.foldingRules = "cStyle";
|
59
|
-
|
60
|
-
this.getNextLineIndent = function(state, line, tab) {
|
61
|
-
var indent = this.$getIndent(line);
|
62
|
-
|
63
|
-
// ignore braces in comments
|
64
|
-
var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
|
65
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
66
|
-
return indent;
|
67
|
-
}
|
68
|
-
|
69
|
-
var match = line.match(/^.*\{\s*$/);
|
70
|
-
if (match) {
|
71
|
-
indent += tab;
|
72
|
-
}
|
73
|
-
|
74
|
-
return indent;
|
75
|
-
};
|
76
|
-
|
77
|
-
this.checkOutdent = function(state, line, input) {
|
78
|
-
return this.$outdent.checkOutdent(line, input);
|
79
|
-
};
|
80
|
-
|
81
|
-
this.autoOutdent = function(state, doc, row) {
|
82
|
-
this.$outdent.autoOutdent(doc, row);
|
83
|
-
};
|
84
|
-
|
85
|
-
this.createWorker = function(session) {
|
86
|
-
var worker = new WorkerClient(["ace"], "worker-css.js", "ace/mode/css_worker", "Worker");
|
87
|
-
worker.attachToDocument(session.getDocument());
|
88
|
-
|
89
|
-
worker.on("csslint", function(e) {
|
90
|
-
var errors = [];
|
91
|
-
e.data.forEach(function(message) {
|
92
|
-
errors.push({
|
93
|
-
row: message.line - 1,
|
94
|
-
column: message.col - 1,
|
95
|
-
text: message.message,
|
96
|
-
type: message.type,
|
97
|
-
lint: message
|
98
|
-
});
|
99
|
-
});
|
100
|
-
|
101
|
-
session.setAnnotations(errors);
|
102
|
-
});
|
103
|
-
return worker;
|
104
|
-
};
|
105
|
-
|
106
|
-
}).call(Mode.prototype);
|
107
|
-
|
108
|
-
exports.Mode = Mode;
|
109
|
-
|
110
|
-
});
|
111
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
112
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
113
|
-
*
|
114
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
115
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
116
|
-
* the License. You may obtain a copy of the License at
|
117
|
-
* http://www.mozilla.org/MPL/
|
118
|
-
*
|
119
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
120
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
121
|
-
* for the specific language governing rights and limitations under the
|
122
|
-
* License.
|
123
|
-
*
|
124
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
125
|
-
*
|
126
|
-
* The Initial Developer of the Original Code is
|
127
|
-
* Ajax.org B.V.
|
128
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
129
|
-
* the Initial Developer. All Rights Reserved.
|
130
|
-
*
|
131
|
-
* Contributor(s):
|
132
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
133
|
-
*
|
134
|
-
* Alternatively, the contents of this file may be used under the terms of
|
135
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
136
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
137
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
138
|
-
* of those above. If you wish to allow use of your version of this file only
|
139
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
140
|
-
* use your version of this file under the terms of the MPL, indicate your
|
141
|
-
* decision by deleting the provisions above and replace them with the notice
|
142
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
143
|
-
* the provisions above, a recipient may use your version of this file under
|
144
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
145
|
-
*
|
146
|
-
* ***** END LICENSE BLOCK ***** */
|
147
|
-
|
148
|
-
define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
149
|
-
"use strict";
|
150
|
-
|
151
|
-
var oop = require("../lib/oop");
|
152
|
-
var lang = require("../lib/lang");
|
153
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
154
|
-
|
155
|
-
var CssHighlightRules = function() {
|
156
|
-
|
157
|
-
var properties = lang.arrayToMap(
|
158
|
-
("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").split("|")
|
159
|
-
);
|
160
|
-
|
161
|
-
var functions = lang.arrayToMap(
|
162
|
-
("rgb|rgba|url|attr|counter|counters").split("|")
|
163
|
-
);
|
164
|
-
|
165
|
-
var constants = lang.arrayToMap(
|
166
|
-
("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero").split("|")
|
167
|
-
);
|
168
|
-
|
169
|
-
var colors = lang.arrayToMap(
|
170
|
-
("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
|
171
|
-
"purple|red|silver|teal|white|yellow").split("|")
|
172
|
-
);
|
173
|
-
|
174
|
-
var fonts = lang.arrayToMap(
|
175
|
-
("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|" +
|
176
|
-
"symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|" +
|
177
|
-
"serif|monospace").split("|")
|
178
|
-
);
|
179
|
-
|
180
|
-
// regexp must not have capturing parentheses. Use (?:) instead.
|
181
|
-
// regexps are ordered -> the first match is used
|
182
|
-
|
183
|
-
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
184
|
-
var pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
|
185
|
-
var 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";
|
186
|
-
|
187
|
-
var base_ruleset = [
|
188
|
-
{
|
189
|
-
token : "comment", // multi line comment
|
190
|
-
merge : true,
|
191
|
-
regex : "\\/\\*",
|
192
|
-
next : "ruleset_comment"
|
193
|
-
}, {
|
194
|
-
token : "string", // single line
|
195
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
196
|
-
}, {
|
197
|
-
token : "string", // single line
|
198
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
199
|
-
}, {
|
200
|
-
token : ["constant.numeric", "keyword"],
|
201
|
-
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|%)"
|
202
|
-
}, {
|
203
|
-
token : ["constant.numeric"],
|
204
|
-
regex : "([0-9]+)"
|
205
|
-
}, {
|
206
|
-
token : "constant.numeric", // hex6 color
|
207
|
-
regex : "#[a-f0-9]{6}"
|
208
|
-
}, {
|
209
|
-
token : "constant.numeric", // hex3 color
|
210
|
-
regex : "#[a-f0-9]{3}"
|
211
|
-
}, {
|
212
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
|
213
|
-
regex : pseudoElements
|
214
|
-
}, {
|
215
|
-
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
|
216
|
-
regex : pseudoClasses
|
217
|
-
}, {
|
218
|
-
token : function(value) {
|
219
|
-
if (properties.hasOwnProperty(value.toLowerCase())) {
|
220
|
-
return "support.type";
|
221
|
-
}
|
222
|
-
else if (functions.hasOwnProperty(value.toLowerCase())) {
|
223
|
-
return "support.function";
|
224
|
-
}
|
225
|
-
else if (constants.hasOwnProperty(value.toLowerCase())) {
|
226
|
-
return "support.constant";
|
227
|
-
}
|
228
|
-
else if (colors.hasOwnProperty(value.toLowerCase())) {
|
229
|
-
return "support.constant.color";
|
230
|
-
}
|
231
|
-
else if (fonts.hasOwnProperty(value.toLowerCase())) {
|
232
|
-
return "support.constant.fonts";
|
233
|
-
}
|
234
|
-
else {
|
235
|
-
return "text";
|
236
|
-
}
|
237
|
-
},
|
238
|
-
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
239
|
-
}
|
240
|
-
];
|
241
|
-
|
242
|
-
var ruleset = lang.copyArray(base_ruleset);
|
243
|
-
ruleset.unshift({
|
244
|
-
token : "paren.rparen",
|
245
|
-
regex : "\\}",
|
246
|
-
next: "start"
|
247
|
-
});
|
248
|
-
|
249
|
-
var media_ruleset = lang.copyArray( base_ruleset );
|
250
|
-
media_ruleset.unshift({
|
251
|
-
token : "paren.rparen",
|
252
|
-
regex : "\\}",
|
253
|
-
next: "media"
|
254
|
-
});
|
255
|
-
|
256
|
-
var base_comment = [{
|
257
|
-
token : "comment", // comment spanning whole line
|
258
|
-
merge : true,
|
259
|
-
regex : ".+"
|
260
|
-
}];
|
261
|
-
|
262
|
-
var comment = lang.copyArray(base_comment);
|
263
|
-
comment.unshift({
|
264
|
-
token : "comment", // closing comment
|
265
|
-
regex : ".*?\\*\\/",
|
266
|
-
next : "start"
|
267
|
-
});
|
268
|
-
|
269
|
-
var media_comment = lang.copyArray(base_comment);
|
270
|
-
media_comment.unshift({
|
271
|
-
token : "comment", // closing comment
|
272
|
-
regex : ".*?\\*\\/",
|
273
|
-
next : "media"
|
274
|
-
});
|
275
|
-
|
276
|
-
var ruleset_comment = lang.copyArray(base_comment);
|
277
|
-
ruleset_comment.unshift({
|
278
|
-
token : "comment", // closing comment
|
279
|
-
regex : ".*?\\*\\/",
|
280
|
-
next : "ruleset"
|
281
|
-
});
|
282
|
-
|
283
|
-
this.$rules = {
|
284
|
-
"start" : [{
|
285
|
-
token : "comment", // multi line comment
|
286
|
-
merge : true,
|
287
|
-
regex : "\\/\\*",
|
288
|
-
next : "comment"
|
289
|
-
}, {
|
290
|
-
token: "paren.lparen",
|
291
|
-
regex: "\\{",
|
292
|
-
next: "ruleset"
|
293
|
-
}, {
|
294
|
-
token: "string",
|
295
|
-
regex: "@.*?{",
|
296
|
-
next: "media"
|
297
|
-
},{
|
298
|
-
token: "keyword",
|
299
|
-
regex: "#[a-z0-9-_]+"
|
300
|
-
},{
|
301
|
-
token: "variable",
|
302
|
-
regex: "\\.[a-z0-9-_]+"
|
303
|
-
},{
|
304
|
-
token: "string",
|
305
|
-
regex: ":[a-z0-9-_]+"
|
306
|
-
},{
|
307
|
-
token: "constant",
|
308
|
-
regex: "[a-z0-9-_]+"
|
309
|
-
}],
|
310
|
-
|
311
|
-
"media" : [ {
|
312
|
-
token : "comment", // multi line comment
|
313
|
-
merge : true,
|
314
|
-
regex : "\\/\\*",
|
315
|
-
next : "media_comment"
|
316
|
-
}, {
|
317
|
-
token: "paren.lparen",
|
318
|
-
regex: "\\{",
|
319
|
-
next: "media_ruleset"
|
320
|
-
},{
|
321
|
-
token: "string",
|
322
|
-
regex: "\\}",
|
323
|
-
next: "start"
|
324
|
-
},{
|
325
|
-
token: "keyword",
|
326
|
-
regex: "#[a-z0-9-_]+"
|
327
|
-
},{
|
328
|
-
token: "variable",
|
329
|
-
regex: "\\.[a-z0-9-_]+"
|
330
|
-
},{
|
331
|
-
token: "string",
|
332
|
-
regex: ":[a-z0-9-_]+"
|
333
|
-
},{
|
334
|
-
token: "constant",
|
335
|
-
regex: "[a-z0-9-_]+"
|
336
|
-
}],
|
337
|
-
|
338
|
-
"comment" : comment,
|
339
|
-
|
340
|
-
"ruleset" : ruleset,
|
341
|
-
"ruleset_comment" : ruleset_comment,
|
342
|
-
|
343
|
-
"media_ruleset" : media_ruleset,
|
344
|
-
"media_comment" : media_comment
|
345
|
-
};
|
346
|
-
};
|
347
|
-
|
348
|
-
oop.inherits(CssHighlightRules, TextHighlightRules);
|
349
|
-
|
350
|
-
exports.CssHighlightRules = CssHighlightRules;
|
351
|
-
|
352
|
-
});
|
353
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
354
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
355
|
-
*
|
356
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
357
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
358
|
-
* the License. You may obtain a copy of the License at
|
359
|
-
* http://www.mozilla.org/MPL/
|
360
|
-
*
|
361
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
362
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
363
|
-
* for the specific language governing rights and limitations under the
|
364
|
-
* License.
|
365
|
-
*
|
366
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
367
|
-
*
|
368
|
-
* The Initial Developer of the Original Code is
|
369
|
-
* Ajax.org B.V.
|
370
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
371
|
-
* the Initial Developer. All Rights Reserved.
|
372
|
-
*
|
373
|
-
* Contributor(s):
|
374
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
375
|
-
*
|
376
|
-
* Alternatively, the contents of this file may be used under the terms of
|
377
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
378
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
379
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
380
|
-
* of those above. If you wish to allow use of your version of this file only
|
381
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
382
|
-
* use your version of this file under the terms of the MPL, indicate your
|
383
|
-
* decision by deleting the provisions above and replace them with the notice
|
384
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
385
|
-
* the provisions above, a recipient may use your version of this file under
|
386
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
387
|
-
*
|
388
|
-
* ***** END LICENSE BLOCK ***** */
|
389
|
-
|
390
|
-
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
391
|
-
"use strict";
|
392
|
-
|
393
|
-
var Range = require("../range").Range;
|
394
|
-
|
395
|
-
var MatchingBraceOutdent = function() {};
|
396
|
-
|
397
|
-
(function() {
|
398
|
-
|
399
|
-
this.checkOutdent = function(line, input) {
|
400
|
-
if (! /^\s+$/.test(line))
|
401
|
-
return false;
|
402
|
-
|
403
|
-
return /^\s*\}/.test(input);
|
404
|
-
};
|
405
|
-
|
406
|
-
this.autoOutdent = function(doc, row) {
|
407
|
-
var line = doc.getLine(row);
|
408
|
-
var match = line.match(/^(\s*\})/);
|
409
|
-
|
410
|
-
if (!match) return 0;
|
411
|
-
|
412
|
-
var column = match[1].length;
|
413
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
414
|
-
|
415
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
416
|
-
|
417
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
418
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
419
|
-
};
|
420
|
-
|
421
|
-
this.$getIndent = function(line) {
|
422
|
-
var match = line.match(/^(\s+)/);
|
423
|
-
if (match) {
|
424
|
-
return match[1];
|
425
|
-
}
|
426
|
-
|
427
|
-
return "";
|
428
|
-
};
|
429
|
-
|
430
|
-
}).call(MatchingBraceOutdent.prototype);
|
431
|
-
|
432
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
433
|
-
});
|
434
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
435
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
436
|
-
*
|
437
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
438
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
439
|
-
* the License. You may obtain a copy of the License at
|
440
|
-
* http://www.mozilla.org/MPL/
|
441
|
-
*
|
442
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
443
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
444
|
-
* for the specific language governing rights and limitations under the
|
445
|
-
* License.
|
446
|
-
*
|
447
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
448
|
-
*
|
449
|
-
* The Initial Developer of the Original Code is
|
450
|
-
* Ajax.org B.V.
|
451
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
452
|
-
* the Initial Developer. All Rights Reserved.
|
453
|
-
*
|
454
|
-
* Contributor(s):
|
455
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
456
|
-
*
|
457
|
-
* Alternatively, the contents of this file may be used under the terms of
|
458
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
459
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
460
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
461
|
-
* of those above. If you wish to allow use of your version of this file only
|
462
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
463
|
-
* use your version of this file under the terms of the MPL, indicate your
|
464
|
-
* decision by deleting the provisions above and replace them with the notice
|
465
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
466
|
-
* the provisions above, a recipient may use your version of this file under
|
467
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
468
|
-
*
|
469
|
-
* ***** END LICENSE BLOCK ***** */
|
470
|
-
|
471
|
-
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
472
|
-
"use strict";
|
473
|
-
|
474
|
-
var oop = require("../../lib/oop");
|
475
|
-
var Range = require("../../range").Range;
|
476
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
477
|
-
|
478
|
-
var FoldMode = exports.FoldMode = function() {};
|
479
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
480
|
-
|
481
|
-
(function() {
|
482
|
-
|
483
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
484
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
485
|
-
|
486
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
487
|
-
var line = session.getLine(row);
|
488
|
-
var match = line.match(this.foldingStartMarker);
|
489
|
-
if (match) {
|
490
|
-
var i = match.index;
|
491
|
-
|
492
|
-
if (match[1])
|
493
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
494
|
-
|
495
|
-
var range = session.getCommentFoldRange(row, i + match[0].length);
|
496
|
-
range.end.column -= 2;
|
497
|
-
return range;
|
498
|
-
}
|
499
|
-
|
500
|
-
if (foldStyle !== "markbeginend")
|
501
|
-
return;
|
502
|
-
|
503
|
-
var match = line.match(this.foldingStopMarker);
|
504
|
-
if (match) {
|
505
|
-
var i = match.index + match[0].length;
|
506
|
-
|
507
|
-
if (match[2]) {
|
508
|
-
var range = session.getCommentFoldRange(row, i);
|
509
|
-
range.end.column -= 2;
|
510
|
-
return range;
|
511
|
-
}
|
512
|
-
|
513
|
-
var end = {row: row, column: i};
|
514
|
-
var start = session.$findOpeningBracket(match[1], end);
|
515
|
-
|
516
|
-
if (!start)
|
517
|
-
return;
|
518
|
-
|
519
|
-
start.column++;
|
520
|
-
end.column--;
|
521
|
-
|
522
|
-
return Range.fromPoints(start, end);
|
523
|
-
}
|
524
|
-
};
|
525
|
-
|
526
|
-
}).call(FoldMode.prototype);
|
527
|
-
|
528
|
-
});
|
529
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
530
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
531
|
-
*
|
532
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
533
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
534
|
-
* the License. You may obtain a copy of the License at
|
535
|
-
* http://www.mozilla.org/MPL/
|
536
|
-
*
|
537
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
538
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
539
|
-
* for the specific language governing rights and limitations under the
|
540
|
-
* License.
|
541
|
-
*
|
542
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
543
|
-
*
|
544
|
-
* The Initial Developer of the Original Code is
|
545
|
-
* Ajax.org B.V.
|
546
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
547
|
-
* the Initial Developer. All Rights Reserved.
|
548
|
-
*
|
549
|
-
* Contributor(s):
|
550
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
551
|
-
*
|
552
|
-
* Alternatively, the contents of this file may be used under the terms of
|
553
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
554
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
555
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
556
|
-
* of those above. If you wish to allow use of your version of this file only
|
557
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
558
|
-
* use your version of this file under the terms of the MPL, indicate your
|
559
|
-
* decision by deleting the provisions above and replace them with the notice
|
560
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
561
|
-
* the provisions above, a recipient may use your version of this file under
|
562
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
563
|
-
*
|
564
|
-
* ***** END LICENSE BLOCK ***** */
|
565
|
-
|
566
|
-
define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
567
|
-
"use strict";
|
568
|
-
|
569
|
-
var Range = require("../../range").Range;
|
570
|
-
|
571
|
-
var FoldMode = exports.FoldMode = function() {};
|
572
|
-
|
573
|
-
(function() {
|
574
|
-
|
575
|
-
this.foldingStartMarker = null;
|
576
|
-
this.foldingStopMarker = null;
|
577
|
-
|
578
|
-
// must return "" if there's no fold, to enable caching
|
579
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
580
|
-
var line = session.getLine(row);
|
581
|
-
if (this.foldingStartMarker.test(line))
|
582
|
-
return "start";
|
583
|
-
if (foldStyle == "markbeginend"
|
584
|
-
&& this.foldingStopMarker
|
585
|
-
&& this.foldingStopMarker.test(line))
|
586
|
-
return "end";
|
587
|
-
return "";
|
588
|
-
};
|
589
|
-
|
590
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
591
|
-
return null;
|
592
|
-
};
|
593
|
-
|
594
|
-
this.indentationBlock = function(session, row, column) {
|
595
|
-
var re = /^\s*/;
|
596
|
-
var startRow = row;
|
597
|
-
var endRow = row;
|
598
|
-
var line = session.getLine(row);
|
599
|
-
var startColumn = column || line.length;
|
600
|
-
var startLevel = line.match(re)[0].length;
|
601
|
-
var maxRow = session.getLength()
|
602
|
-
|
603
|
-
while (++row < maxRow) {
|
604
|
-
line = session.getLine(row);
|
605
|
-
var level = line.match(re)[0].length;
|
606
|
-
|
607
|
-
if (level == line.length)
|
608
|
-
continue;
|
609
|
-
|
610
|
-
if (level <= startLevel)
|
611
|
-
break;
|
612
|
-
|
613
|
-
endRow = row;
|
614
|
-
}
|
615
|
-
|
616
|
-
if (endRow > startRow) {
|
617
|
-
var endColumn = session.getLine(endRow).length;
|
618
|
-
return new Range(startRow, startColumn, endRow, endColumn);
|
619
|
-
}
|
620
|
-
};
|
621
|
-
|
622
|
-
this.openingBracketBlock = function(session, bracket, row, column) {
|
623
|
-
var start = {row: row, column: column + 1};
|
624
|
-
var end = session.$findClosingBracket(bracket, start);
|
625
|
-
if (!end)
|
626
|
-
return;
|
627
|
-
|
628
|
-
var fw = session.foldWidgets[end.row];
|
629
|
-
if (fw == null)
|
630
|
-
fw = this.getFoldWidget(session, end.row);
|
631
|
-
|
632
|
-
if (fw == "start") {
|
633
|
-
end.row --;
|
634
|
-
end.column = session.getLine(end.row).length;
|
635
|
-
}
|
636
|
-
return Range.fromPoints(start, end);
|
637
|
-
};
|
638
|
-
|
639
|
-
}).call(FoldMode.prototype);
|
640
|
-
|
641
|
-
});
|