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
@@ -54,7 +54,7 @@ define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/
|
|
54
54
|
var oop = require("../lib/oop");
|
55
55
|
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
56
56
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
57
|
-
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]
|
57
|
+
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
|
58
58
|
|
59
59
|
var JavaScriptHighlightRules = function(options) {
|
60
60
|
var keywordMapper = this.createKeywordMapper({
|
@@ -70,9 +70,9 @@ var JavaScriptHighlightRules = function(options) {
|
|
70
70
|
"JSON|Math|" + // Other
|
71
71
|
"this|arguments|prototype|window|document" , // Pseudo
|
72
72
|
"keyword":
|
73
|
-
"const|yield|import|get|set|" +
|
73
|
+
"const|yield|import|get|set|async|await|" +
|
74
74
|
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
75
|
-
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
75
|
+
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
76
76
|
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
77
77
|
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
78
78
|
"storage.type":
|
@@ -178,7 +178,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
178
178
|
next : "property"
|
179
179
|
}, {
|
180
180
|
token : "keyword.operator",
|
181
|
-
regex : /--|\+\+|\.{3}
|
181
|
+
regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
|
182
182
|
next : "start"
|
183
183
|
}, {
|
184
184
|
token : "punctuation.operator",
|
@@ -379,7 +379,7 @@ var JavaScriptHighlightRules = function(options) {
|
|
379
379
|
}]
|
380
380
|
});
|
381
381
|
|
382
|
-
if (!options ||
|
382
|
+
if (!options || options.jsx != false)
|
383
383
|
JSX.call(this);
|
384
384
|
}
|
385
385
|
|
@@ -555,363 +555,6 @@ var MatchingBraceOutdent = function() {};
|
|
555
555
|
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
556
556
|
});
|
557
557
|
|
558
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
559
|
-
"use strict";
|
560
|
-
|
561
|
-
var oop = require("../../lib/oop");
|
562
|
-
var Behaviour = require("../behaviour").Behaviour;
|
563
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
564
|
-
var lang = require("../../lib/lang");
|
565
|
-
|
566
|
-
var SAFE_INSERT_IN_TOKENS =
|
567
|
-
["text", "paren.rparen", "punctuation.operator"];
|
568
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
569
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
570
|
-
|
571
|
-
var context;
|
572
|
-
var contextCache = {};
|
573
|
-
var initContext = function(editor) {
|
574
|
-
var id = -1;
|
575
|
-
if (editor.multiSelect) {
|
576
|
-
id = editor.selection.index;
|
577
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
578
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
579
|
-
}
|
580
|
-
if (contextCache[id])
|
581
|
-
return context = contextCache[id];
|
582
|
-
context = contextCache[id] = {
|
583
|
-
autoInsertedBrackets: 0,
|
584
|
-
autoInsertedRow: -1,
|
585
|
-
autoInsertedLineEnd: "",
|
586
|
-
maybeInsertedBrackets: 0,
|
587
|
-
maybeInsertedRow: -1,
|
588
|
-
maybeInsertedLineStart: "",
|
589
|
-
maybeInsertedLineEnd: ""
|
590
|
-
};
|
591
|
-
};
|
592
|
-
|
593
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
594
|
-
var rowDiff = selection.end.row - selection.start.row;
|
595
|
-
return {
|
596
|
-
text: opening + selected + closing,
|
597
|
-
selection: [
|
598
|
-
0,
|
599
|
-
selection.start.column + 1,
|
600
|
-
rowDiff,
|
601
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
602
|
-
]
|
603
|
-
};
|
604
|
-
};
|
605
|
-
|
606
|
-
var CstyleBehaviour = function() {
|
607
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
608
|
-
var cursor = editor.getCursorPosition();
|
609
|
-
var line = session.doc.getLine(cursor.row);
|
610
|
-
if (text == '{') {
|
611
|
-
initContext(editor);
|
612
|
-
var selection = editor.getSelectionRange();
|
613
|
-
var selected = session.doc.getTextRange(selection);
|
614
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
615
|
-
return getWrapped(selection, selected, '{', '}');
|
616
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
617
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
618
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
619
|
-
return {
|
620
|
-
text: '{}',
|
621
|
-
selection: [1, 1]
|
622
|
-
};
|
623
|
-
} else {
|
624
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
625
|
-
return {
|
626
|
-
text: '{',
|
627
|
-
selection: [1, 1]
|
628
|
-
};
|
629
|
-
}
|
630
|
-
}
|
631
|
-
} else if (text == '}') {
|
632
|
-
initContext(editor);
|
633
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
634
|
-
if (rightChar == '}') {
|
635
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
636
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
637
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
638
|
-
return {
|
639
|
-
text: '',
|
640
|
-
selection: [1, 1]
|
641
|
-
};
|
642
|
-
}
|
643
|
-
}
|
644
|
-
} else if (text == "\n" || text == "\r\n") {
|
645
|
-
initContext(editor);
|
646
|
-
var closing = "";
|
647
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
648
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
649
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
650
|
-
}
|
651
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
652
|
-
if (rightChar === '}') {
|
653
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
654
|
-
if (!openBracePos)
|
655
|
-
return null;
|
656
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
657
|
-
} else if (closing) {
|
658
|
-
var next_indent = this.$getIndent(line);
|
659
|
-
} else {
|
660
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
661
|
-
return;
|
662
|
-
}
|
663
|
-
var indent = next_indent + session.getTabString();
|
664
|
-
|
665
|
-
return {
|
666
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
667
|
-
selection: [1, indent.length, 1, indent.length]
|
668
|
-
};
|
669
|
-
} else {
|
670
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
671
|
-
}
|
672
|
-
});
|
673
|
-
|
674
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
675
|
-
var selected = session.doc.getTextRange(range);
|
676
|
-
if (!range.isMultiLine() && selected == '{') {
|
677
|
-
initContext(editor);
|
678
|
-
var line = session.doc.getLine(range.start.row);
|
679
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
680
|
-
if (rightChar == '}') {
|
681
|
-
range.end.column++;
|
682
|
-
return range;
|
683
|
-
} else {
|
684
|
-
context.maybeInsertedBrackets--;
|
685
|
-
}
|
686
|
-
}
|
687
|
-
});
|
688
|
-
|
689
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
690
|
-
if (text == '(') {
|
691
|
-
initContext(editor);
|
692
|
-
var selection = editor.getSelectionRange();
|
693
|
-
var selected = session.doc.getTextRange(selection);
|
694
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
695
|
-
return getWrapped(selection, selected, '(', ')');
|
696
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
697
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
698
|
-
return {
|
699
|
-
text: '()',
|
700
|
-
selection: [1, 1]
|
701
|
-
};
|
702
|
-
}
|
703
|
-
} else if (text == ')') {
|
704
|
-
initContext(editor);
|
705
|
-
var cursor = editor.getCursorPosition();
|
706
|
-
var line = session.doc.getLine(cursor.row);
|
707
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
708
|
-
if (rightChar == ')') {
|
709
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
710
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
711
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
712
|
-
return {
|
713
|
-
text: '',
|
714
|
-
selection: [1, 1]
|
715
|
-
};
|
716
|
-
}
|
717
|
-
}
|
718
|
-
}
|
719
|
-
});
|
720
|
-
|
721
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
722
|
-
var selected = session.doc.getTextRange(range);
|
723
|
-
if (!range.isMultiLine() && selected == '(') {
|
724
|
-
initContext(editor);
|
725
|
-
var line = session.doc.getLine(range.start.row);
|
726
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
727
|
-
if (rightChar == ')') {
|
728
|
-
range.end.column++;
|
729
|
-
return range;
|
730
|
-
}
|
731
|
-
}
|
732
|
-
});
|
733
|
-
|
734
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
735
|
-
if (text == '[') {
|
736
|
-
initContext(editor);
|
737
|
-
var selection = editor.getSelectionRange();
|
738
|
-
var selected = session.doc.getTextRange(selection);
|
739
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
740
|
-
return getWrapped(selection, selected, '[', ']');
|
741
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
742
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
743
|
-
return {
|
744
|
-
text: '[]',
|
745
|
-
selection: [1, 1]
|
746
|
-
};
|
747
|
-
}
|
748
|
-
} else if (text == ']') {
|
749
|
-
initContext(editor);
|
750
|
-
var cursor = editor.getCursorPosition();
|
751
|
-
var line = session.doc.getLine(cursor.row);
|
752
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
753
|
-
if (rightChar == ']') {
|
754
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
755
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
756
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
757
|
-
return {
|
758
|
-
text: '',
|
759
|
-
selection: [1, 1]
|
760
|
-
};
|
761
|
-
}
|
762
|
-
}
|
763
|
-
}
|
764
|
-
});
|
765
|
-
|
766
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
767
|
-
var selected = session.doc.getTextRange(range);
|
768
|
-
if (!range.isMultiLine() && selected == '[') {
|
769
|
-
initContext(editor);
|
770
|
-
var line = session.doc.getLine(range.start.row);
|
771
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
772
|
-
if (rightChar == ']') {
|
773
|
-
range.end.column++;
|
774
|
-
return range;
|
775
|
-
}
|
776
|
-
}
|
777
|
-
});
|
778
|
-
|
779
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
780
|
-
if (text == '"' || text == "'") {
|
781
|
-
initContext(editor);
|
782
|
-
var quote = text;
|
783
|
-
var selection = editor.getSelectionRange();
|
784
|
-
var selected = session.doc.getTextRange(selection);
|
785
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
786
|
-
return getWrapped(selection, selected, quote, quote);
|
787
|
-
} else if (!selected) {
|
788
|
-
var cursor = editor.getCursorPosition();
|
789
|
-
var line = session.doc.getLine(cursor.row);
|
790
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
791
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
792
|
-
|
793
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
794
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
795
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
796
|
-
return null;
|
797
|
-
|
798
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
799
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
800
|
-
|
801
|
-
var pair;
|
802
|
-
if (rightChar == quote) {
|
803
|
-
pair = stringBefore !== stringAfter;
|
804
|
-
} else {
|
805
|
-
if (stringBefore && !stringAfter)
|
806
|
-
return null; // wrap string with different quote
|
807
|
-
if (stringBefore && stringAfter)
|
808
|
-
return null; // do not pair quotes inside strings
|
809
|
-
var wordRe = session.$mode.tokenRe;
|
810
|
-
wordRe.lastIndex = 0;
|
811
|
-
var isWordBefore = wordRe.test(leftChar);
|
812
|
-
wordRe.lastIndex = 0;
|
813
|
-
var isWordAfter = wordRe.test(leftChar);
|
814
|
-
if (isWordBefore || isWordAfter)
|
815
|
-
return null; // before or after alphanumeric
|
816
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
817
|
-
return null; // there is rightChar and it isn't closing
|
818
|
-
pair = true;
|
819
|
-
}
|
820
|
-
return {
|
821
|
-
text: pair ? quote + quote : "",
|
822
|
-
selection: [1,1]
|
823
|
-
};
|
824
|
-
}
|
825
|
-
}
|
826
|
-
});
|
827
|
-
|
828
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
829
|
-
var selected = session.doc.getTextRange(range);
|
830
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
831
|
-
initContext(editor);
|
832
|
-
var line = session.doc.getLine(range.start.row);
|
833
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
834
|
-
if (rightChar == selected) {
|
835
|
-
range.end.column++;
|
836
|
-
return range;
|
837
|
-
}
|
838
|
-
}
|
839
|
-
});
|
840
|
-
|
841
|
-
};
|
842
|
-
|
843
|
-
|
844
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
845
|
-
var cursor = editor.getCursorPosition();
|
846
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
847
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
848
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
849
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
850
|
-
return false;
|
851
|
-
}
|
852
|
-
iterator.stepForward();
|
853
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
854
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
855
|
-
};
|
856
|
-
|
857
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
858
|
-
return types.indexOf(token.type || token) > -1;
|
859
|
-
};
|
860
|
-
|
861
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
862
|
-
var cursor = editor.getCursorPosition();
|
863
|
-
var line = session.doc.getLine(cursor.row);
|
864
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
865
|
-
context.autoInsertedBrackets = 0;
|
866
|
-
context.autoInsertedRow = cursor.row;
|
867
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
868
|
-
context.autoInsertedBrackets++;
|
869
|
-
};
|
870
|
-
|
871
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
872
|
-
var cursor = editor.getCursorPosition();
|
873
|
-
var line = session.doc.getLine(cursor.row);
|
874
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
875
|
-
context.maybeInsertedBrackets = 0;
|
876
|
-
context.maybeInsertedRow = cursor.row;
|
877
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
878
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
879
|
-
context.maybeInsertedBrackets++;
|
880
|
-
};
|
881
|
-
|
882
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
883
|
-
return context.autoInsertedBrackets > 0 &&
|
884
|
-
cursor.row === context.autoInsertedRow &&
|
885
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
886
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
887
|
-
};
|
888
|
-
|
889
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
890
|
-
return context.maybeInsertedBrackets > 0 &&
|
891
|
-
cursor.row === context.maybeInsertedRow &&
|
892
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
893
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
894
|
-
};
|
895
|
-
|
896
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
897
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
898
|
-
context.autoInsertedBrackets--;
|
899
|
-
};
|
900
|
-
|
901
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
902
|
-
if (context) {
|
903
|
-
context.maybeInsertedBrackets = 0;
|
904
|
-
context.maybeInsertedRow = -1;
|
905
|
-
}
|
906
|
-
};
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
911
|
-
|
912
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
913
|
-
});
|
914
|
-
|
915
558
|
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
916
559
|
"use strict";
|
917
560
|
|
@@ -1052,14 +695,13 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
1052
695
|
|
1053
696
|
});
|
1054
697
|
|
1055
|
-
define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/
|
698
|
+
define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
|
1056
699
|
"use strict";
|
1057
700
|
|
1058
701
|
var oop = require("../lib/oop");
|
1059
702
|
var TextMode = require("./text").Mode;
|
1060
703
|
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
1061
704
|
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
1062
|
-
var Range = require("../range").Range;
|
1063
705
|
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
1064
706
|
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
1065
707
|
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
@@ -1090,7 +732,7 @@ oop.inherits(Mode, TextMode);
|
|
1090
732
|
}
|
1091
733
|
|
1092
734
|
if (state == "start" || state == "no_regex") {
|
1093
|
-
var match = line.match(/^.*(?:\bcase\b
|
735
|
+
var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
|
1094
736
|
if (match) {
|
1095
737
|
indent += tab;
|
1096
738
|
}
|
@@ -1182,7 +824,7 @@ var TypeScriptHighlightRules = function(options) {
|
|
1182
824
|
}
|
1183
825
|
];
|
1184
826
|
|
1185
|
-
var JSRules = new JavaScriptHighlightRules({jsx: options && options.jsx}).getRules();
|
827
|
+
var JSRules = new JavaScriptHighlightRules({jsx: (options && options.jsx) == true}).getRules();
|
1186
828
|
|
1187
829
|
JSRules.start = tsRules.concat(JSRules.start);
|
1188
830
|
this.$rules = JSRules;
|
@@ -558,363 +558,6 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|
558
558
|
|
559
559
|
});
|
560
560
|
|
561
|
-
define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
562
|
-
"use strict";
|
563
|
-
|
564
|
-
var oop = require("../../lib/oop");
|
565
|
-
var Behaviour = require("../behaviour").Behaviour;
|
566
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
567
|
-
var lang = require("../../lib/lang");
|
568
|
-
|
569
|
-
var SAFE_INSERT_IN_TOKENS =
|
570
|
-
["text", "paren.rparen", "punctuation.operator"];
|
571
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
572
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
573
|
-
|
574
|
-
var context;
|
575
|
-
var contextCache = {};
|
576
|
-
var initContext = function(editor) {
|
577
|
-
var id = -1;
|
578
|
-
if (editor.multiSelect) {
|
579
|
-
id = editor.selection.index;
|
580
|
-
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
581
|
-
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
582
|
-
}
|
583
|
-
if (contextCache[id])
|
584
|
-
return context = contextCache[id];
|
585
|
-
context = contextCache[id] = {
|
586
|
-
autoInsertedBrackets: 0,
|
587
|
-
autoInsertedRow: -1,
|
588
|
-
autoInsertedLineEnd: "",
|
589
|
-
maybeInsertedBrackets: 0,
|
590
|
-
maybeInsertedRow: -1,
|
591
|
-
maybeInsertedLineStart: "",
|
592
|
-
maybeInsertedLineEnd: ""
|
593
|
-
};
|
594
|
-
};
|
595
|
-
|
596
|
-
var getWrapped = function(selection, selected, opening, closing) {
|
597
|
-
var rowDiff = selection.end.row - selection.start.row;
|
598
|
-
return {
|
599
|
-
text: opening + selected + closing,
|
600
|
-
selection: [
|
601
|
-
0,
|
602
|
-
selection.start.column + 1,
|
603
|
-
rowDiff,
|
604
|
-
selection.end.column + (rowDiff ? 0 : 1)
|
605
|
-
]
|
606
|
-
};
|
607
|
-
};
|
608
|
-
|
609
|
-
var CstyleBehaviour = function() {
|
610
|
-
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
611
|
-
var cursor = editor.getCursorPosition();
|
612
|
-
var line = session.doc.getLine(cursor.row);
|
613
|
-
if (text == '{') {
|
614
|
-
initContext(editor);
|
615
|
-
var selection = editor.getSelectionRange();
|
616
|
-
var selected = session.doc.getTextRange(selection);
|
617
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
618
|
-
return getWrapped(selection, selected, '{', '}');
|
619
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
620
|
-
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
|
621
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
622
|
-
return {
|
623
|
-
text: '{}',
|
624
|
-
selection: [1, 1]
|
625
|
-
};
|
626
|
-
} else {
|
627
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
628
|
-
return {
|
629
|
-
text: '{',
|
630
|
-
selection: [1, 1]
|
631
|
-
};
|
632
|
-
}
|
633
|
-
}
|
634
|
-
} else if (text == '}') {
|
635
|
-
initContext(editor);
|
636
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
637
|
-
if (rightChar == '}') {
|
638
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
639
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
640
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
641
|
-
return {
|
642
|
-
text: '',
|
643
|
-
selection: [1, 1]
|
644
|
-
};
|
645
|
-
}
|
646
|
-
}
|
647
|
-
} else if (text == "\n" || text == "\r\n") {
|
648
|
-
initContext(editor);
|
649
|
-
var closing = "";
|
650
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
651
|
-
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
652
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
653
|
-
}
|
654
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
655
|
-
if (rightChar === '}') {
|
656
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');
|
657
|
-
if (!openBracePos)
|
658
|
-
return null;
|
659
|
-
var next_indent = this.$getIndent(session.getLine(openBracePos.row));
|
660
|
-
} else if (closing) {
|
661
|
-
var next_indent = this.$getIndent(line);
|
662
|
-
} else {
|
663
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
664
|
-
return;
|
665
|
-
}
|
666
|
-
var indent = next_indent + session.getTabString();
|
667
|
-
|
668
|
-
return {
|
669
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
670
|
-
selection: [1, indent.length, 1, indent.length]
|
671
|
-
};
|
672
|
-
} else {
|
673
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
674
|
-
}
|
675
|
-
});
|
676
|
-
|
677
|
-
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
678
|
-
var selected = session.doc.getTextRange(range);
|
679
|
-
if (!range.isMultiLine() && selected == '{') {
|
680
|
-
initContext(editor);
|
681
|
-
var line = session.doc.getLine(range.start.row);
|
682
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
683
|
-
if (rightChar == '}') {
|
684
|
-
range.end.column++;
|
685
|
-
return range;
|
686
|
-
} else {
|
687
|
-
context.maybeInsertedBrackets--;
|
688
|
-
}
|
689
|
-
}
|
690
|
-
});
|
691
|
-
|
692
|
-
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
693
|
-
if (text == '(') {
|
694
|
-
initContext(editor);
|
695
|
-
var selection = editor.getSelectionRange();
|
696
|
-
var selected = session.doc.getTextRange(selection);
|
697
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
698
|
-
return getWrapped(selection, selected, '(', ')');
|
699
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
700
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
701
|
-
return {
|
702
|
-
text: '()',
|
703
|
-
selection: [1, 1]
|
704
|
-
};
|
705
|
-
}
|
706
|
-
} else if (text == ')') {
|
707
|
-
initContext(editor);
|
708
|
-
var cursor = editor.getCursorPosition();
|
709
|
-
var line = session.doc.getLine(cursor.row);
|
710
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
711
|
-
if (rightChar == ')') {
|
712
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
713
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
714
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
715
|
-
return {
|
716
|
-
text: '',
|
717
|
-
selection: [1, 1]
|
718
|
-
};
|
719
|
-
}
|
720
|
-
}
|
721
|
-
}
|
722
|
-
});
|
723
|
-
|
724
|
-
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
725
|
-
var selected = session.doc.getTextRange(range);
|
726
|
-
if (!range.isMultiLine() && selected == '(') {
|
727
|
-
initContext(editor);
|
728
|
-
var line = session.doc.getLine(range.start.row);
|
729
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
730
|
-
if (rightChar == ')') {
|
731
|
-
range.end.column++;
|
732
|
-
return range;
|
733
|
-
}
|
734
|
-
}
|
735
|
-
});
|
736
|
-
|
737
|
-
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
738
|
-
if (text == '[') {
|
739
|
-
initContext(editor);
|
740
|
-
var selection = editor.getSelectionRange();
|
741
|
-
var selected = session.doc.getTextRange(selection);
|
742
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
743
|
-
return getWrapped(selection, selected, '[', ']');
|
744
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
745
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
746
|
-
return {
|
747
|
-
text: '[]',
|
748
|
-
selection: [1, 1]
|
749
|
-
};
|
750
|
-
}
|
751
|
-
} else if (text == ']') {
|
752
|
-
initContext(editor);
|
753
|
-
var cursor = editor.getCursorPosition();
|
754
|
-
var line = session.doc.getLine(cursor.row);
|
755
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
756
|
-
if (rightChar == ']') {
|
757
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
758
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
759
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
760
|
-
return {
|
761
|
-
text: '',
|
762
|
-
selection: [1, 1]
|
763
|
-
};
|
764
|
-
}
|
765
|
-
}
|
766
|
-
}
|
767
|
-
});
|
768
|
-
|
769
|
-
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
770
|
-
var selected = session.doc.getTextRange(range);
|
771
|
-
if (!range.isMultiLine() && selected == '[') {
|
772
|
-
initContext(editor);
|
773
|
-
var line = session.doc.getLine(range.start.row);
|
774
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
775
|
-
if (rightChar == ']') {
|
776
|
-
range.end.column++;
|
777
|
-
return range;
|
778
|
-
}
|
779
|
-
}
|
780
|
-
});
|
781
|
-
|
782
|
-
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
783
|
-
if (text == '"' || text == "'") {
|
784
|
-
initContext(editor);
|
785
|
-
var quote = text;
|
786
|
-
var selection = editor.getSelectionRange();
|
787
|
-
var selected = session.doc.getTextRange(selection);
|
788
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
789
|
-
return getWrapped(selection, selected, quote, quote);
|
790
|
-
} else if (!selected) {
|
791
|
-
var cursor = editor.getCursorPosition();
|
792
|
-
var line = session.doc.getLine(cursor.row);
|
793
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
794
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
795
|
-
|
796
|
-
var token = session.getTokenAt(cursor.row, cursor.column);
|
797
|
-
var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
|
798
|
-
if (leftChar == "\\" && token && /escape/.test(token.type))
|
799
|
-
return null;
|
800
|
-
|
801
|
-
var stringBefore = token && /string|escape/.test(token.type);
|
802
|
-
var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
|
803
|
-
|
804
|
-
var pair;
|
805
|
-
if (rightChar == quote) {
|
806
|
-
pair = stringBefore !== stringAfter;
|
807
|
-
} else {
|
808
|
-
if (stringBefore && !stringAfter)
|
809
|
-
return null; // wrap string with different quote
|
810
|
-
if (stringBefore && stringAfter)
|
811
|
-
return null; // do not pair quotes inside strings
|
812
|
-
var wordRe = session.$mode.tokenRe;
|
813
|
-
wordRe.lastIndex = 0;
|
814
|
-
var isWordBefore = wordRe.test(leftChar);
|
815
|
-
wordRe.lastIndex = 0;
|
816
|
-
var isWordAfter = wordRe.test(leftChar);
|
817
|
-
if (isWordBefore || isWordAfter)
|
818
|
-
return null; // before or after alphanumeric
|
819
|
-
if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
|
820
|
-
return null; // there is rightChar and it isn't closing
|
821
|
-
pair = true;
|
822
|
-
}
|
823
|
-
return {
|
824
|
-
text: pair ? quote + quote : "",
|
825
|
-
selection: [1,1]
|
826
|
-
};
|
827
|
-
}
|
828
|
-
}
|
829
|
-
});
|
830
|
-
|
831
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
832
|
-
var selected = session.doc.getTextRange(range);
|
833
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
834
|
-
initContext(editor);
|
835
|
-
var line = session.doc.getLine(range.start.row);
|
836
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
837
|
-
if (rightChar == selected) {
|
838
|
-
range.end.column++;
|
839
|
-
return range;
|
840
|
-
}
|
841
|
-
}
|
842
|
-
});
|
843
|
-
|
844
|
-
};
|
845
|
-
|
846
|
-
|
847
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
848
|
-
var cursor = editor.getCursorPosition();
|
849
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
850
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
851
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
852
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
853
|
-
return false;
|
854
|
-
}
|
855
|
-
iterator.stepForward();
|
856
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
857
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
858
|
-
};
|
859
|
-
|
860
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
861
|
-
return types.indexOf(token.type || token) > -1;
|
862
|
-
};
|
863
|
-
|
864
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
865
|
-
var cursor = editor.getCursorPosition();
|
866
|
-
var line = session.doc.getLine(cursor.row);
|
867
|
-
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
868
|
-
context.autoInsertedBrackets = 0;
|
869
|
-
context.autoInsertedRow = cursor.row;
|
870
|
-
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
871
|
-
context.autoInsertedBrackets++;
|
872
|
-
};
|
873
|
-
|
874
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
875
|
-
var cursor = editor.getCursorPosition();
|
876
|
-
var line = session.doc.getLine(cursor.row);
|
877
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
878
|
-
context.maybeInsertedBrackets = 0;
|
879
|
-
context.maybeInsertedRow = cursor.row;
|
880
|
-
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
881
|
-
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
882
|
-
context.maybeInsertedBrackets++;
|
883
|
-
};
|
884
|
-
|
885
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
886
|
-
return context.autoInsertedBrackets > 0 &&
|
887
|
-
cursor.row === context.autoInsertedRow &&
|
888
|
-
bracket === context.autoInsertedLineEnd[0] &&
|
889
|
-
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
890
|
-
};
|
891
|
-
|
892
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
893
|
-
return context.maybeInsertedBrackets > 0 &&
|
894
|
-
cursor.row === context.maybeInsertedRow &&
|
895
|
-
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
896
|
-
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
897
|
-
};
|
898
|
-
|
899
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
900
|
-
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
901
|
-
context.autoInsertedBrackets--;
|
902
|
-
};
|
903
|
-
|
904
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
905
|
-
if (context) {
|
906
|
-
context.maybeInsertedBrackets = 0;
|
907
|
-
context.maybeInsertedRow = -1;
|
908
|
-
}
|
909
|
-
};
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
914
|
-
|
915
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
916
|
-
});
|
917
|
-
|
918
561
|
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
919
562
|
"use strict";
|
920
563
|
|
@@ -992,7 +635,7 @@ oop.inherits(Mode, TextMode);
|
|
992
635
|
}
|
993
636
|
|
994
637
|
if (state == "start" || state == "no_regex") {
|
995
|
-
var match = line.match(/^.*(?:\bcase\b
|
638
|
+
var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
|
996
639
|
if (match) {
|
997
640
|
indent += tab;
|
998
641
|
}
|