ace-rails-ap 4.1.1 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace/ace.js +529 -133
- data/vendor/assets/javascripts/ace/ext-beautify.js +0 -0
- data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -0
- data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +0 -0
- data/vendor/assets/javascripts/ace/ext-emmet.js +17 -12
- data/vendor/assets/javascripts/ace/ext-error_marker.js +0 -0
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +0 -0
- data/vendor/assets/javascripts/ace/ext-language_tools.js +12 -4
- data/vendor/assets/javascripts/ace/ext-linking.js +0 -0
- data/vendor/assets/javascripts/ace/ext-modelist.js +11 -5
- data/vendor/assets/javascripts/ace/ext-old_ie.js +1 -0
- data/vendor/assets/javascripts/ace/ext-searchbox.js +1 -0
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +12 -5
- data/vendor/assets/javascripts/ace/ext-spellcheck.js +0 -0
- data/vendor/assets/javascripts/ace/ext-split.js +0 -0
- data/vendor/assets/javascripts/ace/ext-static_highlight.js +0 -0
- data/vendor/assets/javascripts/ace/ext-statusbar.js +0 -0
- data/vendor/assets/javascripts/ace/ext-textarea.js +0 -0
- data/vendor/assets/javascripts/ace/ext-themelist.js +1 -0
- data/vendor/assets/javascripts/ace/ext-whitespace.js +0 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +0 -0
- data/vendor/assets/javascripts/ace/keybinding-vim.js +28 -18
- data/vendor/assets/javascripts/ace/mode-abap.js +4 -4
- data/vendor/assets/javascripts/ace/mode-abc.js +1 -0
- data/vendor/assets/javascripts/ace/mode-actionscript.js +1 -0
- data/vendor/assets/javascripts/ace/mode-ada.js +2 -2
- data/vendor/assets/javascripts/ace/mode-apache_conf.js +1 -0
- data/vendor/assets/javascripts/ace/mode-applescript.js +2 -2
- data/vendor/assets/javascripts/ace/mode-asciidoc.js +1 -1
- data/vendor/assets/javascripts/ace/mode-assembly_x86.js +1 -0
- data/vendor/assets/javascripts/ace/mode-autohotkey.js +1 -0
- data/vendor/assets/javascripts/ace/mode-batchfile.js +1 -0
- data/vendor/assets/javascripts/ace/mode-bro.js +327 -0
- data/vendor/assets/javascripts/ace/mode-c9search.js +31 -14
- data/vendor/assets/javascripts/ace/mode-c_cpp.js +4 -361
- data/vendor/assets/javascripts/ace/mode-cirru.js +7 -6
- data/vendor/assets/javascripts/ace/mode-clojure.js +4 -3
- data/vendor/assets/javascripts/ace/mode-cobol.js +2 -2
- data/vendor/assets/javascripts/ace/mode-coffee.js +2 -3
- data/vendor/assets/javascripts/ace/mode-coldfusion.js +16 -370
- data/vendor/assets/javascripts/ace/mode-csharp.js +0 -357
- data/vendor/assets/javascripts/ace/mode-css.js +0 -357
- data/vendor/assets/javascripts/ace/mode-curly.js +16 -371
- data/vendor/assets/javascripts/ace/mode-d.js +2 -1
- data/vendor/assets/javascripts/ace/mode-dart.js +4 -361
- data/vendor/assets/javascripts/ace/mode-diff.js +0 -0
- data/vendor/assets/javascripts/ace/mode-django.js +15 -369
- data/vendor/assets/javascripts/ace/mode-dockerfile.js +3 -360
- data/vendor/assets/javascripts/ace/mode-dot.js +2 -1
- data/vendor/assets/javascripts/ace/mode-drools.js +459 -0
- data/vendor/assets/javascripts/ace/mode-eiffel.js +2 -2
- data/vendor/assets/javascripts/ace/mode-ejs.js +19 -373
- data/vendor/assets/javascripts/ace/mode-elixir.js +1 -0
- data/vendor/assets/javascripts/ace/mode-elm.js +5 -2
- data/vendor/assets/javascripts/ace/mode-erlang.js +4 -3
- data/vendor/assets/javascripts/ace/mode-forth.js +14 -13
- data/vendor/assets/javascripts/ace/mode-fortran.js +423 -0
- data/vendor/assets/javascripts/ace/mode-ftl.js +7 -6
- data/vendor/assets/javascripts/ace/mode-gcode.js +1 -0
- data/vendor/assets/javascripts/ace/mode-gherkin.js +2 -1
- data/vendor/assets/javascripts/ace/mode-gitignore.js +1 -0
- data/vendor/assets/javascripts/ace/mode-glsl.js +4 -361
- data/vendor/assets/javascripts/ace/mode-gobstones.js +8 -365
- data/vendor/assets/javascripts/ace/mode-golang.js +0 -357
- data/vendor/assets/javascripts/ace/mode-groovy.js +7 -365
- data/vendor/assets/javascripts/ace/mode-haml.js +12 -11
- data/vendor/assets/javascripts/ace/mode-handlebars.js +15 -371
- data/vendor/assets/javascripts/ace/mode-haskell.js +29 -28
- data/vendor/assets/javascripts/ace/mode-haskell_cabal.js +134 -0
- data/vendor/assets/javascripts/ace/mode-haxe.js +0 -357
- data/vendor/assets/javascripts/ace/mode-hjson.js +346 -0
- data/vendor/assets/javascripts/ace/mode-html.js +15 -369
- data/vendor/assets/javascripts/ace/mode-html_elixir.js +16 -369
- data/vendor/assets/javascripts/ace/mode-html_ruby.js +18 -372
- data/vendor/assets/javascripts/ace/mode-ini.js +1 -0
- data/vendor/assets/javascripts/ace/mode-io.js +3 -3
- data/vendor/assets/javascripts/ace/mode-jack.js +0 -357
- data/vendor/assets/javascripts/ace/mode-jade.js +11 -12
- data/vendor/assets/javascripts/ace/mode-java.js +7 -365
- data/vendor/assets/javascripts/ace/mode-javascript.js +7 -365
- data/vendor/assets/javascripts/ace/mode-json.js +0 -357
- data/vendor/assets/javascripts/ace/mode-jsoniq.js +5 -358
- data/vendor/assets/javascripts/ace/mode-jsp.js +6 -363
- data/vendor/assets/javascripts/ace/mode-jsx.js +0 -357
- data/vendor/assets/javascripts/ace/mode-julia.js +1 -0
- data/vendor/assets/javascripts/ace/mode-kotlin.js +786 -0
- data/vendor/assets/javascripts/ace/mode-latex.js +2 -2
- data/vendor/assets/javascripts/ace/mode-lean.js +0 -0
- data/vendor/assets/javascripts/ace/mode-less.js +0 -357
- data/vendor/assets/javascripts/ace/mode-liquid.js +9 -9
- data/vendor/assets/javascripts/ace/mode-lisp.js +1 -0
- data/vendor/assets/javascripts/ace/mode-live_script.js +0 -0
- data/vendor/assets/javascripts/ace/mode-livescript.js +0 -0
- data/vendor/assets/javascripts/ace/mode-logiql.js +0 -357
- data/vendor/assets/javascripts/ace/mode-lsl.js +0 -357
- data/vendor/assets/javascripts/ace/mode-lua.js +1 -0
- data/vendor/assets/javascripts/ace/mode-luapage.js +16 -369
- data/vendor/assets/javascripts/ace/mode-lucene.js +1 -0
- data/vendor/assets/javascripts/ace/mode-makefile.js +3 -2
- data/vendor/assets/javascripts/ace/mode-markdown.js +17 -370
- data/vendor/assets/javascripts/ace/mode-mask.js +10 -367
- data/vendor/assets/javascripts/ace/mode-matlab.js +21 -21
- data/vendor/assets/javascripts/ace/mode-maze.js +1 -0
- data/vendor/assets/javascripts/ace/mode-mel.js +0 -357
- data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -0
- data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -0
- data/vendor/assets/javascripts/ace/mode-mushcode.js +2 -1
- data/vendor/assets/javascripts/ace/mode-mysql.js +2 -2
- data/vendor/assets/javascripts/ace/mode-nix.js +5 -361
- data/vendor/assets/javascripts/ace/mode-nsis.js +11 -10
- data/vendor/assets/javascripts/ace/mode-objectivec.js +9 -8
- data/vendor/assets/javascripts/ace/mode-ocaml.js +1 -0
- data/vendor/assets/javascripts/ace/mode-pascal.js +1 -0
- data/vendor/assets/javascripts/ace/mode-perl.js +3 -3
- data/vendor/assets/javascripts/ace/mode-pgsql.js +8 -8
- data/vendor/assets/javascripts/ace/mode-php.js +197 -723
- data/vendor/assets/javascripts/ace/mode-plain_text.js +0 -0
- data/vendor/assets/javascripts/ace/mode-powershell.js +0 -357
- data/vendor/assets/javascripts/ace/mode-praat.js +4 -4
- data/vendor/assets/javascripts/ace/mode-prolog.js +1 -0
- data/vendor/assets/javascripts/ace/mode-properties.js +1 -0
- data/vendor/assets/javascripts/ace/mode-protobuf.js +4 -361
- data/vendor/assets/javascripts/ace/mode-python.js +2 -1
- data/vendor/assets/javascripts/ace/mode-r.js +5 -6
- data/vendor/assets/javascripts/ace/mode-razor.js +26 -370
- data/vendor/assets/javascripts/ace/mode-rdoc.js +4 -4
- data/vendor/assets/javascripts/ace/mode-rhtml.js +17 -371
- data/vendor/assets/javascripts/ace/mode-rst.js +3 -3
- data/vendor/assets/javascripts/ace/mode-ruby.js +3 -360
- data/vendor/assets/javascripts/ace/mode-rust.js +5 -4
- data/vendor/assets/javascripts/ace/mode-sass.js +1 -0
- data/vendor/assets/javascripts/ace/mode-scad.js +1 -359
- data/vendor/assets/javascripts/ace/mode-scala.js +9 -369
- data/vendor/assets/javascripts/ace/mode-scheme.js +1 -0
- data/vendor/assets/javascripts/ace/mode-scss.js +0 -357
- data/vendor/assets/javascripts/ace/mode-sh.js +3 -360
- data/vendor/assets/javascripts/ace/mode-sjs.js +7 -365
- data/vendor/assets/javascripts/ace/mode-smarty.js +15 -369
- data/vendor/assets/javascripts/ace/mode-snippets.js +1 -0
- data/vendor/assets/javascripts/ace/mode-soy_template.js +15 -369
- data/vendor/assets/javascripts/ace/mode-space.js +1 -0
- data/vendor/assets/javascripts/ace/mode-sql.js +2 -2
- data/vendor/assets/javascripts/ace/mode-sqlserver.js +2 -2
- data/vendor/assets/javascripts/ace/mode-stylus.js +1 -0
- data/vendor/assets/javascripts/ace/mode-svg.js +12 -366
- data/vendor/assets/javascripts/ace/mode-swift.js +2 -358
- data/vendor/assets/javascripts/ace/mode-swig.js +0 -0
- data/vendor/assets/javascripts/ace/mode-tcl.js +2 -1
- data/vendor/assets/javascripts/ace/mode-tex.js +3 -2
- data/vendor/assets/javascripts/ace/mode-text.js +0 -0
- data/vendor/assets/javascripts/ace/mode-textile.js +1 -0
- data/vendor/assets/javascripts/ace/mode-toml.js +1 -0
- data/vendor/assets/javascripts/ace/mode-tsx.js +884 -0
- data/vendor/assets/javascripts/ace/mode-twig.js +16 -370
- data/vendor/assets/javascripts/ace/mode-typescript.js +8 -366
- data/vendor/assets/javascripts/ace/mode-vala.js +1 -358
- data/vendor/assets/javascripts/ace/mode-vbscript.js +44 -71
- data/vendor/assets/javascripts/ace/mode-velocity.js +15 -369
- data/vendor/assets/javascripts/ace/mode-verilog.js +2 -1
- data/vendor/assets/javascripts/ace/mode-vhdl.js +2 -2
- data/vendor/assets/javascripts/ace/mode-wollok.js +7 -365
- data/vendor/assets/javascripts/ace/mode-xml.js +5 -1
- data/vendor/assets/javascripts/ace/mode-xquery.js +32 -369
- data/vendor/assets/javascripts/ace/mode-yaml.js +4 -3
- data/vendor/assets/javascripts/ace/snippets/abap.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/abc.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/actionscript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/ada.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/apache_conf.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/applescript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/asciidoc.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/autohotkey.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/batchfile.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/bro.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/c9search.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/c_cpp.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/cirru.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/clojure.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/cobol.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/coffee.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/coldfusion.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/csharp.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/css.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/curly.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/d.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/dart.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/diff.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/django.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/dockerfile.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/dot.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/drools.js +26 -0
- data/vendor/assets/javascripts/ace/snippets/eiffel.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/ejs.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/elixir.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/elm.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/erlang.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/forth.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/fortran.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/ftl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/gcode.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/gherkin.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/gitignore.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/glsl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/gobstones.js +41 -0
- data/vendor/assets/javascripts/ace/snippets/golang.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/groovy.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/haml.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/handlebars.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/haskell.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/haxe.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/hjson.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/html.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/html_elixir.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/html_ruby.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/ini.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/io.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/jack.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/jade.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/java.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/javascript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/json.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/jsoniq.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/jsp.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/jsx.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/julia.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/kotlin.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/latex.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/lean.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/less.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/liquid.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/lisp.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/livescript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/logiql.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/lsl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/lua.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/luapage.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/lucene.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/makefile.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/markdown.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mask.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/matlab.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/maze.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mel.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mushcode.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/mysql.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/nix.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/nsis.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/objectivec.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/ocaml.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/pascal.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/perl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/pgsql.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/php.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/plain_text.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/powershell.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/praat.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/prolog.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/properties.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/protobuf.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/python.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/r.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/razor.js +10 -0
- data/vendor/assets/javascripts/ace/snippets/rdoc.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/rhtml.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/rst.js +29 -0
- data/vendor/assets/javascripts/ace/snippets/ruby.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/rust.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/sass.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/scad.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/scala.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/scheme.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/scss.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/sh.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/sjs.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/smarty.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/snippets.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/soy_template.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/space.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/sql.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/sqlserver.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/stylus.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/svg.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/swift.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/swig.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/tcl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/tex.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/text.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/textile.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/toml.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/tsx.js +7 -0
- data/vendor/assets/javascripts/ace/snippets/twig.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/typescript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/vala.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/vbscript.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/velocity.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/verilog.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/vhdl.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/wollok.js +91 -0
- data/vendor/assets/javascripts/ace/snippets/xml.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/xquery.js +0 -0
- data/vendor/assets/javascripts/ace/snippets/yaml.js +0 -0
- data/vendor/assets/javascripts/ace/theme-ambiance.js +0 -0
- data/vendor/assets/javascripts/ace/theme-chaos.js +0 -0
- data/vendor/assets/javascripts/ace/theme-chrome.js +0 -0
- data/vendor/assets/javascripts/ace/theme-clouds.js +0 -0
- data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +0 -0
- data/vendor/assets/javascripts/ace/theme-cobalt.js +0 -0
- data/vendor/assets/javascripts/ace/theme-crimson_editor.js +0 -0
- data/vendor/assets/javascripts/ace/theme-dawn.js +0 -0
- data/vendor/assets/javascripts/ace/theme-dreamweaver.js +0 -0
- data/vendor/assets/javascripts/ace/theme-eclipse.js +0 -0
- data/vendor/assets/javascripts/ace/theme-github.js +0 -0
- data/vendor/assets/javascripts/ace/theme-idle_fingers.js +0 -0
- data/vendor/assets/javascripts/ace/theme-iplastic.js +0 -0
- data/vendor/assets/javascripts/ace/theme-katzenmilch.js +0 -0
- data/vendor/assets/javascripts/ace/theme-kr_theme.js +0 -0
- data/vendor/assets/javascripts/ace/theme-kuroir.js +0 -0
- data/vendor/assets/javascripts/ace/theme-merbivore.js +0 -0
- data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +0 -0
- data/vendor/assets/javascripts/ace/theme-mono_industrial.js +0 -0
- data/vendor/assets/javascripts/ace/theme-monokai.js +0 -0
- data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +0 -0
- data/vendor/assets/javascripts/ace/theme-solarized_dark.js +0 -0
- data/vendor/assets/javascripts/ace/theme-solarized_light.js +0 -0
- data/vendor/assets/javascripts/ace/theme-sqlserver.js +0 -0
- data/vendor/assets/javascripts/ace/theme-terminal.js +0 -0
- data/vendor/assets/javascripts/ace/theme-textmate.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +0 -0
- data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +0 -0
- data/vendor/assets/javascripts/ace/theme-twilight.js +0 -0
- data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +0 -0
- data/vendor/assets/javascripts/ace/theme-xcode.js +0 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +5 -7
- data/vendor/assets/javascripts/ace/worker-css.js +20 -22
- data/vendor/assets/javascripts/ace/worker-html.js +5 -7
- data/vendor/assets/javascripts/ace/worker-javascript.js +6 -8
- data/vendor/assets/javascripts/ace/worker-json.js +5 -7
- data/vendor/assets/javascripts/ace/worker-lua.js +5 -7
- data/vendor/assets/javascripts/ace/worker-php.js +1399 -4118
- data/vendor/assets/javascripts/ace/worker-xml.js +5 -7
- data/vendor/assets/javascripts/ace/worker-xquery.js +17575 -8836
- metadata +21 -2
@@ -185,363 +185,6 @@ var MatchingBraceOutdent = function() {};
|
|
185
185
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
186
186
|
});
|
187
187
|
|
188
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
189
|
-
"use strict";
|
190
|
-
|
191
|
-
var oop = require("../../lib/oop");
|
192
|
-
var Behaviour = require("../behaviour").Behaviour;
|
193
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
194
|
-
var lang = require("../../lib/lang");
|
195
|
-
|
196
|
-
var SAFE_INSERT_IN_TOKENS =
|
197
|
-
["text", "paren.rparen", "punctuation.operator"];
|
198
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
199
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
200
|
-
|
201
|
-
var context;
|
202
|
-
var contextCache = {};
|
203
|
-
var initContext = function(editor) {
|
204
|
-
var id = -1;
|
205
|
-
if (editor.multiSelect) {
|
206
|
-
id = editor.selection.index;
|
207
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
208
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
209
|
-
}
|
210
|
-
if (contextCache[id])
|
211
|
-
return context = contextCache[id];
|
212
|
-
context = contextCache[id] = {
|
213
|
-
autoInsertedBrackets: 0,
|
214
|
-
autoInsertedRow: -1,
|
215
|
-
autoInsertedLineEnd: "",
|
216
|
-
maybeInsertedBrackets: 0,
|
217
|
-
maybeInsertedRow: -1,
|
218
|
-
maybeInsertedLineStart: "",
|
219
|
-
maybeInsertedLineEnd: ""
|
220
|
-
};
|
221
|
-
};
|
222
|
-
|
223
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
224
|
-
var rowDiff = selection.end.row - selection.start.row;
|
225
|
-
return {
|
226
|
-
text: opening + selected + closing,
|
227
|
-
selection: [
|
228
|
-
0,
|
229
|
-
selection.start.column + 1,
|
230
|
-
rowDiff,
|
231
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
232
|
-
]
|
233
|
-
};
|
234
|
-
};
|
235
|
-
|
236
|
-
var CstyleBehaviour = function() {
|
237
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
238
|
-
var cursor = editor.getCursorPosition();
|
239
|
-
var line = session.doc.getLine(cursor.row);
|
240
|
-
if (text == '{') {
|
241
|
-
initContext(editor);
|
242
|
-
var selection = editor.getSelectionRange();
|
243
|
-
var selected = session.doc.getTextRange(selection);
|
244
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
245
|
-
return getWrapped(selection, selected, '{', '}');
|
246
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
247
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
248
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
249
|
-
return {
|
250
|
-
text: '{}',
|
251
|
-
selection: [1, 1]
|
252
|
-
};
|
253
|
-
} else {
|
254
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
255
|
-
return {
|
256
|
-
text: '{',
|
257
|
-
selection: [1, 1]
|
258
|
-
};
|
259
|
-
}
|
260
|
-
}
|
261
|
-
} else if (text == '}') {
|
262
|
-
initContext(editor);
|
263
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
264
|
-
if (rightChar == '}') {
|
265
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
266
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
267
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
268
|
-
return {
|
269
|
-
text: '',
|
270
|
-
selection: [1, 1]
|
271
|
-
};
|
272
|
-
}
|
273
|
-
}
|
274
|
-
} else if (text == "\n" || text == "\r\n") {
|
275
|
-
initContext(editor);
|
276
|
-
var closing = "";
|
277
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
278
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
279
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
280
|
-
}
|
281
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
282
|
-
if (rightChar === '}') {
|
283
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
284
|
-
if (!openBracePos)
|
285
|
-
return null;
|
286
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
287
|
-
} else if (closing) {
|
288
|
-
var next_indent = this.$getIndent(line);
|
289
|
-
} else {
|
290
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
291
|
-
return;
|
292
|
-
}
|
293
|
-
var indent = next_indent + session.getTabString();
|
294
|
-
|
295
|
-
return {
|
296
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
297
|
-
selection: [1, indent.length, 1, indent.length]
|
298
|
-
};
|
299
|
-
} else {
|
300
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
301
|
-
}
|
302
|
-
});
|
303
|
-
|
304
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
305
|
-
var selected = session.doc.getTextRange(range);
|
306
|
-
if (!range.isMultiLine() && selected == '{') {
|
307
|
-
initContext(editor);
|
308
|
-
var line = session.doc.getLine(range.start.row);
|
309
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
310
|
-
if (rightChar == '}') {
|
311
|
-
range.end.column++;
|
312
|
-
return range;
|
313
|
-
} else {
|
314
|
-
context.maybeInsertedBrackets--;
|
315
|
-
}
|
316
|
-
}
|
317
|
-
});
|
318
|
-
|
319
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
320
|
-
if (text == '(') {
|
321
|
-
initContext(editor);
|
322
|
-
var selection = editor.getSelectionRange();
|
323
|
-
var selected = session.doc.getTextRange(selection);
|
324
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
325
|
-
return getWrapped(selection, selected, '(', ')');
|
326
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
327
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
328
|
-
return {
|
329
|
-
text: '()',
|
330
|
-
selection: [1, 1]
|
331
|
-
};
|
332
|
-
}
|
333
|
-
} else if (text == ')') {
|
334
|
-
initContext(editor);
|
335
|
-
var cursor = editor.getCursorPosition();
|
336
|
-
var line = session.doc.getLine(cursor.row);
|
337
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
338
|
-
if (rightChar == ')') {
|
339
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
340
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
341
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
342
|
-
return {
|
343
|
-
text: '',
|
344
|
-
selection: [1, 1]
|
345
|
-
};
|
346
|
-
}
|
347
|
-
}
|
348
|
-
}
|
349
|
-
});
|
350
|
-
|
351
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
352
|
-
var selected = session.doc.getTextRange(range);
|
353
|
-
if (!range.isMultiLine() && selected == '(') {
|
354
|
-
initContext(editor);
|
355
|
-
var line = session.doc.getLine(range.start.row);
|
356
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
357
|
-
if (rightChar == ')') {
|
358
|
-
range.end.column++;
|
359
|
-
return range;
|
360
|
-
}
|
361
|
-
}
|
362
|
-
});
|
363
|
-
|
364
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
365
|
-
if (text == '[') {
|
366
|
-
initContext(editor);
|
367
|
-
var selection = editor.getSelectionRange();
|
368
|
-
var selected = session.doc.getTextRange(selection);
|
369
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
370
|
-
return getWrapped(selection, selected, '[', ']');
|
371
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
372
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
373
|
-
return {
|
374
|
-
text: '[]',
|
375
|
-
selection: [1, 1]
|
376
|
-
};
|
377
|
-
}
|
378
|
-
} else if (text == ']') {
|
379
|
-
initContext(editor);
|
380
|
-
var cursor = editor.getCursorPosition();
|
381
|
-
var line = session.doc.getLine(cursor.row);
|
382
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
383
|
-
if (rightChar == ']') {
|
384
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
385
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
386
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
387
|
-
return {
|
388
|
-
text: '',
|
389
|
-
selection: [1, 1]
|
390
|
-
};
|
391
|
-
}
|
392
|
-
}
|
393
|
-
}
|
394
|
-
});
|
395
|
-
|
396
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
397
|
-
var selected = session.doc.getTextRange(range);
|
398
|
-
if (!range.isMultiLine() && selected == '[') {
|
399
|
-
initContext(editor);
|
400
|
-
var line = session.doc.getLine(range.start.row);
|
401
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
402
|
-
if (rightChar == ']') {
|
403
|
-
range.end.column++;
|
404
|
-
return range;
|
405
|
-
}
|
406
|
-
}
|
407
|
-
});
|
408
|
-
|
409
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
410
|
-
if (text == '"' || text == "'") {
|
411
|
-
initContext(editor);
|
412
|
-
var quote = text;
|
413
|
-
var selection = editor.getSelectionRange();
|
414
|
-
var selected = session.doc.getTextRange(selection);
|
415
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
416
|
-
return getWrapped(selection, selected, quote, quote);
|
417
|
-
} else if (!selected) {
|
418
|
-
var cursor = editor.getCursorPosition();
|
419
|
-
var line = session.doc.getLine(cursor.row);
|
420
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
421
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
422
|
-
|
423
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
424
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
425
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
426
|
-
return null;
|
427
|
-
|
428
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
429
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
430
|
-
|
431
|
-
var pair;
|
432
|
-
if (rightChar == quote) {
|
433
|
-
pair = stringBefore !== stringAfter;
|
434
|
-
} else {
|
435
|
-
if (stringBefore && !stringAfter)
|
436
|
-
return null; // wrap string with different quote
|
437
|
-
if (stringBefore && stringAfter)
|
438
|
-
return null; // do not pair quotes inside strings
|
439
|
-
var wordRe = session.$mode.tokenRe;
|
440
|
-
wordRe.lastIndex = 0;
|
441
|
-
var isWordBefore = wordRe.test(leftChar);
|
442
|
-
wordRe.lastIndex = 0;
|
443
|
-
var isWordAfter = wordRe.test(leftChar);
|
444
|
-
if (isWordBefore || isWordAfter)
|
445
|
-
return null; // before or after alphanumeric
|
446
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
447
|
-
return null; // there is rightChar and it isn't closing
|
448
|
-
pair = true;
|
449
|
-
}
|
450
|
-
return {
|
451
|
-
text: pair ? quote + quote : "",
|
452
|
-
selection: [1,1]
|
453
|
-
};
|
454
|
-
}
|
455
|
-
}
|
456
|
-
});
|
457
|
-
|
458
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
459
|
-
var selected = session.doc.getTextRange(range);
|
460
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
461
|
-
initContext(editor);
|
462
|
-
var line = session.doc.getLine(range.start.row);
|
463
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
464
|
-
if (rightChar == selected) {
|
465
|
-
range.end.column++;
|
466
|
-
return range;
|
467
|
-
}
|
468
|
-
}
|
469
|
-
});
|
470
|
-
|
471
|
-
};
|
472
|
-
|
473
|
-
|
474
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
475
|
-
var cursor = editor.getCursorPosition();
|
476
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
477
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
478
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
479
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
480
|
-
return false;
|
481
|
-
}
|
482
|
-
iterator.stepForward();
|
483
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
484
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
485
|
-
};
|
486
|
-
|
487
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
488
|
-
return types.indexOf(token.type || token) > -1;
|
489
|
-
};
|
490
|
-
|
491
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
492
|
-
var cursor = editor.getCursorPosition();
|
493
|
-
var line = session.doc.getLine(cursor.row);
|
494
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
495
|
-
context.autoInsertedBrackets = 0;
|
496
|
-
context.autoInsertedRow = cursor.row;
|
497
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
498
|
-
context.autoInsertedBrackets++;
|
499
|
-
};
|
500
|
-
|
501
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
502
|
-
var cursor = editor.getCursorPosition();
|
503
|
-
var line = session.doc.getLine(cursor.row);
|
504
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
505
|
-
context.maybeInsertedBrackets = 0;
|
506
|
-
context.maybeInsertedRow = cursor.row;
|
507
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
508
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
509
|
-
context.maybeInsertedBrackets++;
|
510
|
-
};
|
511
|
-
|
512
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
513
|
-
return context.autoInsertedBrackets > 0 &&
|
514
|
-
cursor.row === context.autoInsertedRow &&
|
515
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
516
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
517
|
-
};
|
518
|
-
|
519
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
520
|
-
return context.maybeInsertedBrackets > 0 &&
|
521
|
-
cursor.row === context.maybeInsertedRow &&
|
522
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
523
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
524
|
-
};
|
525
|
-
|
526
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
527
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
528
|
-
context.autoInsertedBrackets--;
|
529
|
-
};
|
530
|
-
|
531
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
532
|
-
if (context) {
|
533
|
-
context.maybeInsertedBrackets = 0;
|
534
|
-
context.maybeInsertedRow = -1;
|
535
|
-
}
|
536
|
-
};
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
541
|
-
|
542
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
543
|
-
});
|
544
|
-
|
545
188
|
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
546
189
|
"use strict";
|
547
190
|
|
@@ -356,363 +356,6 @@ var CssCompletions = function() {
|
|
356
356
|
exports.CssCompletions = CssCompletions;
|
357
357
|
});
|
358
358
|
|
359
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
360
|
-
"use strict";
|
361
|
-
|
362
|
-
var oop = require("../../lib/oop");
|
363
|
-
var Behaviour = require("../behaviour").Behaviour;
|
364
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
365
|
-
var lang = require("../../lib/lang");
|
366
|
-
|
367
|
-
var SAFE_INSERT_IN_TOKENS =
|
368
|
-
["text", "paren.rparen", "punctuation.operator"];
|
369
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
370
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
371
|
-
|
372
|
-
var context;
|
373
|
-
var contextCache = {};
|
374
|
-
var initContext = function(editor) {
|
375
|
-
var id = -1;
|
376
|
-
if (editor.multiSelect) {
|
377
|
-
id = editor.selection.index;
|
378
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
379
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
380
|
-
}
|
381
|
-
if (contextCache[id])
|
382
|
-
return context = contextCache[id];
|
383
|
-
context = contextCache[id] = {
|
384
|
-
autoInsertedBrackets: 0,
|
385
|
-
autoInsertedRow: -1,
|
386
|
-
autoInsertedLineEnd: "",
|
387
|
-
maybeInsertedBrackets: 0,
|
388
|
-
maybeInsertedRow: -1,
|
389
|
-
maybeInsertedLineStart: "",
|
390
|
-
maybeInsertedLineEnd: ""
|
391
|
-
};
|
392
|
-
};
|
393
|
-
|
394
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
395
|
-
var rowDiff = selection.end.row - selection.start.row;
|
396
|
-
return {
|
397
|
-
text: opening + selected + closing,
|
398
|
-
selection: [
|
399
|
-
0,
|
400
|
-
selection.start.column + 1,
|
401
|
-
rowDiff,
|
402
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
403
|
-
]
|
404
|
-
};
|
405
|
-
};
|
406
|
-
|
407
|
-
var CstyleBehaviour = function() {
|
408
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
409
|
-
var cursor = editor.getCursorPosition();
|
410
|
-
var line = session.doc.getLine(cursor.row);
|
411
|
-
if (text == '{') {
|
412
|
-
initContext(editor);
|
413
|
-
var selection = editor.getSelectionRange();
|
414
|
-
var selected = session.doc.getTextRange(selection);
|
415
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
416
|
-
return getWrapped(selection, selected, '{', '}');
|
417
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
418
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
419
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
420
|
-
return {
|
421
|
-
text: '{}',
|
422
|
-
selection: [1, 1]
|
423
|
-
};
|
424
|
-
} else {
|
425
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
426
|
-
return {
|
427
|
-
text: '{',
|
428
|
-
selection: [1, 1]
|
429
|
-
};
|
430
|
-
}
|
431
|
-
}
|
432
|
-
} else if (text == '}') {
|
433
|
-
initContext(editor);
|
434
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
435
|
-
if (rightChar == '}') {
|
436
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
437
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
438
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
439
|
-
return {
|
440
|
-
text: '',
|
441
|
-
selection: [1, 1]
|
442
|
-
};
|
443
|
-
}
|
444
|
-
}
|
445
|
-
} else if (text == "\n" || text == "\r\n") {
|
446
|
-
initContext(editor);
|
447
|
-
var closing = "";
|
448
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
449
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
450
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
451
|
-
}
|
452
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
453
|
-
if (rightChar === '}') {
|
454
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
455
|
-
if (!openBracePos)
|
456
|
-
return null;
|
457
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
458
|
-
} else if (closing) {
|
459
|
-
var next_indent = this.$getIndent(line);
|
460
|
-
} else {
|
461
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
462
|
-
return;
|
463
|
-
}
|
464
|
-
var indent = next_indent + session.getTabString();
|
465
|
-
|
466
|
-
return {
|
467
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
468
|
-
selection: [1, indent.length, 1, indent.length]
|
469
|
-
};
|
470
|
-
} else {
|
471
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
472
|
-
}
|
473
|
-
});
|
474
|
-
|
475
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
476
|
-
var selected = session.doc.getTextRange(range);
|
477
|
-
if (!range.isMultiLine() && selected == '{') {
|
478
|
-
initContext(editor);
|
479
|
-
var line = session.doc.getLine(range.start.row);
|
480
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
481
|
-
if (rightChar == '}') {
|
482
|
-
range.end.column++;
|
483
|
-
return range;
|
484
|
-
} else {
|
485
|
-
context.maybeInsertedBrackets--;
|
486
|
-
}
|
487
|
-
}
|
488
|
-
});
|
489
|
-
|
490
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
491
|
-
if (text == '(') {
|
492
|
-
initContext(editor);
|
493
|
-
var selection = editor.getSelectionRange();
|
494
|
-
var selected = session.doc.getTextRange(selection);
|
495
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
496
|
-
return getWrapped(selection, selected, '(', ')');
|
497
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
498
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
499
|
-
return {
|
500
|
-
text: '()',
|
501
|
-
selection: [1, 1]
|
502
|
-
};
|
503
|
-
}
|
504
|
-
} else if (text == ')') {
|
505
|
-
initContext(editor);
|
506
|
-
var cursor = editor.getCursorPosition();
|
507
|
-
var line = session.doc.getLine(cursor.row);
|
508
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
509
|
-
if (rightChar == ')') {
|
510
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
511
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
512
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
513
|
-
return {
|
514
|
-
text: '',
|
515
|
-
selection: [1, 1]
|
516
|
-
};
|
517
|
-
}
|
518
|
-
}
|
519
|
-
}
|
520
|
-
});
|
521
|
-
|
522
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
523
|
-
var selected = session.doc.getTextRange(range);
|
524
|
-
if (!range.isMultiLine() && selected == '(') {
|
525
|
-
initContext(editor);
|
526
|
-
var line = session.doc.getLine(range.start.row);
|
527
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
528
|
-
if (rightChar == ')') {
|
529
|
-
range.end.column++;
|
530
|
-
return range;
|
531
|
-
}
|
532
|
-
}
|
533
|
-
});
|
534
|
-
|
535
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
536
|
-
if (text == '[') {
|
537
|
-
initContext(editor);
|
538
|
-
var selection = editor.getSelectionRange();
|
539
|
-
var selected = session.doc.getTextRange(selection);
|
540
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
541
|
-
return getWrapped(selection, selected, '[', ']');
|
542
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
543
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
544
|
-
return {
|
545
|
-
text: '[]',
|
546
|
-
selection: [1, 1]
|
547
|
-
};
|
548
|
-
}
|
549
|
-
} else if (text == ']') {
|
550
|
-
initContext(editor);
|
551
|
-
var cursor = editor.getCursorPosition();
|
552
|
-
var line = session.doc.getLine(cursor.row);
|
553
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
554
|
-
if (rightChar == ']') {
|
555
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
556
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
557
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
558
|
-
return {
|
559
|
-
text: '',
|
560
|
-
selection: [1, 1]
|
561
|
-
};
|
562
|
-
}
|
563
|
-
}
|
564
|
-
}
|
565
|
-
});
|
566
|
-
|
567
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
568
|
-
var selected = session.doc.getTextRange(range);
|
569
|
-
if (!range.isMultiLine() && selected == '[') {
|
570
|
-
initContext(editor);
|
571
|
-
var line = session.doc.getLine(range.start.row);
|
572
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
573
|
-
if (rightChar == ']') {
|
574
|
-
range.end.column++;
|
575
|
-
return range;
|
576
|
-
}
|
577
|
-
}
|
578
|
-
});
|
579
|
-
|
580
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
581
|
-
if (text == '"' || text == "'") {
|
582
|
-
initContext(editor);
|
583
|
-
var quote = text;
|
584
|
-
var selection = editor.getSelectionRange();
|
585
|
-
var selected = session.doc.getTextRange(selection);
|
586
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
587
|
-
return getWrapped(selection, selected, quote, quote);
|
588
|
-
} else if (!selected) {
|
589
|
-
var cursor = editor.getCursorPosition();
|
590
|
-
var line = session.doc.getLine(cursor.row);
|
591
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
592
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
593
|
-
|
594
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
595
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
596
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
597
|
-
return null;
|
598
|
-
|
599
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
600
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
601
|
-
|
602
|
-
var pair;
|
603
|
-
if (rightChar == quote) {
|
604
|
-
pair = stringBefore !== stringAfter;
|
605
|
-
} else {
|
606
|
-
if (stringBefore && !stringAfter)
|
607
|
-
return null; // wrap string with different quote
|
608
|
-
if (stringBefore && stringAfter)
|
609
|
-
return null; // do not pair quotes inside strings
|
610
|
-
var wordRe = session.$mode.tokenRe;
|
611
|
-
wordRe.lastIndex = 0;
|
612
|
-
var isWordBefore = wordRe.test(leftChar);
|
613
|
-
wordRe.lastIndex = 0;
|
614
|
-
var isWordAfter = wordRe.test(leftChar);
|
615
|
-
if (isWordBefore || isWordAfter)
|
616
|
-
return null; // before or after alphanumeric
|
617
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
618
|
-
return null; // there is rightChar and it isn't closing
|
619
|
-
pair = true;
|
620
|
-
}
|
621
|
-
return {
|
622
|
-
text: pair ? quote + quote : "",
|
623
|
-
selection: [1,1]
|
624
|
-
};
|
625
|
-
}
|
626
|
-
}
|
627
|
-
});
|
628
|
-
|
629
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
630
|
-
var selected = session.doc.getTextRange(range);
|
631
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
632
|
-
initContext(editor);
|
633
|
-
var line = session.doc.getLine(range.start.row);
|
634
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
635
|
-
if (rightChar == selected) {
|
636
|
-
range.end.column++;
|
637
|
-
return range;
|
638
|
-
}
|
639
|
-
}
|
640
|
-
});
|
641
|
-
|
642
|
-
};
|
643
|
-
|
644
|
-
|
645
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
646
|
-
var cursor = editor.getCursorPosition();
|
647
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
648
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
649
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
650
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
651
|
-
return false;
|
652
|
-
}
|
653
|
-
iterator.stepForward();
|
654
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
655
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
656
|
-
};
|
657
|
-
|
658
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
659
|
-
return types.indexOf(token.type || token) > -1;
|
660
|
-
};
|
661
|
-
|
662
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
663
|
-
var cursor = editor.getCursorPosition();
|
664
|
-
var line = session.doc.getLine(cursor.row);
|
665
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
666
|
-
context.autoInsertedBrackets = 0;
|
667
|
-
context.autoInsertedRow = cursor.row;
|
668
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
669
|
-
context.autoInsertedBrackets++;
|
670
|
-
};
|
671
|
-
|
672
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
673
|
-
var cursor = editor.getCursorPosition();
|
674
|
-
var line = session.doc.getLine(cursor.row);
|
675
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
676
|
-
context.maybeInsertedBrackets = 0;
|
677
|
-
context.maybeInsertedRow = cursor.row;
|
678
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
679
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
680
|
-
context.maybeInsertedBrackets++;
|
681
|
-
};
|
682
|
-
|
683
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
684
|
-
return context.autoInsertedBrackets > 0 &&
|
685
|
-
cursor.row === context.autoInsertedRow &&
|
686
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
687
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
688
|
-
};
|
689
|
-
|
690
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
691
|
-
return context.maybeInsertedBrackets > 0 &&
|
692
|
-
cursor.row === context.maybeInsertedRow &&
|
693
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
694
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
695
|
-
};
|
696
|
-
|
697
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
698
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
699
|
-
context.autoInsertedBrackets--;
|
700
|
-
};
|
701
|
-
|
702
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
703
|
-
if (context) {
|
704
|
-
context.maybeInsertedBrackets = 0;
|
705
|
-
context.maybeInsertedRow = -1;
|
706
|
-
}
|
707
|
-
};
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
712
|
-
|
713
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
714
|
-
});
|
715
|
-
|
716
359
|
define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
|
717
360
|
"use strict";
|
718
361
|
|