wallaby 7.0.0.beta1 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/wallaby/core.js.map +3 -3
- data/app/assets/stylesheets/wallaby/base/_override_vars.scss +3 -0
- data/app/assets/stylesheets/wallaby/base.scss +2 -1
- data/lib/wallaby/version.rb +1 -1
- metadata +21 -434
- data/config/brakeman.ignore +0 -26
- data/config/massa.yml +0 -45
- data/config/rails_best_practices.yml +0 -42
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/comment/comment.js +0 -209
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/comment/continuecomment.js +0 -113
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/dialog/dialog.css +0 -32
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/dialog/dialog.js +0 -161
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/autorefresh.js +0 -47
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/fullscreen.css +0 -6
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/fullscreen.js +0 -41
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/panel.js +0 -127
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/placeholder.js +0 -63
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/display/rulers.js +0 -51
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/closebrackets.js +0 -191
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/closetag.js +0 -184
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/continuelist.js +0 -99
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/matchbrackets.js +0 -150
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/matchtags.js +0 -66
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/edit/trailingspace.js +0 -27
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/brace-fold.js +0 -105
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/comment-fold.js +0 -59
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/foldcode.js +0 -152
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/foldgutter.css +0 -20
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/foldgutter.js +0 -163
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/indent-fold.js +0 -48
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/markdown-fold.js +0 -49
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/fold/xml-fold.js +0 -184
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/anyword-hint.js +0 -41
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/css-hint.js +0 -60
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/html-hint.js +0 -350
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/javascript-hint.js +0 -157
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/show-hint.css +0 -36
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/show-hint.js +0 -460
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/sql-hint.js +0 -304
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/hint/xml-hint.js +0 -123
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/coffeescript-lint.js +0 -47
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/css-lint.js +0 -40
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/html-lint.js +0 -59
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/javascript-lint.js +0 -63
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/json-lint.js +0 -40
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/lint.css +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/lint.js +0 -252
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/lint/yaml-lint.js +0 -41
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/merge/merge.css +0 -119
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/merge/merge.js +0 -1002
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/mode/loadmode.js +0 -64
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/mode/multiplex.js +0 -131
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/mode/multiplex_test.js +0 -33
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/mode/overlay.js +0 -90
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/mode/simple.js +0 -216
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/runmode/colorize.js +0 -40
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/runmode/runmode-standalone.js +0 -158
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/runmode/runmode.js +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/runmode/runmode.node.js +0 -197
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/scroll/annotatescrollbar.js +0 -122
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/scroll/scrollpastend.js +0 -48
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/scroll/simplescrollbars.css +0 -66
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/scroll/simplescrollbars.js +0 -152
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/jump-to-line.js +0 -50
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/match-highlighter.js +0 -165
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/matchesonscrollbar.css +0 -8
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/matchesonscrollbar.js +0 -97
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/search.js +0 -260
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/search/searchcursor.js +0 -293
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/selection/active-line.js +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/selection/mark-selection.js +0 -119
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/selection/selection-pointer.js +0 -98
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/tern/tern.css +0 -87
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/tern/tern.js +0 -718
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/tern/worker.js +0 -44
- data/vendor/assets/javascripts/codemirror/5.49.2/addon/wrap/hardwrap.js +0 -145
- data/vendor/assets/javascripts/codemirror/5.49.2/lib/codemirror.js +0 -9783
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/apl/apl.js +0 -174
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/apl/index.html +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asciiarmor/asciiarmor.js +0 -74
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asciiarmor/index.html +0 -46
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asn.1/asn.1.js +0 -204
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asn.1/index.html +0 -78
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asterisk/asterisk.js +0 -220
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/asterisk/index.html +0 -155
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/brainfuck/brainfuck.js +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/brainfuck/index.html +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clike/clike.js +0 -935
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clike/index.html +0 -380
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clike/scala.html +0 -767
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clike/test.js +0 -165
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clojure/clojure.js +0 -292
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clojure/index.html +0 -95
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/clojure/test.js +0 -384
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cmake/cmake.js +0 -97
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cmake/index.html +0 -129
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cobol/cobol.js +0 -255
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cobol/index.html +0 -210
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/coffeescript/coffeescript.js +0 -359
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/coffeescript/index.html +0 -740
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/commonlisp/commonlisp.js +0 -124
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/commonlisp/index.html +0 -177
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/crystal/crystal.js +0 -433
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/crystal/index.html +0 -116
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/css.js +0 -831
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/gss.html +0 -104
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/gss_test.js +0 -17
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/index.html +0 -75
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/less.html +0 -152
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/less_test.js +0 -54
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/scss.html +0 -158
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/scss_test.js +0 -110
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/css/test.js +0 -217
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cypher/cypher.js +0 -150
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cypher/index.html +0 -64
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/cypher/test.js +0 -37
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/d/d.js +0 -223
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/d/index.html +0 -273
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/d/test.js +0 -11
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dart/dart.js +0 -166
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dart/index.html +0 -71
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/diff/diff.js +0 -47
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/diff/index.html +0 -117
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/django/django.js +0 -356
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/django/index.html +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dockerfile/dockerfile.js +0 -211
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dockerfile/index.html +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dockerfile/test.js +0 -128
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dtd/dtd.js +0 -142
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dtd/index.html +0 -89
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dylan/dylan.js +0 -352
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dylan/index.html +0 -407
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/dylan/test.js +0 -88
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ebnf/ebnf.js +0 -195
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ebnf/index.html +0 -102
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ecl/ecl.js +0 -206
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ecl/index.html +0 -52
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/eiffel/eiffel.js +0 -160
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/eiffel/index.html +0 -429
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/elm/elm.js +0 -205
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/elm/index.html +0 -61
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/erlang/erlang.js +0 -619
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/erlang/index.html +0 -76
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/factor/factor.js +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/factor/index.html +0 -77
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/fcl/fcl.js +0 -173
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/fcl/index.html +0 -108
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/forth/forth.js +0 -180
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/forth/index.html +0 -75
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/fortran/fortran.js +0 -188
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/fortran/index.html +0 -81
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gas/gas.js +0 -345
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gas/index.html +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gfm/gfm.js +0 -129
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gfm/index.html +0 -136
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gfm/test.js +0 -198
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gherkin/gherkin.js +0 -178
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/gherkin/index.html +0 -48
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/go/go.js +0 -187
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/go/index.html +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/groovy/groovy.js +0 -233
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/groovy/index.html +0 -84
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haml/haml.js +0 -161
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haml/index.html +0 -79
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haml/test.js +0 -97
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/handlebars/handlebars.js +0 -70
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/handlebars/index.html +0 -82
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haskell/haskell.js +0 -268
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haskell/index.html +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haskell-literate/haskell-literate.js +0 -43
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haskell-literate/index.html +0 -282
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haxe/haxe.js +0 -515
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/haxe/index.html +0 -124
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/htmlembedded/htmlembedded.js +0 -37
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/htmlembedded/index.html +0 -60
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/htmlmixed/htmlmixed.js +0 -152
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/htmlmixed/index.html +0 -100
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/http/http.js +0 -113
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/http/index.html +0 -45
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/idl/idl.js +0 -290
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/idl/index.html +0 -65
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/index.html +0 -165
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/javascript/index.html +0 -114
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/javascript/javascript.js +0 -930
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/javascript/json-ld.html +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/javascript/test.js +0 -513
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/javascript/typescript.html +0 -62
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/jinja2/index.html +0 -54
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/jinja2/jinja2.js +0 -146
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/jsx/index.html +0 -89
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/jsx/jsx.js +0 -148
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/jsx/test.js +0 -91
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/julia/index.html +0 -196
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/julia/julia.js +0 -429
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/livescript/index.html +0 -459
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/livescript/livescript.js +0 -280
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/lua/index.html +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/lua/lua.js +0 -159
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/markdown/index.html +0 -412
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/markdown/markdown.js +0 -883
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/markdown/test.js +0 -1317
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mathematica/index.html +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mathematica/mathematica.js +0 -176
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mbox/index.html +0 -44
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mbox/mbox.js +0 -129
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/meta.js +0 -219
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mirc/index.html +0 -161
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mirc/mirc.js +0 -193
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mllike/index.html +0 -198
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mllike/mllike.js +0 -359
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/modelica/index.html +0 -67
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/modelica/modelica.js +0 -245
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mscgen/index.html +0 -151
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mscgen/mscgen.js +0 -175
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mscgen/mscgen_test.js +0 -84
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mscgen/msgenny_test.js +0 -77
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mscgen/xu_test.js +0 -87
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mumps/index.html +0 -85
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/mumps/mumps.js +0 -148
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/nginx/index.html +0 -181
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/nginx/nginx.js +0 -178
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/nsis/index.html +0 -80
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/nsis/nsis.js +0 -95
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ntriples/index.html +0 -70
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ntriples/ntriples.js +0 -195
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/octave/index.html +0 -84
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/octave/octave.js +0 -139
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/oz/index.html +0 -59
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/oz/oz.js +0 -252
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pascal/index.html +0 -61
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pascal/pascal.js +0 -121
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pegjs/index.html +0 -66
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pegjs/pegjs.js +0 -114
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/perl/index.html +0 -75
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/perl/perl.js +0 -837
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/php/index.html +0 -64
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/php/php.js +0 -234
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/php/test.js +0 -154
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pig/index.html +0 -53
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pig/pig.js +0 -178
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/powershell/index.html +0 -205
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/powershell/powershell.js +0 -398
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/powershell/test.js +0 -74
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/properties/index.html +0 -53
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/properties/properties.js +0 -78
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/protobuf/index.html +0 -104
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/protobuf/protobuf.js +0 -69
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pug/index.html +0 -70
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/pug/pug.js +0 -591
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/puppet/index.html +0 -121
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/puppet/puppet.js +0 -220
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/python/index.html +0 -207
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/python/python.js +0 -399
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/python/test.js +0 -44
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/q/index.html +0 -144
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/q/q.js +0 -139
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/r/index.html +0 -88
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/r/r.js +0 -190
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rpm/changes/index.html +0 -66
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rpm/index.html +0 -149
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rpm/rpm.js +0 -109
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rst/index.html +0 -535
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rst/rst.js +0 -557
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ruby/index.html +0 -183
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ruby/ruby.js +0 -298
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ruby/test.js +0 -23
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rust/index.html +0 -64
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rust/rust.js +0 -72
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/rust/test.js +0 -39
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sas/index.html +0 -81
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sas/sas.js +0 -303
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sass/index.html +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sass/sass.js +0 -454
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sass/test.js +0 -122
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/scheme/index.html +0 -77
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/scheme/scheme.js +0 -265
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/shell/index.html +0 -66
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/shell/shell.js +0 -152
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/shell/test.js +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sieve/index.html +0 -93
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sieve/sieve.js +0 -193
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/slim/index.html +0 -96
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/slim/slim.js +0 -575
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/slim/test.js +0 -96
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/smalltalk/index.html +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/smalltalk/smalltalk.js +0 -168
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/smarty/index.html +0 -138
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/smarty/smarty.js +0 -225
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/solr/index.html +0 -57
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/solr/solr.js +0 -104
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/soy/index.html +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/soy/soy.js +0 -437
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/soy/test.js +0 -204
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sparql/index.html +0 -61
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sparql/sparql.js +0 -180
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/spreadsheet/index.html +0 -42
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/spreadsheet/spreadsheet.js +0 -112
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sql/index.html +0 -89
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/sql/sql.js +0 -494
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/stex/index.html +0 -116
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/stex/stex.js +0 -264
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/stex/test.js +0 -132
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/stylus/index.html +0 -106
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/stylus/stylus.js +0 -771
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/swift/index.html +0 -70
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/swift/swift.js +0 -223
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/swift/test.js +0 -162
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tcl/index.html +0 -142
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tcl/tcl.js +0 -139
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/textile/index.html +0 -191
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/textile/test.js +0 -417
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/textile/textile.js +0 -469
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiddlywiki/index.html +0 -154
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiddlywiki/tiddlywiki.css +0 -14
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiddlywiki/tiddlywiki.js +0 -308
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiki/index.html +0 -95
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiki/tiki.css +0 -26
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tiki/tiki.js +0 -312
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/toml/index.html +0 -73
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/toml/toml.js +0 -88
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tornado/index.html +0 -63
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/tornado/tornado.js +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/troff/index.html +0 -146
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/troff/troff.js +0 -84
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ttcn/index.html +0 -119
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ttcn/ttcn.js +0 -283
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ttcn-cfg/index.html +0 -116
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/ttcn-cfg/ttcn-cfg.js +0 -214
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/turtle/index.html +0 -51
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/turtle/turtle.js +0 -162
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/twig/index.html +0 -45
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/twig/twig.js +0 -141
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vb/index.html +0 -49
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vb/vb.js +0 -275
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vbscript/index.html +0 -55
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vbscript/vbscript.js +0 -350
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/velocity/index.html +0 -120
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/velocity/velocity.js +0 -201
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/verilog/index.html +0 -120
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/verilog/test.js +0 -273
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/verilog/verilog.js +0 -675
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vhdl/index.html +0 -95
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vhdl/vhdl.js +0 -189
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vue/index.html +0 -69
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/vue/vue.js +0 -77
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/webidl/index.html +0 -71
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/webidl/webidl.js +0 -195
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xml/index.html +0 -61
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xml/test.js +0 -51
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xml/xml.js +0 -413
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xquery/index.html +0 -211
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xquery/test.js +0 -67
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/xquery/xquery.js +0 -448
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yacas/index.html +0 -87
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yacas/yacas.js +0 -204
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yaml/index.html +0 -80
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yaml/yaml.js +0 -120
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yaml-frontmatter/index.html +0 -121
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/yaml-frontmatter/yaml-frontmatter.js +0 -68
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/z80/index.html +0 -53
- data/vendor/assets/javascripts/codemirror/5.49.2/mode/z80/z80.js +0 -116
- data/vendor/assets/stylesheets/codemirror/5.49.2/lib/codemirror.css +0 -349
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/3024-day.css +0 -41
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/3024-night.css +0 -39
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/abcdef.css +0 -32
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/ambiance-mobile.css +0 -5
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/ambiance.css +0 -74
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/base16-dark.css +0 -38
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/base16-light.css +0 -38
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/bespin.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/blackboard.css +0 -32
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/cobalt.css +0 -25
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/colorforth.css +0 -33
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/darcula.css +0 -53
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/dracula.css +0 -40
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/duotone-dark.css +0 -35
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/duotone-light.css +0 -36
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/eclipse.css +0 -23
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/elegant.css +0 -13
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/erlang-dark.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/gruvbox-dark.css +0 -37
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/hopscotch.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/icecoder.css +0 -43
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/idea.css +0 -42
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/isotope.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/lesser-dark.css +0 -47
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/liquibyte.css +0 -95
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/lucario.css +0 -37
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/material-darker.css +0 -135
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/material-ocean.css +0 -135
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/material-palenight.css +0 -135
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/material.css +0 -135
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/mbo.css +0 -37
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/mdn-like.css +0 -46
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/midnight.css +0 -39
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/monokai.css +0 -41
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/moxer.css +0 -143
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/neat.css +0 -12
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/neo.css +0 -43
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/night.css +0 -27
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/nord.css +0 -42
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/oceanic-next.css +0 -44
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/panda-syntax.css +0 -85
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/paraiso-dark.css +0 -38
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/paraiso-light.css +0 -38
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/pastel-on-dark.css +0 -52
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/railscasts.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/rubyblue.css +0 -25
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/seti.css +0 -44
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/shadowfox.css +0 -52
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/solarized.css +0 -168
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/ssms.css +0 -16
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/the-matrix.css +0 -30
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/tomorrow-night-bright.css +0 -35
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/tomorrow-night-eighties.css +0 -38
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/ttcn.css +0 -64
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/twilight.css +0 -32
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/vibrant-ink.css +0 -34
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/xq-dark.css +0 -53
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/xq-light.css +0 -43
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/yeti.css +0 -44
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/yonce.css +0 -59
- data/vendor/assets/stylesheets/codemirror/5.49.2/theme/zenburn.css +0 -37
@@ -1,127 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
CodeMirror.defineExtension("addPanel", function(node, options) {
|
13
|
-
options = options || {};
|
14
|
-
|
15
|
-
if (!this.state.panels) initPanels(this);
|
16
|
-
|
17
|
-
var info = this.state.panels;
|
18
|
-
var wrapper = info.wrapper;
|
19
|
-
var cmWrapper = this.getWrapperElement();
|
20
|
-
var replace = options.replace instanceof Panel && !options.replace.cleared;
|
21
|
-
|
22
|
-
if (options.after instanceof Panel && !options.after.cleared) {
|
23
|
-
wrapper.insertBefore(node, options.before.node.nextSibling);
|
24
|
-
} else if (options.before instanceof Panel && !options.before.cleared) {
|
25
|
-
wrapper.insertBefore(node, options.before.node);
|
26
|
-
} else if (replace) {
|
27
|
-
wrapper.insertBefore(node, options.replace.node);
|
28
|
-
info.panels++;
|
29
|
-
options.replace.clear();
|
30
|
-
} else if (options.position == "bottom") {
|
31
|
-
wrapper.appendChild(node);
|
32
|
-
} else if (options.position == "before-bottom") {
|
33
|
-
wrapper.insertBefore(node, cmWrapper.nextSibling);
|
34
|
-
} else if (options.position == "after-top") {
|
35
|
-
wrapper.insertBefore(node, cmWrapper);
|
36
|
-
} else {
|
37
|
-
wrapper.insertBefore(node, wrapper.firstChild);
|
38
|
-
}
|
39
|
-
|
40
|
-
var height = (options && options.height) || node.offsetHeight;
|
41
|
-
this._setSize(null, info.heightLeft -= height);
|
42
|
-
if (!replace) {
|
43
|
-
info.panels++;
|
44
|
-
}
|
45
|
-
if (options.stable && isAtTop(this, node))
|
46
|
-
this.scrollTo(null, this.getScrollInfo().top + height)
|
47
|
-
|
48
|
-
return new Panel(this, node, options, height);
|
49
|
-
});
|
50
|
-
|
51
|
-
function Panel(cm, node, options, height) {
|
52
|
-
this.cm = cm;
|
53
|
-
this.node = node;
|
54
|
-
this.options = options;
|
55
|
-
this.height = height;
|
56
|
-
this.cleared = false;
|
57
|
-
}
|
58
|
-
|
59
|
-
Panel.prototype.clear = function() {
|
60
|
-
if (this.cleared) return;
|
61
|
-
this.cleared = true;
|
62
|
-
var info = this.cm.state.panels;
|
63
|
-
this.cm._setSize(null, info.heightLeft += this.height);
|
64
|
-
if (this.options.stable && isAtTop(this.cm, this.node))
|
65
|
-
this.cm.scrollTo(null, this.cm.getScrollInfo().top - this.height)
|
66
|
-
info.wrapper.removeChild(this.node);
|
67
|
-
if (--info.panels == 0) removePanels(this.cm);
|
68
|
-
};
|
69
|
-
|
70
|
-
Panel.prototype.changed = function(height) {
|
71
|
-
var newHeight = height == null ? this.node.offsetHeight : height;
|
72
|
-
var info = this.cm.state.panels;
|
73
|
-
this.cm._setSize(null, info.heightLeft -= (newHeight - this.height));
|
74
|
-
this.height = newHeight;
|
75
|
-
};
|
76
|
-
|
77
|
-
function initPanels(cm) {
|
78
|
-
var wrap = cm.getWrapperElement();
|
79
|
-
var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle;
|
80
|
-
var height = parseInt(style.height);
|
81
|
-
var info = cm.state.panels = {
|
82
|
-
setHeight: wrap.style.height,
|
83
|
-
heightLeft: height,
|
84
|
-
panels: 0,
|
85
|
-
wrapper: document.createElement("div")
|
86
|
-
};
|
87
|
-
wrap.parentNode.insertBefore(info.wrapper, wrap);
|
88
|
-
var hasFocus = cm.hasFocus();
|
89
|
-
info.wrapper.appendChild(wrap);
|
90
|
-
if (hasFocus) cm.focus();
|
91
|
-
|
92
|
-
cm._setSize = cm.setSize;
|
93
|
-
if (height != null) cm.setSize = function(width, newHeight) {
|
94
|
-
if (newHeight == null) return this._setSize(width, newHeight);
|
95
|
-
info.setHeight = newHeight;
|
96
|
-
if (typeof newHeight != "number") {
|
97
|
-
var px = /^(\d+\.?\d*)px$/.exec(newHeight);
|
98
|
-
if (px) {
|
99
|
-
newHeight = Number(px[1]);
|
100
|
-
} else {
|
101
|
-
info.wrapper.style.height = newHeight;
|
102
|
-
newHeight = info.wrapper.offsetHeight;
|
103
|
-
info.wrapper.style.height = "";
|
104
|
-
}
|
105
|
-
}
|
106
|
-
cm._setSize(width, info.heightLeft += (newHeight - height));
|
107
|
-
height = newHeight;
|
108
|
-
};
|
109
|
-
}
|
110
|
-
|
111
|
-
function removePanels(cm) {
|
112
|
-
var info = cm.state.panels;
|
113
|
-
cm.state.panels = null;
|
114
|
-
|
115
|
-
var wrap = cm.getWrapperElement();
|
116
|
-
info.wrapper.parentNode.replaceChild(wrap, info.wrapper);
|
117
|
-
wrap.style.height = info.setHeight;
|
118
|
-
cm.setSize = cm._setSize;
|
119
|
-
cm.setSize();
|
120
|
-
}
|
121
|
-
|
122
|
-
function isAtTop(cm, dom) {
|
123
|
-
for (var sibling = dom.nextSibling; sibling; sibling = sibling.nextSibling)
|
124
|
-
if (sibling == cm.getWrapperElement()) return true
|
125
|
-
return false
|
126
|
-
}
|
127
|
-
});
|
@@ -1,63 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
CodeMirror.defineOption("placeholder", "", function(cm, val, old) {
|
13
|
-
var prev = old && old != CodeMirror.Init;
|
14
|
-
if (val && !prev) {
|
15
|
-
cm.on("blur", onBlur);
|
16
|
-
cm.on("change", onChange);
|
17
|
-
cm.on("swapDoc", onChange);
|
18
|
-
onChange(cm);
|
19
|
-
} else if (!val && prev) {
|
20
|
-
cm.off("blur", onBlur);
|
21
|
-
cm.off("change", onChange);
|
22
|
-
cm.off("swapDoc", onChange);
|
23
|
-
clearPlaceholder(cm);
|
24
|
-
var wrapper = cm.getWrapperElement();
|
25
|
-
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "");
|
26
|
-
}
|
27
|
-
|
28
|
-
if (val && !cm.hasFocus()) onBlur(cm);
|
29
|
-
});
|
30
|
-
|
31
|
-
function clearPlaceholder(cm) {
|
32
|
-
if (cm.state.placeholder) {
|
33
|
-
cm.state.placeholder.parentNode.removeChild(cm.state.placeholder);
|
34
|
-
cm.state.placeholder = null;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
function setPlaceholder(cm) {
|
38
|
-
clearPlaceholder(cm);
|
39
|
-
var elt = cm.state.placeholder = document.createElement("pre");
|
40
|
-
elt.style.cssText = "height: 0; overflow: visible";
|
41
|
-
elt.style.direction = cm.getOption("direction");
|
42
|
-
elt.className = "CodeMirror-placeholder CodeMirror-line-like";
|
43
|
-
var placeHolder = cm.getOption("placeholder")
|
44
|
-
if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder)
|
45
|
-
elt.appendChild(placeHolder)
|
46
|
-
cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild);
|
47
|
-
}
|
48
|
-
|
49
|
-
function onBlur(cm) {
|
50
|
-
if (isEmpty(cm)) setPlaceholder(cm);
|
51
|
-
}
|
52
|
-
function onChange(cm) {
|
53
|
-
var wrapper = cm.getWrapperElement(), empty = isEmpty(cm);
|
54
|
-
wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : "");
|
55
|
-
|
56
|
-
if (empty) setPlaceholder(cm);
|
57
|
-
else clearPlaceholder(cm);
|
58
|
-
}
|
59
|
-
|
60
|
-
function isEmpty(cm) {
|
61
|
-
return (cm.lineCount() === 1) && (cm.getLine(0) === "");
|
62
|
-
}
|
63
|
-
});
|
@@ -1,51 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
CodeMirror.defineOption("rulers", false, function(cm, val) {
|
15
|
-
if (cm.state.rulerDiv) {
|
16
|
-
cm.state.rulerDiv.parentElement.removeChild(cm.state.rulerDiv)
|
17
|
-
cm.state.rulerDiv = null
|
18
|
-
cm.off("refresh", drawRulers)
|
19
|
-
}
|
20
|
-
if (val && val.length) {
|
21
|
-
cm.state.rulerDiv = cm.display.lineSpace.parentElement.insertBefore(document.createElement("div"), cm.display.lineSpace)
|
22
|
-
cm.state.rulerDiv.className = "CodeMirror-rulers"
|
23
|
-
drawRulers(cm)
|
24
|
-
cm.on("refresh", drawRulers)
|
25
|
-
}
|
26
|
-
});
|
27
|
-
|
28
|
-
function drawRulers(cm) {
|
29
|
-
cm.state.rulerDiv.textContent = ""
|
30
|
-
var val = cm.getOption("rulers");
|
31
|
-
var cw = cm.defaultCharWidth();
|
32
|
-
var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;
|
33
|
-
cm.state.rulerDiv.style.minHeight = (cm.display.scroller.offsetHeight + 30) + "px";
|
34
|
-
for (var i = 0; i < val.length; i++) {
|
35
|
-
var elt = document.createElement("div");
|
36
|
-
elt.className = "CodeMirror-ruler";
|
37
|
-
var col, conf = val[i];
|
38
|
-
if (typeof conf == "number") {
|
39
|
-
col = conf;
|
40
|
-
} else {
|
41
|
-
col = conf.column;
|
42
|
-
if (conf.className) elt.className += " " + conf.className;
|
43
|
-
if (conf.color) elt.style.borderColor = conf.color;
|
44
|
-
if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;
|
45
|
-
if (conf.width) elt.style.borderLeftWidth = conf.width;
|
46
|
-
}
|
47
|
-
elt.style.left = (left + col * cw) + "px";
|
48
|
-
cm.state.rulerDiv.appendChild(elt)
|
49
|
-
}
|
50
|
-
}
|
51
|
-
});
|
@@ -1,191 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
(function(mod) {
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
-
mod(require("../../lib/codemirror"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
var defaults = {
|
13
|
-
pairs: "()[]{}''\"\"",
|
14
|
-
closeBefore: ")]}'\":;>",
|
15
|
-
triples: "",
|
16
|
-
explode: "[]{}"
|
17
|
-
};
|
18
|
-
|
19
|
-
var Pos = CodeMirror.Pos;
|
20
|
-
|
21
|
-
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {
|
22
|
-
if (old && old != CodeMirror.Init) {
|
23
|
-
cm.removeKeyMap(keyMap);
|
24
|
-
cm.state.closeBrackets = null;
|
25
|
-
}
|
26
|
-
if (val) {
|
27
|
-
ensureBound(getOption(val, "pairs"))
|
28
|
-
cm.state.closeBrackets = val;
|
29
|
-
cm.addKeyMap(keyMap);
|
30
|
-
}
|
31
|
-
});
|
32
|
-
|
33
|
-
function getOption(conf, name) {
|
34
|
-
if (name == "pairs" && typeof conf == "string") return conf;
|
35
|
-
if (typeof conf == "object" && conf[name] != null) return conf[name];
|
36
|
-
return defaults[name];
|
37
|
-
}
|
38
|
-
|
39
|
-
var keyMap = {Backspace: handleBackspace, Enter: handleEnter};
|
40
|
-
function ensureBound(chars) {
|
41
|
-
for (var i = 0; i < chars.length; i++) {
|
42
|
-
var ch = chars.charAt(i), key = "'" + ch + "'"
|
43
|
-
if (!keyMap[key]) keyMap[key] = handler(ch)
|
44
|
-
}
|
45
|
-
}
|
46
|
-
ensureBound(defaults.pairs + "`")
|
47
|
-
|
48
|
-
function handler(ch) {
|
49
|
-
return function(cm) { return handleChar(cm, ch); };
|
50
|
-
}
|
51
|
-
|
52
|
-
function getConfig(cm) {
|
53
|
-
var deflt = cm.state.closeBrackets;
|
54
|
-
if (!deflt || deflt.override) return deflt;
|
55
|
-
var mode = cm.getModeAt(cm.getCursor());
|
56
|
-
return mode.closeBrackets || deflt;
|
57
|
-
}
|
58
|
-
|
59
|
-
function handleBackspace(cm) {
|
60
|
-
var conf = getConfig(cm);
|
61
|
-
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
|
62
|
-
|
63
|
-
var pairs = getOption(conf, "pairs");
|
64
|
-
var ranges = cm.listSelections();
|
65
|
-
for (var i = 0; i < ranges.length; i++) {
|
66
|
-
if (!ranges[i].empty()) return CodeMirror.Pass;
|
67
|
-
var around = charsAround(cm, ranges[i].head);
|
68
|
-
if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;
|
69
|
-
}
|
70
|
-
for (var i = ranges.length - 1; i >= 0; i--) {
|
71
|
-
var cur = ranges[i].head;
|
72
|
-
cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), "+delete");
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
function handleEnter(cm) {
|
77
|
-
var conf = getConfig(cm);
|
78
|
-
var explode = conf && getOption(conf, "explode");
|
79
|
-
if (!explode || cm.getOption("disableInput")) return CodeMirror.Pass;
|
80
|
-
|
81
|
-
var ranges = cm.listSelections();
|
82
|
-
for (var i = 0; i < ranges.length; i++) {
|
83
|
-
if (!ranges[i].empty()) return CodeMirror.Pass;
|
84
|
-
var around = charsAround(cm, ranges[i].head);
|
85
|
-
if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;
|
86
|
-
}
|
87
|
-
cm.operation(function() {
|
88
|
-
var linesep = cm.lineSeparator() || "\n";
|
89
|
-
cm.replaceSelection(linesep + linesep, null);
|
90
|
-
cm.execCommand("goCharLeft");
|
91
|
-
ranges = cm.listSelections();
|
92
|
-
for (var i = 0; i < ranges.length; i++) {
|
93
|
-
var line = ranges[i].head.line;
|
94
|
-
cm.indentLine(line, null, true);
|
95
|
-
cm.indentLine(line + 1, null, true);
|
96
|
-
}
|
97
|
-
});
|
98
|
-
}
|
99
|
-
|
100
|
-
function contractSelection(sel) {
|
101
|
-
var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;
|
102
|
-
return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),
|
103
|
-
head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};
|
104
|
-
}
|
105
|
-
|
106
|
-
function handleChar(cm, ch) {
|
107
|
-
var conf = getConfig(cm);
|
108
|
-
if (!conf || cm.getOption("disableInput")) return CodeMirror.Pass;
|
109
|
-
|
110
|
-
var pairs = getOption(conf, "pairs");
|
111
|
-
var pos = pairs.indexOf(ch);
|
112
|
-
if (pos == -1) return CodeMirror.Pass;
|
113
|
-
|
114
|
-
var closeBefore = getOption(conf,"closeBefore");
|
115
|
-
|
116
|
-
var triples = getOption(conf, "triples");
|
117
|
-
|
118
|
-
var identical = pairs.charAt(pos + 1) == ch;
|
119
|
-
var ranges = cm.listSelections();
|
120
|
-
var opening = pos % 2 == 0;
|
121
|
-
|
122
|
-
var type;
|
123
|
-
for (var i = 0; i < ranges.length; i++) {
|
124
|
-
var range = ranges[i], cur = range.head, curType;
|
125
|
-
var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));
|
126
|
-
if (opening && !range.empty()) {
|
127
|
-
curType = "surround";
|
128
|
-
} else if ((identical || !opening) && next == ch) {
|
129
|
-
if (identical && stringStartsAfter(cm, cur))
|
130
|
-
curType = "both";
|
131
|
-
else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)
|
132
|
-
curType = "skipThree";
|
133
|
-
else
|
134
|
-
curType = "skip";
|
135
|
-
} else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 &&
|
136
|
-
cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) {
|
137
|
-
if (cur.ch > 2 && /\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass;
|
138
|
-
curType = "addFour";
|
139
|
-
} else if (identical) {
|
140
|
-
var prev = cur.ch == 0 ? " " : cm.getRange(Pos(cur.line, cur.ch - 1), cur)
|
141
|
-
if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = "both";
|
142
|
-
else return CodeMirror.Pass;
|
143
|
-
} else if (opening && (next.length === 0 || /\s/.test(next) || closeBefore.indexOf(next) > -1)) {
|
144
|
-
curType = "both";
|
145
|
-
} else {
|
146
|
-
return CodeMirror.Pass;
|
147
|
-
}
|
148
|
-
if (!type) type = curType;
|
149
|
-
else if (type != curType) return CodeMirror.Pass;
|
150
|
-
}
|
151
|
-
|
152
|
-
var left = pos % 2 ? pairs.charAt(pos - 1) : ch;
|
153
|
-
var right = pos % 2 ? ch : pairs.charAt(pos + 1);
|
154
|
-
cm.operation(function() {
|
155
|
-
if (type == "skip") {
|
156
|
-
cm.execCommand("goCharRight");
|
157
|
-
} else if (type == "skipThree") {
|
158
|
-
for (var i = 0; i < 3; i++)
|
159
|
-
cm.execCommand("goCharRight");
|
160
|
-
} else if (type == "surround") {
|
161
|
-
var sels = cm.getSelections();
|
162
|
-
for (var i = 0; i < sels.length; i++)
|
163
|
-
sels[i] = left + sels[i] + right;
|
164
|
-
cm.replaceSelections(sels, "around");
|
165
|
-
sels = cm.listSelections().slice();
|
166
|
-
for (var i = 0; i < sels.length; i++)
|
167
|
-
sels[i] = contractSelection(sels[i]);
|
168
|
-
cm.setSelections(sels);
|
169
|
-
} else if (type == "both") {
|
170
|
-
cm.replaceSelection(left + right, null);
|
171
|
-
cm.triggerElectric(left + right);
|
172
|
-
cm.execCommand("goCharLeft");
|
173
|
-
} else if (type == "addFour") {
|
174
|
-
cm.replaceSelection(left + left + left + left, "before");
|
175
|
-
cm.execCommand("goCharRight");
|
176
|
-
}
|
177
|
-
});
|
178
|
-
}
|
179
|
-
|
180
|
-
function charsAround(cm, pos) {
|
181
|
-
var str = cm.getRange(Pos(pos.line, pos.ch - 1),
|
182
|
-
Pos(pos.line, pos.ch + 1));
|
183
|
-
return str.length == 2 ? str : null;
|
184
|
-
}
|
185
|
-
|
186
|
-
function stringStartsAfter(cm, pos) {
|
187
|
-
var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1))
|
188
|
-
return /\bstring/.test(token.type) && token.start == pos.ch &&
|
189
|
-
(pos.ch == 0 || !/\bstring/.test(cm.getTokenTypeAt(pos)))
|
190
|
-
}
|
191
|
-
});
|
@@ -1,184 +0,0 @@
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Tag-closer extension for CodeMirror.
|
6
|
-
*
|
7
|
-
* This extension adds an "autoCloseTags" option that can be set to
|
8
|
-
* either true to get the default behavior, or an object to further
|
9
|
-
* configure its behavior.
|
10
|
-
*
|
11
|
-
* These are supported options:
|
12
|
-
*
|
13
|
-
* `whenClosing` (default true)
|
14
|
-
* Whether to autoclose when the '/' of a closing tag is typed.
|
15
|
-
* `whenOpening` (default true)
|
16
|
-
* Whether to autoclose the tag when the final '>' of an opening
|
17
|
-
* tag is typed.
|
18
|
-
* `dontCloseTags` (default is empty tags for HTML, none for XML)
|
19
|
-
* An array of tag names that should not be autoclosed.
|
20
|
-
* `indentTags` (default is block tags for HTML, none for XML)
|
21
|
-
* An array of tag names that should, when opened, cause a
|
22
|
-
* blank line to be added inside the tag, and the blank line and
|
23
|
-
* closing line to be indented.
|
24
|
-
* `emptyTags` (default is none)
|
25
|
-
* An array of XML tag names that should be autoclosed with '/>'.
|
26
|
-
*
|
27
|
-
* See demos/closetag.html for a usage example.
|
28
|
-
*/
|
29
|
-
|
30
|
-
(function(mod) {
|
31
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
32
|
-
mod(require("../../lib/codemirror"), require("../fold/xml-fold"));
|
33
|
-
else if (typeof define == "function" && define.amd) // AMD
|
34
|
-
define(["../../lib/codemirror", "../fold/xml-fold"], mod);
|
35
|
-
else // Plain browser env
|
36
|
-
mod(CodeMirror);
|
37
|
-
})(function(CodeMirror) {
|
38
|
-
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {
|
39
|
-
if (old != CodeMirror.Init && old)
|
40
|
-
cm.removeKeyMap("autoCloseTags");
|
41
|
-
if (!val) return;
|
42
|
-
var map = {name: "autoCloseTags"};
|
43
|
-
if (typeof val != "object" || val.whenClosing)
|
44
|
-
map["'/'"] = function(cm) { return autoCloseSlash(cm); };
|
45
|
-
if (typeof val != "object" || val.whenOpening)
|
46
|
-
map["'>'"] = function(cm) { return autoCloseGT(cm); };
|
47
|
-
cm.addKeyMap(map);
|
48
|
-
});
|
49
|
-
|
50
|
-
var htmlDontClose = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param",
|
51
|
-
"source", "track", "wbr"];
|
52
|
-
var htmlIndent = ["applet", "blockquote", "body", "button", "div", "dl", "fieldset", "form", "frameset", "h1", "h2", "h3", "h4",
|
53
|
-
"h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];
|
54
|
-
|
55
|
-
function autoCloseGT(cm) {
|
56
|
-
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
57
|
-
var ranges = cm.listSelections(), replacements = [];
|
58
|
-
var opt = cm.getOption("autoCloseTags");
|
59
|
-
for (var i = 0; i < ranges.length; i++) {
|
60
|
-
if (!ranges[i].empty()) return CodeMirror.Pass;
|
61
|
-
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
62
|
-
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
63
|
-
var tagInfo = inner.mode.xmlCurrentTag && inner.mode.xmlCurrentTag(state)
|
64
|
-
var tagName = tagInfo && tagInfo.name
|
65
|
-
if (!tagName) return CodeMirror.Pass
|
66
|
-
|
67
|
-
var html = inner.mode.configuration == "html";
|
68
|
-
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);
|
69
|
-
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);
|
70
|
-
|
71
|
-
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);
|
72
|
-
var lowerTagName = tagName.toLowerCase();
|
73
|
-
// Don't process the '>' at the end of an end-tag or self-closing tag
|
74
|
-
if (!tagName ||
|
75
|
-
tok.type == "string" && (tok.end != pos.ch || !/[\"\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||
|
76
|
-
tok.type == "tag" && tagInfo.close ||
|
77
|
-
tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />
|
78
|
-
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||
|
79
|
-
closingTagExists(cm, inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state) || [], tagName, pos, true))
|
80
|
-
return CodeMirror.Pass;
|
81
|
-
|
82
|
-
var emptyTags = typeof opt == "object" && opt.emptyTags;
|
83
|
-
if (emptyTags && indexOf(emptyTags, tagName) > -1) {
|
84
|
-
replacements[i] = { text: "/>", newPos: CodeMirror.Pos(pos.line, pos.ch + 2) };
|
85
|
-
continue;
|
86
|
-
}
|
87
|
-
|
88
|
-
var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;
|
89
|
-
replacements[i] = {indent: indent,
|
90
|
-
text: ">" + (indent ? "\n\n" : "") + "</" + tagName + ">",
|
91
|
-
newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};
|
92
|
-
}
|
93
|
-
|
94
|
-
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnAutoClose);
|
95
|
-
for (var i = ranges.length - 1; i >= 0; i--) {
|
96
|
-
var info = replacements[i];
|
97
|
-
cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");
|
98
|
-
var sel = cm.listSelections().slice(0);
|
99
|
-
sel[i] = {head: info.newPos, anchor: info.newPos};
|
100
|
-
cm.setSelections(sel);
|
101
|
-
if (!dontIndentOnAutoClose && info.indent) {
|
102
|
-
cm.indentLine(info.newPos.line, null, true);
|
103
|
-
cm.indentLine(info.newPos.line + 1, null, true);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
}
|
107
|
-
|
108
|
-
function autoCloseCurrent(cm, typingSlash) {
|
109
|
-
var ranges = cm.listSelections(), replacements = [];
|
110
|
-
var head = typingSlash ? "/" : "</";
|
111
|
-
var opt = cm.getOption("autoCloseTags");
|
112
|
-
var dontIndentOnAutoClose = (typeof opt == "object" && opt.dontIndentOnSlash);
|
113
|
-
for (var i = 0; i < ranges.length; i++) {
|
114
|
-
if (!ranges[i].empty()) return CodeMirror.Pass;
|
115
|
-
var pos = ranges[i].head, tok = cm.getTokenAt(pos);
|
116
|
-
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;
|
117
|
-
if (typingSlash && (tok.type == "string" || tok.string.charAt(0) != "<" ||
|
118
|
-
tok.start != pos.ch - 1))
|
119
|
-
return CodeMirror.Pass;
|
120
|
-
// Kludge to get around the fact that we are not in XML mode
|
121
|
-
// when completing in JS/CSS snippet in htmlmixed mode. Does not
|
122
|
-
// work for other XML embedded languages (there is no general
|
123
|
-
// way to go from a mixed mode to its current XML state).
|
124
|
-
var replacement, mixed = inner.mode.name != "xml" && cm.getMode().name == "htmlmixed"
|
125
|
-
if (mixed && inner.mode.name == "javascript") {
|
126
|
-
replacement = head + "script";
|
127
|
-
} else if (mixed && inner.mode.name == "css") {
|
128
|
-
replacement = head + "style";
|
129
|
-
} else {
|
130
|
-
var context = inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state)
|
131
|
-
if (!context || (context.length && closingTagExists(cm, context, context[context.length - 1], pos)))
|
132
|
-
return CodeMirror.Pass;
|
133
|
-
replacement = head + context[context.length - 1]
|
134
|
-
}
|
135
|
-
if (cm.getLine(pos.line).charAt(tok.end) != ">") replacement += ">";
|
136
|
-
replacements[i] = replacement;
|
137
|
-
}
|
138
|
-
cm.replaceSelections(replacements);
|
139
|
-
ranges = cm.listSelections();
|
140
|
-
if (!dontIndentOnAutoClose) {
|
141
|
-
for (var i = 0; i < ranges.length; i++)
|
142
|
-
if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)
|
143
|
-
cm.indentLine(ranges[i].head.line);
|
144
|
-
}
|
145
|
-
}
|
146
|
-
|
147
|
-
function autoCloseSlash(cm) {
|
148
|
-
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
149
|
-
return autoCloseCurrent(cm, true);
|
150
|
-
}
|
151
|
-
|
152
|
-
CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };
|
153
|
-
|
154
|
-
function indexOf(collection, elt) {
|
155
|
-
if (collection.indexOf) return collection.indexOf(elt);
|
156
|
-
for (var i = 0, e = collection.length; i < e; ++i)
|
157
|
-
if (collection[i] == elt) return i;
|
158
|
-
return -1;
|
159
|
-
}
|
160
|
-
|
161
|
-
// If xml-fold is loaded, we use its functionality to try and verify
|
162
|
-
// whether a given tag is actually unclosed.
|
163
|
-
function closingTagExists(cm, context, tagName, pos, newTag) {
|
164
|
-
if (!CodeMirror.scanForClosingTag) return false;
|
165
|
-
var end = Math.min(cm.lastLine() + 1, pos.line + 500);
|
166
|
-
var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);
|
167
|
-
if (!nextClose || nextClose.tag != tagName) return false;
|
168
|
-
// If the immediate wrapping context contains onCx instances of
|
169
|
-
// the same tag, a closing tag only exists if there are at least
|
170
|
-
// that many closing tags of that type following.
|
171
|
-
var onCx = newTag ? 1 : 0
|
172
|
-
for (var i = context.length - 1; i >= 0; i--) {
|
173
|
-
if (context[i] == tagName) ++onCx
|
174
|
-
else break
|
175
|
-
}
|
176
|
-
pos = nextClose.to;
|
177
|
-
for (var i = 1; i < onCx; i++) {
|
178
|
-
var next = CodeMirror.scanForClosingTag(cm, pos, null, end);
|
179
|
-
if (!next || next.tag != tagName) return false;
|
180
|
-
pos = next.to;
|
181
|
-
}
|
182
|
-
return true;
|
183
|
-
}
|
184
|
-
});
|