wallaby 7.0.0.beta2 → 8.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 +1615 -1622
- data/app/assets/javascripts/wallaby/core.js.map +2 -2
- 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,99 +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
|
-
var listRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,
|
15
|
-
emptyListRE = /^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,
|
16
|
-
unorderedListRE = /[*+-]\s/;
|
17
|
-
|
18
|
-
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {
|
19
|
-
if (cm.getOption("disableInput")) return CodeMirror.Pass;
|
20
|
-
var ranges = cm.listSelections(), replacements = [];
|
21
|
-
for (var i = 0; i < ranges.length; i++) {
|
22
|
-
var pos = ranges[i].head;
|
23
|
-
|
24
|
-
// If we're not in Markdown mode, fall back to normal newlineAndIndent
|
25
|
-
var eolState = cm.getStateAfter(pos.line);
|
26
|
-
var inner = CodeMirror.innerMode(cm.getMode(), eolState);
|
27
|
-
if (inner.mode.name !== "markdown") {
|
28
|
-
cm.execCommand("newlineAndIndent");
|
29
|
-
return;
|
30
|
-
} else {
|
31
|
-
eolState = inner.state;
|
32
|
-
}
|
33
|
-
|
34
|
-
var inList = eolState.list !== false;
|
35
|
-
var inQuote = eolState.quote !== 0;
|
36
|
-
|
37
|
-
var line = cm.getLine(pos.line), match = listRE.exec(line);
|
38
|
-
var cursorBeforeBullet = /^\s*$/.test(line.slice(0, pos.ch));
|
39
|
-
if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {
|
40
|
-
cm.execCommand("newlineAndIndent");
|
41
|
-
return;
|
42
|
-
}
|
43
|
-
if (emptyListRE.test(line)) {
|
44
|
-
if (!/>\s*$/.test(line)) cm.replaceRange("", {
|
45
|
-
line: pos.line, ch: 0
|
46
|
-
}, {
|
47
|
-
line: pos.line, ch: pos.ch + 1
|
48
|
-
});
|
49
|
-
replacements[i] = "\n";
|
50
|
-
} else {
|
51
|
-
var indent = match[1], after = match[5];
|
52
|
-
var numbered = !(unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0);
|
53
|
-
var bullet = numbered ? (parseInt(match[3], 10) + 1) + match[4] : match[2].replace("x", " ");
|
54
|
-
replacements[i] = "\n" + indent + bullet + after;
|
55
|
-
|
56
|
-
if (numbered) incrementRemainingMarkdownListNumbers(cm, pos);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
cm.replaceSelections(replacements);
|
61
|
-
};
|
62
|
-
|
63
|
-
// Auto-updating Markdown list numbers when a new item is added to the
|
64
|
-
// middle of a list
|
65
|
-
function incrementRemainingMarkdownListNumbers(cm, pos) {
|
66
|
-
var startLine = pos.line, lookAhead = 0, skipCount = 0;
|
67
|
-
var startItem = listRE.exec(cm.getLine(startLine)), startIndent = startItem[1];
|
68
|
-
|
69
|
-
do {
|
70
|
-
lookAhead += 1;
|
71
|
-
var nextLineNumber = startLine + lookAhead;
|
72
|
-
var nextLine = cm.getLine(nextLineNumber), nextItem = listRE.exec(nextLine);
|
73
|
-
|
74
|
-
if (nextItem) {
|
75
|
-
var nextIndent = nextItem[1];
|
76
|
-
var newNumber = (parseInt(startItem[3], 10) + lookAhead - skipCount);
|
77
|
-
var nextNumber = (parseInt(nextItem[3], 10)), itemNumber = nextNumber;
|
78
|
-
|
79
|
-
if (startIndent === nextIndent && !isNaN(nextNumber)) {
|
80
|
-
if (newNumber === nextNumber) itemNumber = nextNumber + 1;
|
81
|
-
if (newNumber > nextNumber) itemNumber = newNumber + 1;
|
82
|
-
cm.replaceRange(
|
83
|
-
nextLine.replace(listRE, nextIndent + itemNumber + nextItem[4] + nextItem[5]),
|
84
|
-
{
|
85
|
-
line: nextLineNumber, ch: 0
|
86
|
-
}, {
|
87
|
-
line: nextLineNumber, ch: nextLine.length
|
88
|
-
});
|
89
|
-
} else {
|
90
|
-
if (startIndent.length > nextIndent.length) return;
|
91
|
-
// This doesn't run if the next line immediatley indents, as it is
|
92
|
-
// not clear of the users intention (new indented item or same level)
|
93
|
-
if ((startIndent.length < nextIndent.length) && (lookAhead === 1)) return;
|
94
|
-
skipCount += 1;
|
95
|
-
}
|
96
|
-
}
|
97
|
-
} while (nextItem);
|
98
|
-
}
|
99
|
-
});
|
@@ -1,150 +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 ie_lt8 = /MSIE \d/.test(navigator.userAgent) &&
|
13
|
-
(document.documentMode == null || document.documentMode < 8);
|
14
|
-
|
15
|
-
var Pos = CodeMirror.Pos;
|
16
|
-
|
17
|
-
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<", "<": ">>", ">": "<<"};
|
18
|
-
|
19
|
-
function bracketRegex(config) {
|
20
|
-
return config && config.bracketRegex || /[(){}[\]]/
|
21
|
-
}
|
22
|
-
|
23
|
-
function findMatchingBracket(cm, where, config) {
|
24
|
-
var line = cm.getLineHandle(where.line), pos = where.ch - 1;
|
25
|
-
var afterCursor = config && config.afterCursor
|
26
|
-
if (afterCursor == null)
|
27
|
-
afterCursor = /(^| )cm-fat-cursor($| )/.test(cm.getWrapperElement().className)
|
28
|
-
var re = bracketRegex(config)
|
29
|
-
|
30
|
-
// A cursor is defined as between two characters, but in in vim command mode
|
31
|
-
// (i.e. not insert mode), the cursor is visually represented as a
|
32
|
-
// highlighted box on top of the 2nd character. Otherwise, we allow matches
|
33
|
-
// from before or after the cursor.
|
34
|
-
var match = (!afterCursor && pos >= 0 && re.test(line.text.charAt(pos)) && matching[line.text.charAt(pos)]) ||
|
35
|
-
re.test(line.text.charAt(pos + 1)) && matching[line.text.charAt(++pos)];
|
36
|
-
if (!match) return null;
|
37
|
-
var dir = match.charAt(1) == ">" ? 1 : -1;
|
38
|
-
if (config && config.strict && (dir > 0) != (pos == where.ch)) return null;
|
39
|
-
var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));
|
40
|
-
|
41
|
-
var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);
|
42
|
-
if (found == null) return null;
|
43
|
-
return {from: Pos(where.line, pos), to: found && found.pos,
|
44
|
-
match: found && found.ch == match.charAt(0), forward: dir > 0};
|
45
|
-
}
|
46
|
-
|
47
|
-
// bracketRegex is used to specify which type of bracket to scan
|
48
|
-
// should be a regexp, e.g. /[[\]]/
|
49
|
-
//
|
50
|
-
// Note: If "where" is on an open bracket, then this bracket is ignored.
|
51
|
-
//
|
52
|
-
// Returns false when no bracket was found, null when it reached
|
53
|
-
// maxScanLines and gave up
|
54
|
-
function scanForBracket(cm, where, dir, style, config) {
|
55
|
-
var maxScanLen = (config && config.maxScanLineLength) || 10000;
|
56
|
-
var maxScanLines = (config && config.maxScanLines) || 1000;
|
57
|
-
|
58
|
-
var stack = [];
|
59
|
-
var re = bracketRegex(config)
|
60
|
-
var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)
|
61
|
-
: Math.max(cm.firstLine() - 1, where.line - maxScanLines);
|
62
|
-
for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {
|
63
|
-
var line = cm.getLine(lineNo);
|
64
|
-
if (!line) continue;
|
65
|
-
var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;
|
66
|
-
if (line.length > maxScanLen) continue;
|
67
|
-
if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);
|
68
|
-
for (; pos != end; pos += dir) {
|
69
|
-
var ch = line.charAt(pos);
|
70
|
-
if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {
|
71
|
-
var match = matching[ch];
|
72
|
-
if (match && (match.charAt(1) == ">") == (dir > 0)) stack.push(ch);
|
73
|
-
else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};
|
74
|
-
else stack.pop();
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;
|
79
|
-
}
|
80
|
-
|
81
|
-
function matchBrackets(cm, autoclear, config) {
|
82
|
-
// Disable brace matching in long lines, since it'll cause hugely slow updates
|
83
|
-
var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;
|
84
|
-
var marks = [], ranges = cm.listSelections();
|
85
|
-
for (var i = 0; i < ranges.length; i++) {
|
86
|
-
var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, config);
|
87
|
-
if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {
|
88
|
-
var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
|
89
|
-
marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));
|
90
|
-
if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)
|
91
|
-
marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
if (marks.length) {
|
96
|
-
// Kludge to work around the IE bug from issue #1193, where text
|
97
|
-
// input stops going to the textare whever this fires.
|
98
|
-
if (ie_lt8 && cm.state.focused) cm.focus();
|
99
|
-
|
100
|
-
var clear = function() {
|
101
|
-
cm.operation(function() {
|
102
|
-
for (var i = 0; i < marks.length; i++) marks[i].clear();
|
103
|
-
});
|
104
|
-
};
|
105
|
-
if (autoclear) setTimeout(clear, 800);
|
106
|
-
else return clear;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
|
110
|
-
function doMatchBrackets(cm) {
|
111
|
-
cm.operation(function() {
|
112
|
-
if (cm.state.matchBrackets.currentlyHighlighted) {
|
113
|
-
cm.state.matchBrackets.currentlyHighlighted();
|
114
|
-
cm.state.matchBrackets.currentlyHighlighted = null;
|
115
|
-
}
|
116
|
-
cm.state.matchBrackets.currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);
|
117
|
-
});
|
118
|
-
}
|
119
|
-
|
120
|
-
CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) {
|
121
|
-
if (old && old != CodeMirror.Init) {
|
122
|
-
cm.off("cursorActivity", doMatchBrackets);
|
123
|
-
if (cm.state.matchBrackets && cm.state.matchBrackets.currentlyHighlighted) {
|
124
|
-
cm.state.matchBrackets.currentlyHighlighted();
|
125
|
-
cm.state.matchBrackets.currentlyHighlighted = null;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
if (val) {
|
129
|
-
cm.state.matchBrackets = typeof val == "object" ? val : {};
|
130
|
-
cm.on("cursorActivity", doMatchBrackets);
|
131
|
-
}
|
132
|
-
});
|
133
|
-
|
134
|
-
CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});
|
135
|
-
CodeMirror.defineExtension("findMatchingBracket", function(pos, config, oldConfig){
|
136
|
-
// Backwards-compatibility kludge
|
137
|
-
if (oldConfig || typeof config == "boolean") {
|
138
|
-
if (!oldConfig) {
|
139
|
-
config = config ? {strict: true} : null
|
140
|
-
} else {
|
141
|
-
oldConfig.strict = config
|
142
|
-
config = oldConfig
|
143
|
-
}
|
144
|
-
}
|
145
|
-
return findMatchingBracket(this, pos, config)
|
146
|
-
});
|
147
|
-
CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){
|
148
|
-
return scanForBracket(this, pos, dir, style, config);
|
149
|
-
});
|
150
|
-
});
|
@@ -1,66 +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"), require("../fold/xml-fold"));
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
8
|
-
define(["../../lib/codemirror", "../fold/xml-fold"], mod);
|
9
|
-
else // Plain browser env
|
10
|
-
mod(CodeMirror);
|
11
|
-
})(function(CodeMirror) {
|
12
|
-
"use strict";
|
13
|
-
|
14
|
-
CodeMirror.defineOption("matchTags", false, function(cm, val, old) {
|
15
|
-
if (old && old != CodeMirror.Init) {
|
16
|
-
cm.off("cursorActivity", doMatchTags);
|
17
|
-
cm.off("viewportChange", maybeUpdateMatch);
|
18
|
-
clear(cm);
|
19
|
-
}
|
20
|
-
if (val) {
|
21
|
-
cm.state.matchBothTags = typeof val == "object" && val.bothTags;
|
22
|
-
cm.on("cursorActivity", doMatchTags);
|
23
|
-
cm.on("viewportChange", maybeUpdateMatch);
|
24
|
-
doMatchTags(cm);
|
25
|
-
}
|
26
|
-
});
|
27
|
-
|
28
|
-
function clear(cm) {
|
29
|
-
if (cm.state.tagHit) cm.state.tagHit.clear();
|
30
|
-
if (cm.state.tagOther) cm.state.tagOther.clear();
|
31
|
-
cm.state.tagHit = cm.state.tagOther = null;
|
32
|
-
}
|
33
|
-
|
34
|
-
function doMatchTags(cm) {
|
35
|
-
cm.state.failedTagMatch = false;
|
36
|
-
cm.operation(function() {
|
37
|
-
clear(cm);
|
38
|
-
if (cm.somethingSelected()) return;
|
39
|
-
var cur = cm.getCursor(), range = cm.getViewport();
|
40
|
-
range.from = Math.min(range.from, cur.line); range.to = Math.max(cur.line + 1, range.to);
|
41
|
-
var match = CodeMirror.findMatchingTag(cm, cur, range);
|
42
|
-
if (!match) return;
|
43
|
-
if (cm.state.matchBothTags) {
|
44
|
-
var hit = match.at == "open" ? match.open : match.close;
|
45
|
-
if (hit) cm.state.tagHit = cm.markText(hit.from, hit.to, {className: "CodeMirror-matchingtag"});
|
46
|
-
}
|
47
|
-
var other = match.at == "close" ? match.open : match.close;
|
48
|
-
if (other)
|
49
|
-
cm.state.tagOther = cm.markText(other.from, other.to, {className: "CodeMirror-matchingtag"});
|
50
|
-
else
|
51
|
-
cm.state.failedTagMatch = true;
|
52
|
-
});
|
53
|
-
}
|
54
|
-
|
55
|
-
function maybeUpdateMatch(cm) {
|
56
|
-
if (cm.state.failedTagMatch) doMatchTags(cm);
|
57
|
-
}
|
58
|
-
|
59
|
-
CodeMirror.commands.toMatchingTag = function(cm) {
|
60
|
-
var found = CodeMirror.findMatchingTag(cm, cm.getCursor());
|
61
|
-
if (found) {
|
62
|
-
var other = found.at == "close" ? found.open : found.close;
|
63
|
-
if (other) cm.extendSelection(other.to, other.from);
|
64
|
-
}
|
65
|
-
};
|
66
|
-
});
|
@@ -1,27 +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("showTrailingSpace", false, function(cm, val, prev) {
|
13
|
-
if (prev == CodeMirror.Init) prev = false;
|
14
|
-
if (prev && !val)
|
15
|
-
cm.removeOverlay("trailingspace");
|
16
|
-
else if (!prev && val)
|
17
|
-
cm.addOverlay({
|
18
|
-
token: function(stream) {
|
19
|
-
for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {}
|
20
|
-
if (i > stream.pos) { stream.pos = i; return null; }
|
21
|
-
stream.pos = l;
|
22
|
-
return "trailingspace";
|
23
|
-
},
|
24
|
-
name: "trailingspace"
|
25
|
-
});
|
26
|
-
});
|
27
|
-
});
|
@@ -1,105 +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.registerHelper("fold", "brace", function(cm, start) {
|
15
|
-
var line = start.line, lineText = cm.getLine(line);
|
16
|
-
var tokenType;
|
17
|
-
|
18
|
-
function findOpening(openCh) {
|
19
|
-
for (var at = start.ch, pass = 0;;) {
|
20
|
-
var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
|
21
|
-
if (found == -1) {
|
22
|
-
if (pass == 1) break;
|
23
|
-
pass = 1;
|
24
|
-
at = lineText.length;
|
25
|
-
continue;
|
26
|
-
}
|
27
|
-
if (pass == 1 && found < start.ch) break;
|
28
|
-
tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
|
29
|
-
if (!/^(comment|string)/.test(tokenType)) return found + 1;
|
30
|
-
at = found - 1;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
var startToken = "{", endToken = "}", startCh = findOpening("{");
|
35
|
-
if (startCh == null) {
|
36
|
-
startToken = "[", endToken = "]";
|
37
|
-
startCh = findOpening("[");
|
38
|
-
}
|
39
|
-
|
40
|
-
if (startCh == null) return;
|
41
|
-
var count = 1, lastLine = cm.lastLine(), end, endCh;
|
42
|
-
outer: for (var i = line; i <= lastLine; ++i) {
|
43
|
-
var text = cm.getLine(i), pos = i == line ? startCh : 0;
|
44
|
-
for (;;) {
|
45
|
-
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
|
46
|
-
if (nextOpen < 0) nextOpen = text.length;
|
47
|
-
if (nextClose < 0) nextClose = text.length;
|
48
|
-
pos = Math.min(nextOpen, nextClose);
|
49
|
-
if (pos == text.length) break;
|
50
|
-
if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
|
51
|
-
if (pos == nextOpen) ++count;
|
52
|
-
else if (!--count) { end = i; endCh = pos; break outer; }
|
53
|
-
}
|
54
|
-
++pos;
|
55
|
-
}
|
56
|
-
}
|
57
|
-
if (end == null || line == end) return;
|
58
|
-
return {from: CodeMirror.Pos(line, startCh),
|
59
|
-
to: CodeMirror.Pos(end, endCh)};
|
60
|
-
});
|
61
|
-
|
62
|
-
CodeMirror.registerHelper("fold", "import", function(cm, start) {
|
63
|
-
function hasImport(line) {
|
64
|
-
if (line < cm.firstLine() || line > cm.lastLine()) return null;
|
65
|
-
var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
|
66
|
-
if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
|
67
|
-
if (start.type != "keyword" || start.string != "import") return null;
|
68
|
-
// Now find closing semicolon, return its position
|
69
|
-
for (var i = line, e = Math.min(cm.lastLine(), line + 10); i <= e; ++i) {
|
70
|
-
var text = cm.getLine(i), semi = text.indexOf(";");
|
71
|
-
if (semi != -1) return {startCh: start.end, end: CodeMirror.Pos(i, semi)};
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
var startLine = start.line, has = hasImport(startLine), prev;
|
76
|
-
if (!has || hasImport(startLine - 1) || ((prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1))
|
77
|
-
return null;
|
78
|
-
for (var end = has.end;;) {
|
79
|
-
var next = hasImport(end.line + 1);
|
80
|
-
if (next == null) break;
|
81
|
-
end = next.end;
|
82
|
-
}
|
83
|
-
return {from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)), to: end};
|
84
|
-
});
|
85
|
-
|
86
|
-
CodeMirror.registerHelper("fold", "include", function(cm, start) {
|
87
|
-
function hasInclude(line) {
|
88
|
-
if (line < cm.firstLine() || line > cm.lastLine()) return null;
|
89
|
-
var start = cm.getTokenAt(CodeMirror.Pos(line, 1));
|
90
|
-
if (!/\S/.test(start.string)) start = cm.getTokenAt(CodeMirror.Pos(line, start.end + 1));
|
91
|
-
if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8;
|
92
|
-
}
|
93
|
-
|
94
|
-
var startLine = start.line, has = hasInclude(startLine);
|
95
|
-
if (has == null || hasInclude(startLine - 1) != null) return null;
|
96
|
-
for (var end = startLine;;) {
|
97
|
-
var next = hasInclude(end + 1);
|
98
|
-
if (next == null) break;
|
99
|
-
++end;
|
100
|
-
}
|
101
|
-
return {from: CodeMirror.Pos(startLine, has + 1),
|
102
|
-
to: cm.clipPos(CodeMirror.Pos(end))};
|
103
|
-
});
|
104
|
-
|
105
|
-
});
|
@@ -1,59 +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.registerGlobalHelper("fold", "comment", function(mode) {
|
15
|
-
return mode.blockCommentStart && mode.blockCommentEnd;
|
16
|
-
}, function(cm, start) {
|
17
|
-
var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
|
18
|
-
if (!startToken || !endToken) return;
|
19
|
-
var line = start.line, lineText = cm.getLine(line);
|
20
|
-
|
21
|
-
var startCh;
|
22
|
-
for (var at = start.ch, pass = 0;;) {
|
23
|
-
var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
|
24
|
-
if (found == -1) {
|
25
|
-
if (pass == 1) return;
|
26
|
-
pass = 1;
|
27
|
-
at = lineText.length;
|
28
|
-
continue;
|
29
|
-
}
|
30
|
-
if (pass == 1 && found < start.ch) return;
|
31
|
-
if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) &&
|
32
|
-
(found == 0 || lineText.slice(found - endToken.length, found) == endToken ||
|
33
|
-
!/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) {
|
34
|
-
startCh = found + startToken.length;
|
35
|
-
break;
|
36
|
-
}
|
37
|
-
at = found - 1;
|
38
|
-
}
|
39
|
-
|
40
|
-
var depth = 1, lastLine = cm.lastLine(), end, endCh;
|
41
|
-
outer: for (var i = line; i <= lastLine; ++i) {
|
42
|
-
var text = cm.getLine(i), pos = i == line ? startCh : 0;
|
43
|
-
for (;;) {
|
44
|
-
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
|
45
|
-
if (nextOpen < 0) nextOpen = text.length;
|
46
|
-
if (nextClose < 0) nextClose = text.length;
|
47
|
-
pos = Math.min(nextOpen, nextClose);
|
48
|
-
if (pos == text.length) break;
|
49
|
-
if (pos == nextOpen) ++depth;
|
50
|
-
else if (!--depth) { end = i; endCh = pos; break outer; }
|
51
|
-
++pos;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
if (end == null || line == end && endCh == startCh) return;
|
55
|
-
return {from: CodeMirror.Pos(line, startCh),
|
56
|
-
to: CodeMirror.Pos(end, endCh)};
|
57
|
-
});
|
58
|
-
|
59
|
-
});
|
@@ -1,152 +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
|
-
function doFold(cm, pos, options, force) {
|
15
|
-
if (options && options.call) {
|
16
|
-
var finder = options;
|
17
|
-
options = null;
|
18
|
-
} else {
|
19
|
-
var finder = getOption(cm, options, "rangeFinder");
|
20
|
-
}
|
21
|
-
if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);
|
22
|
-
var minSize = getOption(cm, options, "minFoldSize");
|
23
|
-
|
24
|
-
function getRange(allowFolded) {
|
25
|
-
var range = finder(cm, pos);
|
26
|
-
if (!range || range.to.line - range.from.line < minSize) return null;
|
27
|
-
var marks = cm.findMarksAt(range.from);
|
28
|
-
for (var i = 0; i < marks.length; ++i) {
|
29
|
-
if (marks[i].__isFold && force !== "fold") {
|
30
|
-
if (!allowFolded) return null;
|
31
|
-
range.cleared = true;
|
32
|
-
marks[i].clear();
|
33
|
-
}
|
34
|
-
}
|
35
|
-
return range;
|
36
|
-
}
|
37
|
-
|
38
|
-
var range = getRange(true);
|
39
|
-
if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) {
|
40
|
-
pos = CodeMirror.Pos(pos.line - 1, 0);
|
41
|
-
range = getRange(false);
|
42
|
-
}
|
43
|
-
if (!range || range.cleared || force === "unfold") return;
|
44
|
-
|
45
|
-
var myWidget = makeWidget(cm, options);
|
46
|
-
CodeMirror.on(myWidget, "mousedown", function(e) {
|
47
|
-
myRange.clear();
|
48
|
-
CodeMirror.e_preventDefault(e);
|
49
|
-
});
|
50
|
-
var myRange = cm.markText(range.from, range.to, {
|
51
|
-
replacedWith: myWidget,
|
52
|
-
clearOnEnter: getOption(cm, options, "clearOnEnter"),
|
53
|
-
__isFold: true
|
54
|
-
});
|
55
|
-
myRange.on("clear", function(from, to) {
|
56
|
-
CodeMirror.signal(cm, "unfold", cm, from, to);
|
57
|
-
});
|
58
|
-
CodeMirror.signal(cm, "fold", cm, range.from, range.to);
|
59
|
-
}
|
60
|
-
|
61
|
-
function makeWidget(cm, options) {
|
62
|
-
var widget = getOption(cm, options, "widget");
|
63
|
-
if (typeof widget == "string") {
|
64
|
-
var text = document.createTextNode(widget);
|
65
|
-
widget = document.createElement("span");
|
66
|
-
widget.appendChild(text);
|
67
|
-
widget.className = "CodeMirror-foldmarker";
|
68
|
-
} else if (widget) {
|
69
|
-
widget = widget.cloneNode(true)
|
70
|
-
}
|
71
|
-
return widget;
|
72
|
-
}
|
73
|
-
|
74
|
-
// Clumsy backwards-compatible interface
|
75
|
-
CodeMirror.newFoldFunction = function(rangeFinder, widget) {
|
76
|
-
return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); };
|
77
|
-
};
|
78
|
-
|
79
|
-
// New-style interface
|
80
|
-
CodeMirror.defineExtension("foldCode", function(pos, options, force) {
|
81
|
-
doFold(this, pos, options, force);
|
82
|
-
});
|
83
|
-
|
84
|
-
CodeMirror.defineExtension("isFolded", function(pos) {
|
85
|
-
var marks = this.findMarksAt(pos);
|
86
|
-
for (var i = 0; i < marks.length; ++i)
|
87
|
-
if (marks[i].__isFold) return true;
|
88
|
-
});
|
89
|
-
|
90
|
-
CodeMirror.commands.toggleFold = function(cm) {
|
91
|
-
cm.foldCode(cm.getCursor());
|
92
|
-
};
|
93
|
-
CodeMirror.commands.fold = function(cm) {
|
94
|
-
cm.foldCode(cm.getCursor(), null, "fold");
|
95
|
-
};
|
96
|
-
CodeMirror.commands.unfold = function(cm) {
|
97
|
-
cm.foldCode(cm.getCursor(), null, "unfold");
|
98
|
-
};
|
99
|
-
CodeMirror.commands.foldAll = function(cm) {
|
100
|
-
cm.operation(function() {
|
101
|
-
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
|
102
|
-
cm.foldCode(CodeMirror.Pos(i, 0), null, "fold");
|
103
|
-
});
|
104
|
-
};
|
105
|
-
CodeMirror.commands.unfoldAll = function(cm) {
|
106
|
-
cm.operation(function() {
|
107
|
-
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)
|
108
|
-
cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold");
|
109
|
-
});
|
110
|
-
};
|
111
|
-
|
112
|
-
CodeMirror.registerHelper("fold", "combine", function() {
|
113
|
-
var funcs = Array.prototype.slice.call(arguments, 0);
|
114
|
-
return function(cm, start) {
|
115
|
-
for (var i = 0; i < funcs.length; ++i) {
|
116
|
-
var found = funcs[i](cm, start);
|
117
|
-
if (found) return found;
|
118
|
-
}
|
119
|
-
};
|
120
|
-
});
|
121
|
-
|
122
|
-
CodeMirror.registerHelper("fold", "auto", function(cm, start) {
|
123
|
-
var helpers = cm.getHelpers(start, "fold");
|
124
|
-
for (var i = 0; i < helpers.length; i++) {
|
125
|
-
var cur = helpers[i](cm, start);
|
126
|
-
if (cur) return cur;
|
127
|
-
}
|
128
|
-
});
|
129
|
-
|
130
|
-
var defaultOptions = {
|
131
|
-
rangeFinder: CodeMirror.fold.auto,
|
132
|
-
widget: "\u2194",
|
133
|
-
minFoldSize: 0,
|
134
|
-
scanUp: false,
|
135
|
-
clearOnEnter: true
|
136
|
-
};
|
137
|
-
|
138
|
-
CodeMirror.defineOption("foldOptions", null);
|
139
|
-
|
140
|
-
function getOption(cm, options, name) {
|
141
|
-
if (options && options[name] !== undefined)
|
142
|
-
return options[name];
|
143
|
-
var editorOptions = cm.options.foldOptions;
|
144
|
-
if (editorOptions && editorOptions[name] !== undefined)
|
145
|
-
return editorOptions[name];
|
146
|
-
return defaultOptions[name];
|
147
|
-
}
|
148
|
-
|
149
|
-
CodeMirror.defineExtension("foldOption", function(options, name) {
|
150
|
-
return getOption(this, options, name);
|
151
|
-
});
|
152
|
-
});
|
@@ -1,20 +0,0 @@
|
|
1
|
-
.CodeMirror-foldmarker {
|
2
|
-
color: blue;
|
3
|
-
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
|
4
|
-
font-family: arial;
|
5
|
-
line-height: .3;
|
6
|
-
cursor: pointer;
|
7
|
-
}
|
8
|
-
.CodeMirror-foldgutter {
|
9
|
-
width: .7em;
|
10
|
-
}
|
11
|
-
.CodeMirror-foldgutter-open,
|
12
|
-
.CodeMirror-foldgutter-folded {
|
13
|
-
cursor: pointer;
|
14
|
-
}
|
15
|
-
.CodeMirror-foldgutter-open:after {
|
16
|
-
content: "\25BE";
|
17
|
-
}
|
18
|
-
.CodeMirror-foldgutter-folded:after {
|
19
|
-
content: "\25B8";
|
20
|
-
}
|