aced_rails 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +9 -0
- data/README.md +29 -31
- data/aced_rails.gemspec +2 -2
- data/lib/aced_rails/config.rb +18 -18
- data/lib/aced_rails/helpers.rb +2 -3
- data/lib/aced_rails/version.rb +1 -1
- data/lib/generators/aced_rails/templates/aced_rails.rb +24 -16
- data/vendor/assets/javascripts/ace/ace.js +2 -1
- data/vendor/assets/javascripts/ace/ext-searchbox.js +1 -0
- data/vendor/assets/javascripts/ace/ext-spellcheck.js +1 -0
- data/vendor/assets/javascripts/ace/ext-static_highlight.js +1 -0
- data/vendor/assets/javascripts/ace/ext-textarea.js +1 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -1
- data/vendor/assets/javascripts/ace/keybinding-vim.js +1 -1
- data/vendor/assets/javascripts/ace/mode-abap.js +1 -0
- data/vendor/assets/javascripts/ace/mode-asciidoc.js +1 -0
- data/vendor/assets/javascripts/ace/mode-c9search.js +1 -0
- data/vendor/assets/javascripts/ace/mode-c_cpp.js +1 -1
- data/vendor/assets/javascripts/ace/mode-clojure.js +1 -1
- data/vendor/assets/javascripts/ace/mode-coffee.js +1 -1
- data/vendor/assets/javascripts/ace/mode-coldfusion.js +1 -1
- data/vendor/assets/javascripts/ace/mode-csharp.js +1 -1
- data/vendor/assets/javascripts/ace/mode-css.js +1 -1
- data/vendor/assets/javascripts/ace/mode-curly.js +1 -0
- data/vendor/assets/javascripts/ace/mode-dart.js +1 -0
- data/vendor/assets/javascripts/ace/mode-diff.js +1 -0
- data/vendor/assets/javascripts/ace/mode-django.js +1 -0
- data/vendor/assets/javascripts/ace/mode-dot.js +1 -0
- data/vendor/assets/javascripts/ace/mode-glsl.js +1 -0
- data/vendor/assets/javascripts/ace/mode-golang.js +1 -0
- data/vendor/assets/javascripts/ace/mode-groovy.js +1 -1
- data/vendor/assets/javascripts/ace/mode-haml.js +1 -0
- data/vendor/assets/javascripts/ace/mode-haxe.js +1 -1
- data/vendor/assets/javascripts/ace/mode-html.js +1 -1
- data/vendor/assets/javascripts/ace/mode-jade.js +1 -0
- data/vendor/assets/javascripts/ace/mode-java.js +1 -1
- data/vendor/assets/javascripts/ace/mode-javascript.js +1 -1
- data/vendor/assets/javascripts/ace/mode-json.js +1 -1
- data/vendor/assets/javascripts/ace/mode-jsp.js +1 -0
- data/vendor/assets/javascripts/ace/mode-jsx.js +1 -0
- data/vendor/assets/javascripts/ace/mode-latex.js +1 -1
- data/vendor/assets/javascripts/ace/mode-less.js +1 -0
- data/vendor/assets/javascripts/ace/mode-liquid.js +1 -0
- data/vendor/assets/javascripts/ace/mode-lisp.js +1 -0
- data/vendor/assets/javascripts/ace/mode-livescript.js +1 -0
- data/vendor/assets/javascripts/ace/mode-lua.js +1 -1
- data/vendor/assets/javascripts/ace/mode-luapage.js +1 -0
- data/vendor/assets/javascripts/ace/mode-lucene.js +1 -0
- data/vendor/assets/javascripts/ace/mode-makefile.js +1 -0
- data/vendor/assets/javascripts/ace/mode-markdown.js +1 -1
- data/vendor/assets/javascripts/ace/mode-objectivec.js +1 -0
- data/vendor/assets/javascripts/ace/mode-ocaml.js +1 -1
- data/vendor/assets/javascripts/ace/mode-perl.js +1 -1
- data/vendor/assets/javascripts/ace/mode-pgsql.js +1 -1
- data/vendor/assets/javascripts/ace/mode-php.js +1 -1
- data/vendor/assets/javascripts/ace/mode-powershell.js +1 -1
- data/vendor/assets/javascripts/ace/mode-python.js +1 -1
- data/vendor/assets/javascripts/ace/mode-r.js +1 -0
- data/vendor/assets/javascripts/ace/mode-rdoc.js +1 -0
- data/vendor/assets/javascripts/ace/mode-rhtml.js +1 -0
- data/vendor/assets/javascripts/ace/mode-ruby.js +1 -1
- data/vendor/assets/javascripts/ace/mode-scad.js +1 -1
- data/vendor/assets/javascripts/ace/mode-scala.js +1 -1
- data/vendor/assets/javascripts/ace/mode-scheme.js +1 -0
- data/vendor/assets/javascripts/ace/mode-scss.js +1 -1
- data/vendor/assets/javascripts/ace/mode-sh.js +1 -1
- data/vendor/assets/javascripts/ace/mode-sql.js +1 -1
- data/vendor/assets/javascripts/ace/mode-stylus.js +1 -0
- data/vendor/assets/javascripts/ace/mode-svg.js +1 -1
- data/vendor/assets/javascripts/ace/mode-tcl.js +1 -0
- data/vendor/assets/javascripts/ace/mode-tex.js +1 -0
- data/vendor/assets/javascripts/ace/mode-textile.js +1 -1
- data/vendor/assets/javascripts/ace/mode-tm_snippet.js +1 -0
- data/vendor/assets/javascripts/ace/mode-typescript.js +1 -0
- data/vendor/assets/javascripts/ace/mode-vbscript.js +1 -0
- data/vendor/assets/javascripts/ace/mode-xml.js +1 -1
- data/vendor/assets/javascripts/ace/mode-xquery.js +1 -1
- data/vendor/assets/javascripts/ace/mode-yaml.js +1 -0
- data/vendor/assets/javascripts/ace/theme-ambiance.js +1 -0
- data/vendor/assets/javascripts/ace/theme-chaos.js +1 -0
- data/vendor/assets/javascripts/ace/theme-chrome.js +1 -1
- data/vendor/assets/javascripts/ace/theme-clouds.js +1 -1
- data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +1 -1
- data/vendor/assets/javascripts/ace/theme-cobalt.js +1 -1
- data/vendor/assets/javascripts/ace/theme-crimson_editor.js +1 -1
- data/vendor/assets/javascripts/ace/theme-dawn.js +1 -1
- data/vendor/assets/javascripts/ace/theme-dreamweaver.js +1 -1
- data/vendor/assets/javascripts/ace/theme-eclipse.js +1 -1
- data/vendor/assets/javascripts/ace/theme-github.js +1 -0
- data/vendor/assets/javascripts/ace/theme-idle_fingers.js +1 -1
- data/vendor/assets/javascripts/ace/theme-kr.js +1 -0
- data/vendor/assets/javascripts/ace/theme-merbivore.js +1 -1
- data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +1 -1
- data/vendor/assets/javascripts/ace/theme-mono_industrial.js +1 -1
- data/vendor/assets/javascripts/ace/theme-monokai.js +1 -1
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +1 -1
- data/vendor/assets/javascripts/ace/theme-solarized_dark.js +1 -1
- data/vendor/assets/javascripts/ace/theme-solarized_light.js +1 -1
- data/vendor/assets/javascripts/ace/theme-textmate.js +1 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow.js +1 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +1 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -1
- data/vendor/assets/javascripts/ace/theme-twilight.js +1 -1
- data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +1 -1
- data/vendor/assets/javascripts/ace/theme-xcode.js +1 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +1 -7456
- data/vendor/assets/javascripts/ace/worker-css.js +1 -11693
- data/vendor/assets/javascripts/ace/worker-javascript.js +1 -10305
- data/vendor/assets/javascripts/ace/worker-json.js +1 -3062
- data/vendor/assets/javascripts/ace/worker-php.js +1 -0
- data/vendor/assets/javascripts/ace/worker-xquery.js +1 -0
- data/vendor/assets/javascripts/aced-rails.js.coffee +58 -0
- metadata +60 -205
- data/vendor/assets/javascripts/ace/ace-compat-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/ace-compat-uncompressed-noconflict.js +0 -480
- data/vendor/assets/javascripts/ace/ace-compat-uncompressed.js +0 -480
- data/vendor/assets/javascripts/ace/ace-compat.js +0 -1
- data/vendor/assets/javascripts/ace/ace-noconflict.js +0 -10
- data/vendor/assets/javascripts/ace/ace-uncompressed-noconflict.js +0 -15241
- data/vendor/assets/javascripts/ace/ace-uncompressed.js +0 -15241
- data/vendor/assets/javascripts/ace/keybinding-emacs-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed-noconflict.js +0 -150
- data/vendor/assets/javascripts/ace/keybinding-emacs-uncompressed.js +0 -150
- data/vendor/assets/javascripts/ace/keybinding-vim-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed-noconflict.js +0 -138
- data/vendor/assets/javascripts/ace/keybinding-vim-uncompressed.js +0 -138
- data/vendor/assets/javascripts/ace/mode-c_cpp-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed-noconflict.js +0 -918
- data/vendor/assets/javascripts/ace/mode-c_cpp-uncompressed.js +0 -918
- data/vendor/assets/javascripts/ace/mode-clojure-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-clojure-uncompressed-noconflict.js +0 -422
- data/vendor/assets/javascripts/ace/mode-clojure-uncompressed.js +0 -422
- data/vendor/assets/javascripts/ace/mode-coffee-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-coffee-uncompressed-noconflict.js +0 -605
- data/vendor/assets/javascripts/ace/mode-coffee-uncompressed.js +0 -605
- data/vendor/assets/javascripts/ace/mode-coldfusion-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed-noconflict.js +0 -2391
- data/vendor/assets/javascripts/ace/mode-coldfusion-uncompressed.js +0 -2391
- data/vendor/assets/javascripts/ace/mode-csharp-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-csharp-uncompressed-noconflict.js +0 -768
- data/vendor/assets/javascripts/ace/mode-csharp-uncompressed.js +0 -768
- data/vendor/assets/javascripts/ace/mode-css-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-css-uncompressed-noconflict.js +0 -676
- data/vendor/assets/javascripts/ace/mode-css-uncompressed.js +0 -676
- data/vendor/assets/javascripts/ace/mode-groovy-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-groovy-uncompressed-noconflict.js +0 -1298
- data/vendor/assets/javascripts/ace/mode-groovy-uncompressed.js +0 -1298
- data/vendor/assets/javascripts/ace/mode-haxe-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-haxe-uncompressed-noconflict.js +0 -768
- data/vendor/assets/javascripts/ace/mode-haxe-uncompressed.js +0 -768
- data/vendor/assets/javascripts/ace/mode-html-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-html-uncompressed-noconflict.js +0 -2407
- data/vendor/assets/javascripts/ace/mode-html-uncompressed.js +0 -2407
- data/vendor/assets/javascripts/ace/mode-java-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-java-uncompressed-noconflict.js +0 -1300
- data/vendor/assets/javascripts/ace/mode-java-uncompressed.js +0 -1300
- data/vendor/assets/javascripts/ace/mode-javascript-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-javascript-uncompressed-noconflict.js +0 -1131
- data/vendor/assets/javascripts/ace/mode-javascript-uncompressed.js +0 -1131
- data/vendor/assets/javascripts/ace/mode-json-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-json-uncompressed-noconflict.js +0 -696
- data/vendor/assets/javascripts/ace/mode-json-uncompressed.js +0 -696
- data/vendor/assets/javascripts/ace/mode-latex-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-latex-uncompressed-noconflict.js +0 -95
- data/vendor/assets/javascripts/ace/mode-latex-uncompressed.js +0 -95
- data/vendor/assets/javascripts/ace/mode-lua-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-lua-uncompressed-noconflict.js +0 -523
- data/vendor/assets/javascripts/ace/mode-lua-uncompressed.js +0 -523
- data/vendor/assets/javascripts/ace/mode-markdown-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-markdown-uncompressed-noconflict.js +0 -2849
- data/vendor/assets/javascripts/ace/mode-markdown-uncompressed.js +0 -2849
- data/vendor/assets/javascripts/ace/mode-ocaml-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed-noconflict.js +0 -539
- data/vendor/assets/javascripts/ace/mode-ocaml-uncompressed.js +0 -539
- data/vendor/assets/javascripts/ace/mode-perl-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-perl-uncompressed-noconflict.js +0 -573
- data/vendor/assets/javascripts/ace/mode-perl-uncompressed.js +0 -573
- data/vendor/assets/javascripts/ace/mode-pgsql-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed-noconflict.js +0 -1107
- data/vendor/assets/javascripts/ace/mode-pgsql-uncompressed.js +0 -1107
- data/vendor/assets/javascripts/ace/mode-php-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-php-uncompressed-noconflict.js +0 -1884
- data/vendor/assets/javascripts/ace/mode-php-uncompressed.js +0 -1884
- data/vendor/assets/javascripts/ace/mode-powershell-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-powershell-uncompressed-noconflict.js +0 -706
- data/vendor/assets/javascripts/ace/mode-powershell-uncompressed.js +0 -706
- data/vendor/assets/javascripts/ace/mode-python-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-python-uncompressed-noconflict.js +0 -506
- data/vendor/assets/javascripts/ace/mode-python-uncompressed.js +0 -506
- data/vendor/assets/javascripts/ace/mode-ruby-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-ruby-uncompressed-noconflict.js +0 -391
- data/vendor/assets/javascripts/ace/mode-ruby-uncompressed.js +0 -391
- data/vendor/assets/javascripts/ace/mode-scad-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-scad-uncompressed-noconflict.js +0 -906
- data/vendor/assets/javascripts/ace/mode-scad-uncompressed.js +0 -906
- data/vendor/assets/javascripts/ace/mode-scala-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-scala-uncompressed-noconflict.js +0 -1300
- data/vendor/assets/javascripts/ace/mode-scala-uncompressed.js +0 -1300
- data/vendor/assets/javascripts/ace/mode-scss-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-scss-uncompressed-noconflict.js +0 -678
- data/vendor/assets/javascripts/ace/mode-scss-uncompressed.js +0 -678
- data/vendor/assets/javascripts/ace/mode-sh-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-sh-uncompressed-noconflict.js +0 -281
- data/vendor/assets/javascripts/ace/mode-sh-uncompressed.js +0 -281
- data/vendor/assets/javascripts/ace/mode-sql-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-sql-uncompressed-noconflict.js +0 -159
- data/vendor/assets/javascripts/ace/mode-sql-uncompressed.js +0 -159
- data/vendor/assets/javascripts/ace/mode-svg-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-svg-uncompressed-noconflict.js +0 -2034
- data/vendor/assets/javascripts/ace/mode-svg-uncompressed.js +0 -2034
- data/vendor/assets/javascripts/ace/mode-text-noconflict.js +0 -0
- data/vendor/assets/javascripts/ace/mode-text-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/ace/mode-text-uncompressed.js +0 -0
- data/vendor/assets/javascripts/ace/mode-textile-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-textile-uncompressed-noconflict.js +0 -254
- data/vendor/assets/javascripts/ace/mode-textile-uncompressed.js +0 -254
- data/vendor/assets/javascripts/ace/mode-xml-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-xml-uncompressed-noconflict.js +0 -1001
- data/vendor/assets/javascripts/ace/mode-xml-uncompressed.js +0 -1001
- data/vendor/assets/javascripts/ace/mode-xquery-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/mode-xquery-uncompressed-noconflict.js +0 -538
- data/vendor/assets/javascripts/ace/mode-xquery-uncompressed.js +0 -538
- data/vendor/assets/javascripts/ace/theme-chrome-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-chrome-uncompressed-noconflict.js +0 -212
- data/vendor/assets/javascripts/ace/theme-chrome-uncompressed.js +0 -212
- data/vendor/assets/javascripts/ace/theme-clouds-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-clouds-uncompressed-noconflict.js +0 -155
- data/vendor/assets/javascripts/ace/theme-clouds-uncompressed.js +0 -155
- data/vendor/assets/javascripts/ace/theme-clouds_midnight-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed-noconflict.js +0 -156
- data/vendor/assets/javascripts/ace/theme-clouds_midnight-uncompressed.js +0 -156
- data/vendor/assets/javascripts/ace/theme-cobalt-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed-noconflict.js +0 -174
- data/vendor/assets/javascripts/ace/theme-cobalt-uncompressed.js +0 -174
- data/vendor/assets/javascripts/ace/theme-crimson_editor-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed-noconflict.js +0 -198
- data/vendor/assets/javascripts/ace/theme-crimson_editor-uncompressed.js +0 -198
- data/vendor/assets/javascripts/ace/theme-dawn-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-dawn-uncompressed-noconflict.js +0 -178
- data/vendor/assets/javascripts/ace/theme-dawn-uncompressed.js +0 -178
- data/vendor/assets/javascripts/ace/theme-dreamweaver-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed-noconflict.js +0 -227
- data/vendor/assets/javascripts/ace/theme-dreamweaver-uncompressed.js +0 -227
- data/vendor/assets/javascripts/ace/theme-eclipse-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed-noconflict.js +0 -147
- data/vendor/assets/javascripts/ace/theme-eclipse-uncompressed.js +0 -147
- data/vendor/assets/javascripts/ace/theme-idle_fingers-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed-noconflict.js +0 -166
- data/vendor/assets/javascripts/ace/theme-idle_fingers-uncompressed.js +0 -166
- data/vendor/assets/javascripts/ace/theme-kr_theme-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed-noconflict.js +0 -169
- data/vendor/assets/javascripts/ace/theme-kr_theme-uncompressed.js +0 -169
- data/vendor/assets/javascripts/ace/theme-kr_theme.js +0 -1
- data/vendor/assets/javascripts/ace/theme-merbivore-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed-noconflict.js +0 -169
- data/vendor/assets/javascripts/ace/theme-merbivore-uncompressed.js +0 -169
- data/vendor/assets/javascripts/ace/theme-merbivore_soft-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed-noconflict.js +0 -175
- data/vendor/assets/javascripts/ace/theme-merbivore_soft-uncompressed.js +0 -175
- data/vendor/assets/javascripts/ace/theme-mono_industrial-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed-noconflict.js +0 -177
- data/vendor/assets/javascripts/ace/theme-mono_industrial-uncompressed.js +0 -177
- data/vendor/assets/javascripts/ace/theme-monokai-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-monokai-uncompressed-noconflict.js +0 -183
- data/vendor/assets/javascripts/ace/theme-monokai-uncompressed.js +0 -183
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed-noconflict.js +0 -179
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark-uncompressed.js +0 -179
- data/vendor/assets/javascripts/ace/theme-solarized_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed-noconflict.js +0 -168
- data/vendor/assets/javascripts/ace/theme-solarized_dark-uncompressed.js +0 -168
- data/vendor/assets/javascripts/ace/theme-solarized_light-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed-noconflict.js +0 -167
- data/vendor/assets/javascripts/ace/theme-solarized_light-uncompressed.js +0 -167
- data/vendor/assets/javascripts/ace/theme-textmate-noconflict.js +0 -0
- data/vendor/assets/javascripts/ace/theme-textmate-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/ace/theme-textmate-uncompressed.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed-noconflict.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow-uncompressed.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed-noconflict.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night-uncompressed.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue-uncompressed.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright-uncompressed.js +0 -201
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -197
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties-uncompressed.js +0 -197
- data/vendor/assets/javascripts/ace/theme-twilight-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-twilight-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/ace/theme-twilight-uncompressed.js +0 -191
- data/vendor/assets/javascripts/ace/theme-vibrant_ink-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed-noconflict.js +0 -170
- data/vendor/assets/javascripts/ace/theme-vibrant_ink-uncompressed.js +0 -170
- data/vendor/assets/javascripts/aced-api.js.coffee +0 -116
- data/vendor/assets/javascripts/jquery.random.js +0 -31
@@ -1,676 +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
|
-
("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|" +
|
159
|
-
"appearance|azimuth|background-attachment|background-color|background-image|" +
|
160
|
-
"background-origin|background-position|background-repeat|background|border-bottom-color|" +
|
161
|
-
"border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
|
162
|
-
"border-color|border-left-color|border-left-style|border-left-width|" +
|
163
|
-
"border-left|border-right-color|border-right-style|border-right-width|" +
|
164
|
-
"border-right|border-spacing|border-style|border-top-color|" +
|
165
|
-
"border-top-style|border-top-width|border-top|border-width|border|" +
|
166
|
-
"bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
|
167
|
-
"counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
|
168
|
-
"elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
|
169
|
-
"font-stretch|font-style|font-variant|font-weight|font|height|left|" +
|
170
|
-
"letter-spacing|line-height|list-style-image|list-style-position|" +
|
171
|
-
"list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
|
172
|
-
"margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
|
173
|
-
"min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|" +
|
174
|
-
"outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
|
175
|
-
"padding-left|padding-right|padding-top|padding|page-break-after|" +
|
176
|
-
"page-break-before|page-break-inside|page|pause-after|pause-before|" +
|
177
|
-
"pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|" +
|
178
|
-
"size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
|
179
|
-
"stress|table-layout|text-align|text-decoration|text-indent|" +
|
180
|
-
"text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|" +
|
181
|
-
"visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
|
182
|
-
"z-index").split("|")
|
183
|
-
);
|
184
|
-
|
185
|
-
var functions = lang.arrayToMap(
|
186
|
-
("rgb|rgba|url|attr|counter|counters").split("|")
|
187
|
-
);
|
188
|
-
|
189
|
-
var constants = lang.arrayToMap(
|
190
|
-
("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
|
191
|
-
"block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
|
192
|
-
"char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
|
193
|
-
"decimal-leading-zero|decimal|default|disabled|disc|" +
|
194
|
-
"distribute-all-lines|distribute-letter|distribute-space|" +
|
195
|
-
"distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
|
196
|
-
"hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
|
197
|
-
"ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
|
198
|
-
"ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
|
199
|
-
"inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
|
200
|
-
"keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
|
201
|
-
"lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
|
202
|
-
"medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
|
203
|
-
"nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
|
204
|
-
"overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
|
205
|
-
"ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
|
206
|
-
"solid|square|static|strict|super|sw-resize|table-footer-group|" +
|
207
|
-
"table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
|
208
|
-
"transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
|
209
|
-
"vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
|
210
|
-
"zero").split("|")
|
211
|
-
);
|
212
|
-
|
213
|
-
var colors = lang.arrayToMap(
|
214
|
-
("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
|
215
|
-
"purple|red|silver|teal|white|yellow").split("|")
|
216
|
-
);
|
217
|
-
|
218
|
-
var fonts = lang.arrayToMap(
|
219
|
-
("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|" +
|
220
|
-
"symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|" +
|
221
|
-
"serif|monospace").split("|")
|
222
|
-
);
|
223
|
-
|
224
|
-
// regexp must not have capturing parentheses. Use (?:) instead.
|
225
|
-
// regexps are ordered -> the first match is used
|
226
|
-
|
227
|
-
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
|
228
|
-
|
229
|
-
var base_ruleset = [
|
230
|
-
{
|
231
|
-
token : "comment", // multi line comment
|
232
|
-
merge : true,
|
233
|
-
regex : "\\/\\*",
|
234
|
-
next : "ruleset_comment"
|
235
|
-
},{
|
236
|
-
token : "string", // single line
|
237
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
238
|
-
}, {
|
239
|
-
token : "string", // single line
|
240
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
241
|
-
}, {
|
242
|
-
token : ["constant.numeric", "keyword"],
|
243
|
-
regex : "(" + numRe + ")(em|ex|px|ch|cm|mm|in|pt|pc|deg|rad|dpi|grad|ms|s|hz|khz|%)"
|
244
|
-
}, {
|
245
|
-
token : ["constant.numeric"],
|
246
|
-
regex : "([0-9]+)"
|
247
|
-
}, {
|
248
|
-
token : "constant.numeric", // hex6 color
|
249
|
-
regex : "#[a-f0-9]{6}"
|
250
|
-
}, {
|
251
|
-
token : "constant.numeric", // hex3 color
|
252
|
-
regex : "#[a-f0-9]{3}"
|
253
|
-
}, {
|
254
|
-
token : function(value) {
|
255
|
-
if (properties.hasOwnProperty(value.toLowerCase())) {
|
256
|
-
return "support.type";
|
257
|
-
}
|
258
|
-
else if (functions.hasOwnProperty(value.toLowerCase())) {
|
259
|
-
return "support.function";
|
260
|
-
}
|
261
|
-
else if (constants.hasOwnProperty(value.toLowerCase())) {
|
262
|
-
return "support.constant";
|
263
|
-
}
|
264
|
-
else if (colors.hasOwnProperty(value.toLowerCase())) {
|
265
|
-
return "support.constant.color";
|
266
|
-
}
|
267
|
-
else if (fonts.hasOwnProperty(value.toLowerCase())) {
|
268
|
-
return "support.constant.fonts";
|
269
|
-
}
|
270
|
-
else {
|
271
|
-
return "text";
|
272
|
-
}
|
273
|
-
},
|
274
|
-
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
|
275
|
-
}
|
276
|
-
];
|
277
|
-
|
278
|
-
var ruleset = lang.copyArray(base_ruleset);
|
279
|
-
ruleset.unshift({
|
280
|
-
token : "paren.rparen",
|
281
|
-
regex : "\\}",
|
282
|
-
next: "start"
|
283
|
-
});
|
284
|
-
|
285
|
-
var media_ruleset = lang.copyArray( base_ruleset );
|
286
|
-
media_ruleset.unshift({
|
287
|
-
token : "paren.rparen",
|
288
|
-
regex : "\\}",
|
289
|
-
next: "media"
|
290
|
-
});
|
291
|
-
|
292
|
-
var base_comment = [{
|
293
|
-
token : "comment", // comment spanning whole line
|
294
|
-
merge : true,
|
295
|
-
regex : ".+"
|
296
|
-
}];
|
297
|
-
|
298
|
-
var comment = lang.copyArray(base_comment);
|
299
|
-
comment.unshift({
|
300
|
-
token : "comment", // closing comment
|
301
|
-
regex : ".*?\\*\\/",
|
302
|
-
next : "start"
|
303
|
-
});
|
304
|
-
|
305
|
-
var media_comment = lang.copyArray(base_comment);
|
306
|
-
media_comment.unshift({
|
307
|
-
token : "comment", // closing comment
|
308
|
-
regex : ".*?\\*\\/",
|
309
|
-
next : "media"
|
310
|
-
});
|
311
|
-
|
312
|
-
var ruleset_comment = lang.copyArray(base_comment);
|
313
|
-
ruleset_comment.unshift({
|
314
|
-
token : "comment", // closing comment
|
315
|
-
regex : ".*?\\*\\/",
|
316
|
-
next : "ruleset"
|
317
|
-
});
|
318
|
-
|
319
|
-
this.$rules = {
|
320
|
-
"start" : [{
|
321
|
-
token : "comment", // multi line comment
|
322
|
-
merge : true,
|
323
|
-
regex : "\\/\\*",
|
324
|
-
next : "comment"
|
325
|
-
}, {
|
326
|
-
token: "paren.lparen",
|
327
|
-
regex: "\\{",
|
328
|
-
next: "ruleset"
|
329
|
-
}, {
|
330
|
-
token: "string",
|
331
|
-
regex: "@.*?{",
|
332
|
-
next: "media"
|
333
|
-
},{
|
334
|
-
token: "keyword",
|
335
|
-
regex: "#[a-z0-9-_]+"
|
336
|
-
},{
|
337
|
-
token: "variable",
|
338
|
-
regex: "\\.[a-z0-9-_]+"
|
339
|
-
},{
|
340
|
-
token: "string",
|
341
|
-
regex: ":[a-z0-9-_]+"
|
342
|
-
},{
|
343
|
-
token: "constant",
|
344
|
-
regex: "[a-z0-9-_]+"
|
345
|
-
}],
|
346
|
-
|
347
|
-
"media" : [ {
|
348
|
-
token : "comment", // multi line comment
|
349
|
-
merge : true,
|
350
|
-
regex : "\\/\\*",
|
351
|
-
next : "media_comment"
|
352
|
-
}, {
|
353
|
-
token: "paren.lparen",
|
354
|
-
regex: "\\{",
|
355
|
-
next: "media_ruleset"
|
356
|
-
},{
|
357
|
-
token: "string",
|
358
|
-
regex: "\\}",
|
359
|
-
next: "start"
|
360
|
-
},{
|
361
|
-
token: "keyword",
|
362
|
-
regex: "#[a-z0-9-_]+"
|
363
|
-
},{
|
364
|
-
token: "variable",
|
365
|
-
regex: "\\.[a-z0-9-_]+"
|
366
|
-
},{
|
367
|
-
token: "string",
|
368
|
-
regex: ":[a-z0-9-_]+"
|
369
|
-
},{
|
370
|
-
token: "constant",
|
371
|
-
regex: "[a-z0-9-_]+"
|
372
|
-
}],
|
373
|
-
|
374
|
-
"comment" : comment,
|
375
|
-
|
376
|
-
"ruleset" : ruleset,
|
377
|
-
"ruleset_comment" : ruleset_comment,
|
378
|
-
|
379
|
-
"media_ruleset" : media_ruleset,
|
380
|
-
"media_comment" : media_comment
|
381
|
-
};
|
382
|
-
};
|
383
|
-
|
384
|
-
oop.inherits(CssHighlightRules, TextHighlightRules);
|
385
|
-
|
386
|
-
exports.CssHighlightRules = CssHighlightRules;
|
387
|
-
|
388
|
-
});
|
389
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
390
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
391
|
-
*
|
392
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
393
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
394
|
-
* the License. You may obtain a copy of the License at
|
395
|
-
* http://www.mozilla.org/MPL/
|
396
|
-
*
|
397
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
398
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
399
|
-
* for the specific language governing rights and limitations under the
|
400
|
-
* License.
|
401
|
-
*
|
402
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
403
|
-
*
|
404
|
-
* The Initial Developer of the Original Code is
|
405
|
-
* Ajax.org B.V.
|
406
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
407
|
-
* the Initial Developer. All Rights Reserved.
|
408
|
-
*
|
409
|
-
* Contributor(s):
|
410
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
411
|
-
*
|
412
|
-
* Alternatively, the contents of this file may be used under the terms of
|
413
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
414
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
415
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
416
|
-
* of those above. If you wish to allow use of your version of this file only
|
417
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
418
|
-
* use your version of this file under the terms of the MPL, indicate your
|
419
|
-
* decision by deleting the provisions above and replace them with the notice
|
420
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
421
|
-
* the provisions above, a recipient may use your version of this file under
|
422
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
423
|
-
*
|
424
|
-
* ***** END LICENSE BLOCK ***** */
|
425
|
-
|
426
|
-
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
427
|
-
"use strict";
|
428
|
-
|
429
|
-
var Range = require("../range").Range;
|
430
|
-
|
431
|
-
var MatchingBraceOutdent = function() {};
|
432
|
-
|
433
|
-
(function() {
|
434
|
-
|
435
|
-
this.checkOutdent = function(line, input) {
|
436
|
-
if (! /^\s+$/.test(line))
|
437
|
-
return false;
|
438
|
-
|
439
|
-
return /^\s*\}/.test(input);
|
440
|
-
};
|
441
|
-
|
442
|
-
this.autoOutdent = function(doc, row) {
|
443
|
-
var line = doc.getLine(row);
|
444
|
-
var match = line.match(/^(\s*\})/);
|
445
|
-
|
446
|
-
if (!match) return 0;
|
447
|
-
|
448
|
-
var column = match[1].length;
|
449
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
450
|
-
|
451
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
452
|
-
|
453
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
454
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
455
|
-
};
|
456
|
-
|
457
|
-
this.$getIndent = function(line) {
|
458
|
-
var match = line.match(/^(\s+)/);
|
459
|
-
if (match) {
|
460
|
-
return match[1];
|
461
|
-
}
|
462
|
-
|
463
|
-
return "";
|
464
|
-
};
|
465
|
-
|
466
|
-
}).call(MatchingBraceOutdent.prototype);
|
467
|
-
|
468
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
469
|
-
});
|
470
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
471
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
472
|
-
*
|
473
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
474
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
475
|
-
* the License. You may obtain a copy of the License at
|
476
|
-
* http://www.mozilla.org/MPL/
|
477
|
-
*
|
478
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
479
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
480
|
-
* for the specific language governing rights and limitations under the
|
481
|
-
* License.
|
482
|
-
*
|
483
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
484
|
-
*
|
485
|
-
* The Initial Developer of the Original Code is
|
486
|
-
* Ajax.org B.V.
|
487
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
488
|
-
* the Initial Developer. All Rights Reserved.
|
489
|
-
*
|
490
|
-
* Contributor(s):
|
491
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
492
|
-
*
|
493
|
-
* Alternatively, the contents of this file may be used under the terms of
|
494
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
495
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
496
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
497
|
-
* of those above. If you wish to allow use of your version of this file only
|
498
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
499
|
-
* use your version of this file under the terms of the MPL, indicate your
|
500
|
-
* decision by deleting the provisions above and replace them with the notice
|
501
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
502
|
-
* the provisions above, a recipient may use your version of this file under
|
503
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
504
|
-
*
|
505
|
-
* ***** END LICENSE BLOCK ***** */
|
506
|
-
|
507
|
-
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
508
|
-
"use strict";
|
509
|
-
|
510
|
-
var oop = require("../../lib/oop");
|
511
|
-
var Range = require("../../range").Range;
|
512
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
513
|
-
|
514
|
-
var FoldMode = exports.FoldMode = function() {};
|
515
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
516
|
-
|
517
|
-
(function() {
|
518
|
-
|
519
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
520
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
521
|
-
|
522
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
523
|
-
var line = session.getLine(row);
|
524
|
-
var match = line.match(this.foldingStartMarker);
|
525
|
-
if (match) {
|
526
|
-
var i = match.index;
|
527
|
-
|
528
|
-
if (match[1])
|
529
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
530
|
-
|
531
|
-
var range = session.getCommentFoldRange(row, i + match[0].length);
|
532
|
-
range.end.column -= 2;
|
533
|
-
return range;
|
534
|
-
}
|
535
|
-
|
536
|
-
if (foldStyle !== "markbeginend")
|
537
|
-
return;
|
538
|
-
|
539
|
-
var match = line.match(this.foldingStopMarker);
|
540
|
-
if (match) {
|
541
|
-
var i = match.index + match[0].length;
|
542
|
-
|
543
|
-
if (match[2]) {
|
544
|
-
var range = session.getCommentFoldRange(row, i);
|
545
|
-
range.end.column -= 2;
|
546
|
-
return range;
|
547
|
-
}
|
548
|
-
|
549
|
-
var end = {row: row, column: i};
|
550
|
-
var start = session.$findOpeningBracket(match[1], end);
|
551
|
-
|
552
|
-
if (!start)
|
553
|
-
return;
|
554
|
-
|
555
|
-
start.column++;
|
556
|
-
end.column--;
|
557
|
-
|
558
|
-
return Range.fromPoints(start, end);
|
559
|
-
}
|
560
|
-
};
|
561
|
-
|
562
|
-
}).call(FoldMode.prototype);
|
563
|
-
|
564
|
-
});/* ***** BEGIN LICENSE BLOCK *****
|
565
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
566
|
-
*
|
567
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
568
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
569
|
-
* the License. You may obtain a copy of the License at
|
570
|
-
* http://www.mozilla.org/MPL/
|
571
|
-
*
|
572
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
573
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
574
|
-
* for the specific language governing rights and limitations under the
|
575
|
-
* License.
|
576
|
-
*
|
577
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
578
|
-
*
|
579
|
-
* The Initial Developer of the Original Code is
|
580
|
-
* Ajax.org B.V.
|
581
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
582
|
-
* the Initial Developer. All Rights Reserved.
|
583
|
-
*
|
584
|
-
* Contributor(s):
|
585
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
586
|
-
*
|
587
|
-
* Alternatively, the contents of this file may be used under the terms of
|
588
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
589
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
590
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
591
|
-
* of those above. If you wish to allow use of your version of this file only
|
592
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
593
|
-
* use your version of this file under the terms of the MPL, indicate your
|
594
|
-
* decision by deleting the provisions above and replace them with the notice
|
595
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
596
|
-
* the provisions above, a recipient may use your version of this file under
|
597
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
598
|
-
*
|
599
|
-
* ***** END LICENSE BLOCK ***** */
|
600
|
-
|
601
|
-
define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
602
|
-
"use strict";
|
603
|
-
|
604
|
-
var Range = require("../../range").Range;
|
605
|
-
|
606
|
-
var FoldMode = exports.FoldMode = function() {};
|
607
|
-
|
608
|
-
(function() {
|
609
|
-
|
610
|
-
this.foldingStartMarker = null;
|
611
|
-
this.foldingStopMarker = null;
|
612
|
-
|
613
|
-
// must return "" if there's no fold, to enable caching
|
614
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
615
|
-
var line = session.getLine(row);
|
616
|
-
if (this.foldingStartMarker.test(line))
|
617
|
-
return "start";
|
618
|
-
if (foldStyle == "markbeginend"
|
619
|
-
&& this.foldingStopMarker
|
620
|
-
&& this.foldingStopMarker.test(line))
|
621
|
-
return "end";
|
622
|
-
return "";
|
623
|
-
};
|
624
|
-
|
625
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
626
|
-
return null;
|
627
|
-
};
|
628
|
-
|
629
|
-
this.indentationBlock = function(session, row, column) {
|
630
|
-
var re = /^\s*/;
|
631
|
-
var startRow = row;
|
632
|
-
var endRow = row;
|
633
|
-
var line = session.getLine(row);
|
634
|
-
var startColumn = column || line.length;
|
635
|
-
var startLevel = line.match(re)[0].length;
|
636
|
-
var maxRow = session.getLength()
|
637
|
-
|
638
|
-
while (++row < maxRow) {
|
639
|
-
line = session.getLine(row);
|
640
|
-
var level = line.match(re)[0].length;
|
641
|
-
|
642
|
-
if (level == line.length)
|
643
|
-
continue;
|
644
|
-
|
645
|
-
if (level <= startLevel)
|
646
|
-
break;
|
647
|
-
|
648
|
-
endRow = row;
|
649
|
-
}
|
650
|
-
|
651
|
-
if (endRow > startRow) {
|
652
|
-
var endColumn = session.getLine(endRow).length;
|
653
|
-
return new Range(startRow, startColumn, endRow, endColumn);
|
654
|
-
}
|
655
|
-
};
|
656
|
-
|
657
|
-
this.openingBracketBlock = function(session, bracket, row, column) {
|
658
|
-
var start = {row: row, column: column + 1};
|
659
|
-
var end = session.$findClosingBracket(bracket, start);
|
660
|
-
if (!end)
|
661
|
-
return;
|
662
|
-
|
663
|
-
var fw = session.foldWidgets[end.row];
|
664
|
-
if (fw == null)
|
665
|
-
fw = this.getFoldWidget(session, end.row);
|
666
|
-
|
667
|
-
if (fw == "start") {
|
668
|
-
end.row --;
|
669
|
-
end.column = session.getLine(end.row).length;
|
670
|
-
}
|
671
|
-
return Range.fromPoints(start, end);
|
672
|
-
};
|
673
|
-
|
674
|
-
}).call(FoldMode.prototype);
|
675
|
-
|
676
|
-
});
|