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
@@ -198,7 +198,7 @@ define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/
|
|
198
198
|
var oop = require("../lib/oop");
|
199
199
|
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
200
200
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
201
|
-
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]
|
201
|
+
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
|
202
202
|
|
203
203
|
var JavaScriptHighlightRules = function(options) {
|
204
204
|
var keywordMapper = this.createKeywordMapper({
|
@@ -214,9 +214,9 @@ var JavaScriptHighlightRules = function(options) {
|
|
214
214
|
"JSON|Math|" + // Other
|
215
215
|
"this|arguments|prototype|window|document" , // Pseudo
|
216
216
|
"keyword":
|
217
|
-
"const|yield|import|get|set|" +
|
217
|
+
"const|yield|import|get|set|async|await|" +
|
218
218
|
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
219
|
-
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
219
|
+
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
220
220
|
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
221
221
|
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
222
222
|
"storage.type":
|
@@ -322,7 +322,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
322
322
|
next : "property"
|
323
323
|
}, {
|
324
324
|
token : "keyword.operator",
|
325
|
-
regex : /--|\+\+|\.{3}
|
325
|
+
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
|
326
326
|
next : "start"
|
327
327
|
}, {
|
328
328
|
token : "punctuation.operator",
|
@@ -523,7 +523,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
523
523
|
}]
|
524
524
|
});
|
525
525
|
|
526
|
-
if (!options ||
|
526
|
+
if (!options || options.jsx != false)
|
527
527
|
JSX.call(this);
|
528
528
|
}
|
529
529
|
|
@@ -942,7 +942,7 @@ var HtmlHighlightRules = function() {
|
|
942
942
|
});
|
943
943
|
|
944
944
|
this.embedTagRules(CssHighlightRules, "css-", "style");
|
945
|
-
this.embedTagRules(new JavaScriptHighlightRules({
|
945
|
+
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
|
946
946
|
|
947
947
|
if (this.constructor === HtmlHighlightRules)
|
948
948
|
this.normalizeRules();
|
@@ -1177,363 +1177,6 @@ var MatchingBraceOutdent = function() {};
|
|
1177
1177
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
1178
1178
|
});
|
1179
1179
|
|
1180
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
1181
|
-
"use strict";
|
1182
|
-
|
1183
|
-
var oop = require("../../lib/oop");
|
1184
|
-
var Behaviour = require("../behaviour").Behaviour;
|
1185
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
1186
|
-
var lang = require("../../lib/lang");
|
1187
|
-
|
1188
|
-
var SAFE_INSERT_IN_TOKENS =
|
1189
|
-
["text", "paren.rparen", "punctuation.operator"];
|
1190
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
1191
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
1192
|
-
|
1193
|
-
var context;
|
1194
|
-
var contextCache = {};
|
1195
|
-
var initContext = function(editor) {
|
1196
|
-
var id = -1;
|
1197
|
-
if (editor.multiSelect) {
|
1198
|
-
id = editor.selection.index;
|
1199
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
1200
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
1201
|
-
}
|
1202
|
-
if (contextCache[id])
|
1203
|
-
return context = contextCache[id];
|
1204
|
-
context = contextCache[id] = {
|
1205
|
-
autoInsertedBrackets: 0,
|
1206
|
-
autoInsertedRow: -1,
|
1207
|
-
autoInsertedLineEnd: "",
|
1208
|
-
maybeInsertedBrackets: 0,
|
1209
|
-
maybeInsertedRow: -1,
|
1210
|
-
maybeInsertedLineStart: "",
|
1211
|
-
maybeInsertedLineEnd: ""
|
1212
|
-
};
|
1213
|
-
};
|
1214
|
-
|
1215
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
1216
|
-
var rowDiff = selection.end.row - selection.start.row;
|
1217
|
-
return {
|
1218
|
-
text: opening + selected + closing,
|
1219
|
-
selection: [
|
1220
|
-
0,
|
1221
|
-
selection.start.column + 1,
|
1222
|
-
rowDiff,
|
1223
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
1224
|
-
]
|
1225
|
-
};
|
1226
|
-
};
|
1227
|
-
|
1228
|
-
var CstyleBehaviour = function() {
|
1229
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
1230
|
-
var cursor = editor.getCursorPosition();
|
1231
|
-
var line = session.doc.getLine(cursor.row);
|
1232
|
-
if (text == '{') {
|
1233
|
-
initContext(editor);
|
1234
|
-
var selection = editor.getSelectionRange();
|
1235
|
-
var selected = session.doc.getTextRange(selection);
|
1236
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
1237
|
-
return getWrapped(selection, selected, '{', '}');
|
1238
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
1239
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
1240
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
1241
|
-
return {
|
1242
|
-
text: '{}',
|
1243
|
-
selection: [1, 1]
|
1244
|
-
};
|
1245
|
-
} else {
|
1246
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
1247
|
-
return {
|
1248
|
-
text: '{',
|
1249
|
-
selection: [1, 1]
|
1250
|
-
};
|
1251
|
-
}
|
1252
|
-
}
|
1253
|
-
} else if (text == '}') {
|
1254
|
-
initContext(editor);
|
1255
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1256
|
-
if (rightChar == '}') {
|
1257
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
1258
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
1259
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
1260
|
-
return {
|
1261
|
-
text: '',
|
1262
|
-
selection: [1, 1]
|
1263
|
-
};
|
1264
|
-
}
|
1265
|
-
}
|
1266
|
-
} else if (text == "\n" || text == "\r\n") {
|
1267
|
-
initContext(editor);
|
1268
|
-
var closing = "";
|
1269
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
1270
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
1271
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
1272
|
-
}
|
1273
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1274
|
-
if (rightChar === '}') {
|
1275
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
1276
|
-
if (!openBracePos)
|
1277
|
-
return null;
|
1278
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
1279
|
-
} else if (closing) {
|
1280
|
-
var next_indent = this.$getIndent(line);
|
1281
|
-
} else {
|
1282
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
1283
|
-
return;
|
1284
|
-
}
|
1285
|
-
var indent = next_indent + session.getTabString();
|
1286
|
-
|
1287
|
-
return {
|
1288
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
1289
|
-
selection: [1, indent.length, 1, indent.length]
|
1290
|
-
};
|
1291
|
-
} else {
|
1292
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
1293
|
-
}
|
1294
|
-
});
|
1295
|
-
|
1296
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
1297
|
-
var selected = session.doc.getTextRange(range);
|
1298
|
-
if (!range.isMultiLine() && selected == '{') {
|
1299
|
-
initContext(editor);
|
1300
|
-
var line = session.doc.getLine(range.start.row);
|
1301
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
1302
|
-
if (rightChar == '}') {
|
1303
|
-
range.end.column++;
|
1304
|
-
return range;
|
1305
|
-
} else {
|
1306
|
-
context.maybeInsertedBrackets--;
|
1307
|
-
}
|
1308
|
-
}
|
1309
|
-
});
|
1310
|
-
|
1311
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
1312
|
-
if (text == '(') {
|
1313
|
-
initContext(editor);
|
1314
|
-
var selection = editor.getSelectionRange();
|
1315
|
-
var selected = session.doc.getTextRange(selection);
|
1316
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
1317
|
-
return getWrapped(selection, selected, '(', ')');
|
1318
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
1319
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
1320
|
-
return {
|
1321
|
-
text: '()',
|
1322
|
-
selection: [1, 1]
|
1323
|
-
};
|
1324
|
-
}
|
1325
|
-
} else if (text == ')') {
|
1326
|
-
initContext(editor);
|
1327
|
-
var cursor = editor.getCursorPosition();
|
1328
|
-
var line = session.doc.getLine(cursor.row);
|
1329
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1330
|
-
if (rightChar == ')') {
|
1331
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
1332
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
1333
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
1334
|
-
return {
|
1335
|
-
text: '',
|
1336
|
-
selection: [1, 1]
|
1337
|
-
};
|
1338
|
-
}
|
1339
|
-
}
|
1340
|
-
}
|
1341
|
-
});
|
1342
|
-
|
1343
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
1344
|
-
var selected = session.doc.getTextRange(range);
|
1345
|
-
if (!range.isMultiLine() && selected == '(') {
|
1346
|
-
initContext(editor);
|
1347
|
-
var line = session.doc.getLine(range.start.row);
|
1348
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
1349
|
-
if (rightChar == ')') {
|
1350
|
-
range.end.column++;
|
1351
|
-
return range;
|
1352
|
-
}
|
1353
|
-
}
|
1354
|
-
});
|
1355
|
-
|
1356
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
1357
|
-
if (text == '[') {
|
1358
|
-
initContext(editor);
|
1359
|
-
var selection = editor.getSelectionRange();
|
1360
|
-
var selected = session.doc.getTextRange(selection);
|
1361
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
1362
|
-
return getWrapped(selection, selected, '[', ']');
|
1363
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
1364
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
1365
|
-
return {
|
1366
|
-
text: '[]',
|
1367
|
-
selection: [1, 1]
|
1368
|
-
};
|
1369
|
-
}
|
1370
|
-
} else if (text == ']') {
|
1371
|
-
initContext(editor);
|
1372
|
-
var cursor = editor.getCursorPosition();
|
1373
|
-
var line = session.doc.getLine(cursor.row);
|
1374
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1375
|
-
if (rightChar == ']') {
|
1376
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
1377
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
1378
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
1379
|
-
return {
|
1380
|
-
text: '',
|
1381
|
-
selection: [1, 1]
|
1382
|
-
};
|
1383
|
-
}
|
1384
|
-
}
|
1385
|
-
}
|
1386
|
-
});
|
1387
|
-
|
1388
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
1389
|
-
var selected = session.doc.getTextRange(range);
|
1390
|
-
if (!range.isMultiLine() && selected == '[') {
|
1391
|
-
initContext(editor);
|
1392
|
-
var line = session.doc.getLine(range.start.row);
|
1393
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
1394
|
-
if (rightChar == ']') {
|
1395
|
-
range.end.column++;
|
1396
|
-
return range;
|
1397
|
-
}
|
1398
|
-
}
|
1399
|
-
});
|
1400
|
-
|
1401
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
1402
|
-
if (text == '"' || text == "'") {
|
1403
|
-
initContext(editor);
|
1404
|
-
var quote = text;
|
1405
|
-
var selection = editor.getSelectionRange();
|
1406
|
-
var selected = session.doc.getTextRange(selection);
|
1407
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
1408
|
-
return getWrapped(selection, selected, quote, quote);
|
1409
|
-
} else if (!selected) {
|
1410
|
-
var cursor = editor.getCursorPosition();
|
1411
|
-
var line = session.doc.getLine(cursor.row);
|
1412
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
1413
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
1414
|
-
|
1415
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
1416
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
1417
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
1418
|
-
return null;
|
1419
|
-
|
1420
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
1421
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
1422
|
-
|
1423
|
-
var pair;
|
1424
|
-
if (rightChar == quote) {
|
1425
|
-
pair = stringBefore !== stringAfter;
|
1426
|
-
} else {
|
1427
|
-
if (stringBefore && !stringAfter)
|
1428
|
-
return null; // wrap string with different quote
|
1429
|
-
if (stringBefore && stringAfter)
|
1430
|
-
return null; // do not pair quotes inside strings
|
1431
|
-
var wordRe = session.$mode.tokenRe;
|
1432
|
-
wordRe.lastIndex = 0;
|
1433
|
-
var isWordBefore = wordRe.test(leftChar);
|
1434
|
-
wordRe.lastIndex = 0;
|
1435
|
-
var isWordAfter = wordRe.test(leftChar);
|
1436
|
-
if (isWordBefore || isWordAfter)
|
1437
|
-
return null; // before or after alphanumeric
|
1438
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
1439
|
-
return null; // there is rightChar and it isn't closing
|
1440
|
-
pair = true;
|
1441
|
-
}
|
1442
|
-
return {
|
1443
|
-
text: pair ? quote + quote : "",
|
1444
|
-
selection: [1,1]
|
1445
|
-
};
|
1446
|
-
}
|
1447
|
-
}
|
1448
|
-
});
|
1449
|
-
|
1450
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
1451
|
-
var selected = session.doc.getTextRange(range);
|
1452
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
1453
|
-
initContext(editor);
|
1454
|
-
var line = session.doc.getLine(range.start.row);
|
1455
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
1456
|
-
if (rightChar == selected) {
|
1457
|
-
range.end.column++;
|
1458
|
-
return range;
|
1459
|
-
}
|
1460
|
-
}
|
1461
|
-
});
|
1462
|
-
|
1463
|
-
};
|
1464
|
-
|
1465
|
-
|
1466
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
1467
|
-
var cursor = editor.getCursorPosition();
|
1468
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
1469
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
1470
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
1471
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
1472
|
-
return false;
|
1473
|
-
}
|
1474
|
-
iterator.stepForward();
|
1475
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
1476
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
1477
|
-
};
|
1478
|
-
|
1479
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
1480
|
-
return types.indexOf(token.type || token) > -1;
|
1481
|
-
};
|
1482
|
-
|
1483
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
1484
|
-
var cursor = editor.getCursorPosition();
|
1485
|
-
var line = session.doc.getLine(cursor.row);
|
1486
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
1487
|
-
context.autoInsertedBrackets = 0;
|
1488
|
-
context.autoInsertedRow = cursor.row;
|
1489
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
1490
|
-
context.autoInsertedBrackets++;
|
1491
|
-
};
|
1492
|
-
|
1493
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
1494
|
-
var cursor = editor.getCursorPosition();
|
1495
|
-
var line = session.doc.getLine(cursor.row);
|
1496
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
1497
|
-
context.maybeInsertedBrackets = 0;
|
1498
|
-
context.maybeInsertedRow = cursor.row;
|
1499
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
1500
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
1501
|
-
context.maybeInsertedBrackets++;
|
1502
|
-
};
|
1503
|
-
|
1504
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
1505
|
-
return context.autoInsertedBrackets > 0 &&
|
1506
|
-
cursor.row === context.autoInsertedRow &&
|
1507
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
1508
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
1509
|
-
};
|
1510
|
-
|
1511
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
1512
|
-
return context.maybeInsertedBrackets > 0 &&
|
1513
|
-
cursor.row === context.maybeInsertedRow &&
|
1514
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
1515
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
1516
|
-
};
|
1517
|
-
|
1518
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
1519
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
1520
|
-
context.autoInsertedBrackets--;
|
1521
|
-
};
|
1522
|
-
|
1523
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
1524
|
-
if (context) {
|
1525
|
-
context.maybeInsertedBrackets = 0;
|
1526
|
-
context.maybeInsertedRow = -1;
|
1527
|
-
}
|
1528
|
-
};
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
1533
|
-
|
1534
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
1535
|
-
});
|
1536
|
-
|
1537
1180
|
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
1538
1181
|
"use strict";
|
1539
1182
|
|
@@ -207,363 +207,6 @@ var MatchingBraceOutdent = function() {};
|
|
207
207
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
208
208
|
});
|
209
209
|
|
210
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
211
|
-
"use strict";
|
212
|
-
|
213
|
-
var oop = require("../../lib/oop");
|
214
|
-
var Behaviour = require("../behaviour").Behaviour;
|
215
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
216
|
-
var lang = require("../../lib/lang");
|
217
|
-
|
218
|
-
var SAFE_INSERT_IN_TOKENS =
|
219
|
-
["text", "paren.rparen", "punctuation.operator"];
|
220
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
221
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
222
|
-
|
223
|
-
var context;
|
224
|
-
var contextCache = {};
|
225
|
-
var initContext = function(editor) {
|
226
|
-
var id = -1;
|
227
|
-
if (editor.multiSelect) {
|
228
|
-
id = editor.selection.index;
|
229
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
230
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
231
|
-
}
|
232
|
-
if (contextCache[id])
|
233
|
-
return context = contextCache[id];
|
234
|
-
context = contextCache[id] = {
|
235
|
-
autoInsertedBrackets: 0,
|
236
|
-
autoInsertedRow: -1,
|
237
|
-
autoInsertedLineEnd: "",
|
238
|
-
maybeInsertedBrackets: 0,
|
239
|
-
maybeInsertedRow: -1,
|
240
|
-
maybeInsertedLineStart: "",
|
241
|
-
maybeInsertedLineEnd: ""
|
242
|
-
};
|
243
|
-
};
|
244
|
-
|
245
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
246
|
-
var rowDiff = selection.end.row - selection.start.row;
|
247
|
-
return {
|
248
|
-
text: opening + selected + closing,
|
249
|
-
selection: [
|
250
|
-
0,
|
251
|
-
selection.start.column + 1,
|
252
|
-
rowDiff,
|
253
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
254
|
-
]
|
255
|
-
};
|
256
|
-
};
|
257
|
-
|
258
|
-
var CstyleBehaviour = function() {
|
259
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
260
|
-
var cursor = editor.getCursorPosition();
|
261
|
-
var line = session.doc.getLine(cursor.row);
|
262
|
-
if (text == '{') {
|
263
|
-
initContext(editor);
|
264
|
-
var selection = editor.getSelectionRange();
|
265
|
-
var selected = session.doc.getTextRange(selection);
|
266
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
267
|
-
return getWrapped(selection, selected, '{', '}');
|
268
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
269
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
270
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
271
|
-
return {
|
272
|
-
text: '{}',
|
273
|
-
selection: [1, 1]
|
274
|
-
};
|
275
|
-
} else {
|
276
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
277
|
-
return {
|
278
|
-
text: '{',
|
279
|
-
selection: [1, 1]
|
280
|
-
};
|
281
|
-
}
|
282
|
-
}
|
283
|
-
} else if (text == '}') {
|
284
|
-
initContext(editor);
|
285
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
286
|
-
if (rightChar == '}') {
|
287
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
288
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
289
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
290
|
-
return {
|
291
|
-
text: '',
|
292
|
-
selection: [1, 1]
|
293
|
-
};
|
294
|
-
}
|
295
|
-
}
|
296
|
-
} else if (text == "\n" || text == "\r\n") {
|
297
|
-
initContext(editor);
|
298
|
-
var closing = "";
|
299
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
300
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
301
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
302
|
-
}
|
303
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
304
|
-
if (rightChar === '}') {
|
305
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
306
|
-
if (!openBracePos)
|
307
|
-
return null;
|
308
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
309
|
-
} else if (closing) {
|
310
|
-
var next_indent = this.$getIndent(line);
|
311
|
-
} else {
|
312
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
313
|
-
return;
|
314
|
-
}
|
315
|
-
var indent = next_indent + session.getTabString();
|
316
|
-
|
317
|
-
return {
|
318
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
319
|
-
selection: [1, indent.length, 1, indent.length]
|
320
|
-
};
|
321
|
-
} else {
|
322
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
323
|
-
}
|
324
|
-
});
|
325
|
-
|
326
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
327
|
-
var selected = session.doc.getTextRange(range);
|
328
|
-
if (!range.isMultiLine() && selected == '{') {
|
329
|
-
initContext(editor);
|
330
|
-
var line = session.doc.getLine(range.start.row);
|
331
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
332
|
-
if (rightChar == '}') {
|
333
|
-
range.end.column++;
|
334
|
-
return range;
|
335
|
-
} else {
|
336
|
-
context.maybeInsertedBrackets--;
|
337
|
-
}
|
338
|
-
}
|
339
|
-
});
|
340
|
-
|
341
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
342
|
-
if (text == '(') {
|
343
|
-
initContext(editor);
|
344
|
-
var selection = editor.getSelectionRange();
|
345
|
-
var selected = session.doc.getTextRange(selection);
|
346
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
347
|
-
return getWrapped(selection, selected, '(', ')');
|
348
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
349
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
350
|
-
return {
|
351
|
-
text: '()',
|
352
|
-
selection: [1, 1]
|
353
|
-
};
|
354
|
-
}
|
355
|
-
} else if (text == ')') {
|
356
|
-
initContext(editor);
|
357
|
-
var cursor = editor.getCursorPosition();
|
358
|
-
var line = session.doc.getLine(cursor.row);
|
359
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
360
|
-
if (rightChar == ')') {
|
361
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
362
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
363
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
364
|
-
return {
|
365
|
-
text: '',
|
366
|
-
selection: [1, 1]
|
367
|
-
};
|
368
|
-
}
|
369
|
-
}
|
370
|
-
}
|
371
|
-
});
|
372
|
-
|
373
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
374
|
-
var selected = session.doc.getTextRange(range);
|
375
|
-
if (!range.isMultiLine() && selected == '(') {
|
376
|
-
initContext(editor);
|
377
|
-
var line = session.doc.getLine(range.start.row);
|
378
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
379
|
-
if (rightChar == ')') {
|
380
|
-
range.end.column++;
|
381
|
-
return range;
|
382
|
-
}
|
383
|
-
}
|
384
|
-
});
|
385
|
-
|
386
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
387
|
-
if (text == '[') {
|
388
|
-
initContext(editor);
|
389
|
-
var selection = editor.getSelectionRange();
|
390
|
-
var selected = session.doc.getTextRange(selection);
|
391
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
392
|
-
return getWrapped(selection, selected, '[', ']');
|
393
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
394
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
395
|
-
return {
|
396
|
-
text: '[]',
|
397
|
-
selection: [1, 1]
|
398
|
-
};
|
399
|
-
}
|
400
|
-
} else if (text == ']') {
|
401
|
-
initContext(editor);
|
402
|
-
var cursor = editor.getCursorPosition();
|
403
|
-
var line = session.doc.getLine(cursor.row);
|
404
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
405
|
-
if (rightChar == ']') {
|
406
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
407
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
408
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
409
|
-
return {
|
410
|
-
text: '',
|
411
|
-
selection: [1, 1]
|
412
|
-
};
|
413
|
-
}
|
414
|
-
}
|
415
|
-
}
|
416
|
-
});
|
417
|
-
|
418
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
419
|
-
var selected = session.doc.getTextRange(range);
|
420
|
-
if (!range.isMultiLine() && selected == '[') {
|
421
|
-
initContext(editor);
|
422
|
-
var line = session.doc.getLine(range.start.row);
|
423
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
424
|
-
if (rightChar == ']') {
|
425
|
-
range.end.column++;
|
426
|
-
return range;
|
427
|
-
}
|
428
|
-
}
|
429
|
-
});
|
430
|
-
|
431
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
432
|
-
if (text == '"' || text == "'") {
|
433
|
-
initContext(editor);
|
434
|
-
var quote = text;
|
435
|
-
var selection = editor.getSelectionRange();
|
436
|
-
var selected = session.doc.getTextRange(selection);
|
437
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
438
|
-
return getWrapped(selection, selected, quote, quote);
|
439
|
-
} else if (!selected) {
|
440
|
-
var cursor = editor.getCursorPosition();
|
441
|
-
var line = session.doc.getLine(cursor.row);
|
442
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
443
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
444
|
-
|
445
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
446
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
447
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
448
|
-
return null;
|
449
|
-
|
450
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
451
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
452
|
-
|
453
|
-
var pair;
|
454
|
-
if (rightChar == quote) {
|
455
|
-
pair = stringBefore !== stringAfter;
|
456
|
-
} else {
|
457
|
-
if (stringBefore && !stringAfter)
|
458
|
-
return null; // wrap string with different quote
|
459
|
-
if (stringBefore && stringAfter)
|
460
|
-
return null; // do not pair quotes inside strings
|
461
|
-
var wordRe = session.$mode.tokenRe;
|
462
|
-
wordRe.lastIndex = 0;
|
463
|
-
var isWordBefore = wordRe.test(leftChar);
|
464
|
-
wordRe.lastIndex = 0;
|
465
|
-
var isWordAfter = wordRe.test(leftChar);
|
466
|
-
if (isWordBefore || isWordAfter)
|
467
|
-
return null; // before or after alphanumeric
|
468
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
469
|
-
return null; // there is rightChar and it isn't closing
|
470
|
-
pair = true;
|
471
|
-
}
|
472
|
-
return {
|
473
|
-
text: pair ? quote + quote : "",
|
474
|
-
selection: [1,1]
|
475
|
-
};
|
476
|
-
}
|
477
|
-
}
|
478
|
-
});
|
479
|
-
|
480
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
481
|
-
var selected = session.doc.getTextRange(range);
|
482
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
483
|
-
initContext(editor);
|
484
|
-
var line = session.doc.getLine(range.start.row);
|
485
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
486
|
-
if (rightChar == selected) {
|
487
|
-
range.end.column++;
|
488
|
-
return range;
|
489
|
-
}
|
490
|
-
}
|
491
|
-
});
|
492
|
-
|
493
|
-
};
|
494
|
-
|
495
|
-
|
496
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
497
|
-
var cursor = editor.getCursorPosition();
|
498
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
499
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
500
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
501
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
502
|
-
return false;
|
503
|
-
}
|
504
|
-
iterator.stepForward();
|
505
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
506
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
507
|
-
};
|
508
|
-
|
509
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
510
|
-
return types.indexOf(token.type || token) > -1;
|
511
|
-
};
|
512
|
-
|
513
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
514
|
-
var cursor = editor.getCursorPosition();
|
515
|
-
var line = session.doc.getLine(cursor.row);
|
516
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
517
|
-
context.autoInsertedBrackets = 0;
|
518
|
-
context.autoInsertedRow = cursor.row;
|
519
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
520
|
-
context.autoInsertedBrackets++;
|
521
|
-
};
|
522
|
-
|
523
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
524
|
-
var cursor = editor.getCursorPosition();
|
525
|
-
var line = session.doc.getLine(cursor.row);
|
526
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
527
|
-
context.maybeInsertedBrackets = 0;
|
528
|
-
context.maybeInsertedRow = cursor.row;
|
529
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
530
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
531
|
-
context.maybeInsertedBrackets++;
|
532
|
-
};
|
533
|
-
|
534
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
535
|
-
return context.autoInsertedBrackets > 0 &&
|
536
|
-
cursor.row === context.autoInsertedRow &&
|
537
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
538
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
539
|
-
};
|
540
|
-
|
541
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
542
|
-
return context.maybeInsertedBrackets > 0 &&
|
543
|
-
cursor.row === context.maybeInsertedRow &&
|
544
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
545
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
546
|
-
};
|
547
|
-
|
548
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
549
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
550
|
-
context.autoInsertedBrackets--;
|
551
|
-
};
|
552
|
-
|
553
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
554
|
-
if (context) {
|
555
|
-
context.maybeInsertedBrackets = 0;
|
556
|
-
context.maybeInsertedRow = -1;
|
557
|
-
}
|
558
|
-
};
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
563
|
-
|
564
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
565
|
-
});
|
566
|
-
|
567
210
|
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
568
211
|
"use strict";
|
569
212
|
|