From 82a9b05d5f2cfb1ee6507d6f96cca1db7bcbb8b0 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 23 Jun 2016 12:30:40 +0200 Subject: [PATCH] upgrade to newest codemirror --- .../.gitattributes | 0 .../.gitignore | 0 .../.npmignore | 0 .../.travis.yml | 0 .../AUTHORS | 26 ++ .../CHANGELOG.md | 98 ++++- .../CONTRIBUTING.md | 0 .../LICENSE | 0 .../README.md | 0 .../addon/comment/comment.js | 11 +- .../addon/comment/continuecomment.js | 0 .../addon/dialog/dialog.css | 0 .../addon/dialog/dialog.js | 0 .../addon/display/autorefresh.js | 0 .../addon/display/fullscreen.css | 0 .../addon/display/fullscreen.js | 0 .../addon/display/panel.js | 0 .../addon/display/placeholder.js | 0 .../addon/display/rulers.js | 38 +- .../addon/edit/closebrackets.js | 2 +- .../addon/edit/closetag.js | 0 .../addon/edit/continuelist.js | 0 .../addon/edit/matchbrackets.js | 0 .../addon/edit/matchtags.js | 0 .../addon/edit/trailingspace.js | 0 .../addon/fold/brace-fold.js | 16 +- .../addon/fold/comment-fold.js | 2 +- .../addon/fold/foldcode.js | 5 +- .../addon/fold/foldgutter.css | 0 .../addon/fold/foldgutter.js | 2 +- .../addon/fold/indent-fold.js | 0 .../addon/fold/markdown-fold.js | 0 .../addon/fold/xml-fold.js | 6 +- .../addon/hint/anyword-hint.js | 0 .../addon/hint/css-hint.js | 0 .../addon/hint/html-hint.js | 0 .../addon/hint/javascript-hint.js | 0 .../addon/hint/show-hint.css | 3 +- .../addon/hint/show-hint.js | 66 ++- .../addon/hint/sql-hint.js | 26 +- .../addon/hint/xml-hint.js | 0 .../addon/lint/coffeescript-lint.js | 0 .../addon/lint/css-lint.js | 0 .../addon/lint/html-lint.js | 0 .../addon/lint/javascript-lint.js | 0 .../addon/lint/json-lint.js | 0 .../addon/lint/lint.css | 4 +- .../addon/lint/lint.js | 3 +- .../addon/lint/yaml-lint.js | 0 .../addon/merge/merge.css | 0 .../addon/merge/merge.js | 0 .../addon/mode/loadmode.js | 0 .../addon/mode/multiplex.js | 0 .../addon/mode/multiplex_test.js | 0 .../addon/mode/overlay.js | 0 .../addon/mode/simple.js | 0 .../addon/runmode/colorize.js | 0 .../addon/runmode/runmode-standalone.js | 0 .../addon/runmode/runmode.js | 0 .../addon/runmode/runmode.node.js | 0 .../addon/scroll/annotatescrollbar.js | 0 .../addon/scroll/scrollpastend.js | 2 + .../addon/scroll/simplescrollbars.css | 0 .../addon/scroll/simplescrollbars.js | 15 +- .../addon/search/jump-to-line.js | 0 .../addon/search/match-highlighter.js | 51 ++- .../addon/search/matchesonscrollbar.css | 0 .../addon/search/matchesonscrollbar.js | 0 .../addon/search/search.js | 35 +- .../addon/search/searchcursor.js | 0 .../addon/selection/active-line.js | 0 .../addon/selection/mark-selection.js | 0 .../addon/selection/selection-pointer.js | 0 .../addon/tern/tern.css | 0 .../addon/tern/tern.js | 4 +- .../addon/tern/worker.js | 0 .../addon/wrap/hardwrap.js | 4 +- .../bin/authors.sh | 0 .../bin/compress | 4 +- .../bin/lint | 0 .../bin/release | 8 +- .../bin/source-highlight | 0 .../CodeMirror-5.16.0/bin/upload-release.js | 35 ++ .../bower.json | 0 .../demo/activeline.html | 0 .../demo/anywordhint.html | 0 .../demo/bidi.html | 0 .../demo/btree.html | 0 .../demo/buffers.html | 0 .../demo/changemode.html | 0 .../demo/closebrackets.html | 0 .../demo/closetag.html | 0 .../demo/complete.html | 63 ++- .../demo/emacs.html | 0 .../demo/folding.html | 0 .../demo/fullscreen.html | 0 .../demo/hardwrap.html | 0 .../demo/html5complete.html | 0 .../demo/indentwrap.html | 0 .../demo/lint.html | 0 .../demo/loadmode.html | 0 .../demo/marker.html | 0 .../demo/markselection.html | 0 .../demo/matchhighlighter.html | 0 .../demo/matchtags.html | 0 .../demo/merge.html | 0 .../demo/multiplex.html | 0 .../demo/mustache.html | 0 .../demo/panel.html | 0 .../demo/placeholder.html | 0 .../demo/preview.html | 0 .../demo/requirejs.html | 0 .../demo/resize.html | 0 .../demo/rulers.html | 0 .../demo/runmode.html | 0 .../demo/search.html | 0 .../demo/simplemode.html | 0 .../demo/simplescrollbars.html | 0 .../demo/spanaffectswrapping_shim.html | 0 .../demo/sublime.html | 0 .../demo/tern.html | 0 .../demo/theme.html | 0 .../demo/trailingspace.html | 0 .../demo/variableheight.html | 0 .../demo/vim.html | 0 .../demo/visibletabs.html | 0 .../demo/widget.html | 0 .../demo/xmlcomplete.html | 0 .../doc/activebookmark.js | 0 .../doc/compress.html | 38 +- .../doc/docs.css | 0 .../doc/internals.html | 0 .../doc/logo.png | Bin .../doc/logo.svg | 0 .../doc/manual.html | 66 +-- .../doc/realworld.html | 7 +- .../doc/releases.html | 45 +- .../doc/reporting.html | 0 .../doc/upgrade_v2.2.html | 0 .../doc/upgrade_v3.html | 0 .../doc/upgrade_v4.html | 0 .../doc/yinyang.png | Bin .../index.html | 6 +- .../keymap/emacs.js | 0 .../keymap/sublime.js | 41 +- .../keymap/vim.js | 49 ++- .../lib/codemirror.css | 13 +- .../lib/codemirror.js | 117 ++++-- .../mode/apl/apl.js | 0 .../mode/apl/index.html | 0 .../mode/asciiarmor/asciiarmor.js | 0 .../mode/asciiarmor/index.html | 0 .../mode/asn.1/asn.1.js | 0 .../mode/asn.1/index.html | 0 .../mode/asterisk/asterisk.js | 0 .../mode/asterisk/index.html | 0 .../mode/brainfuck/brainfuck.js | 0 .../mode/brainfuck/index.html | 0 .../mode/clike/clike.js | 63 +-- .../mode/clike/index.html | 0 .../mode/clike/scala.html | 0 .../mode/clike/test.js | 4 + .../mode/clojure/clojure.js | 62 ++- .../mode/clojure/index.html | 0 .../mode/cmake/cmake.js | 0 .../mode/cmake/index.html | 0 .../mode/cobol/cobol.js | 0 .../mode/cobol/index.html | 0 .../mode/coffeescript/coffeescript.js | 0 .../mode/coffeescript/index.html | 0 .../mode/commonlisp/commonlisp.js | 0 .../mode/commonlisp/index.html | 0 .../mode/crystal/crystal.js | 2 +- .../mode/crystal/index.html | 0 .../mode/css/css.js | 12 +- .../mode/css/gss.html | 0 .../mode/css/gss_test.js | 0 .../mode/css/index.html | 0 .../mode/css/less.html | 0 .../mode/css/less_test.js | 0 .../mode/css/scss.html | 0 .../mode/css/scss_test.js | 0 .../mode/css/test.js | 0 .../mode/cypher/cypher.js | 0 .../mode/cypher/index.html | 0 .../mode/d/d.js | 0 .../mode/d/index.html | 0 .../mode/dart/dart.js | 0 .../mode/dart/index.html | 0 .../mode/diff/diff.js | 0 .../mode/diff/index.html | 0 .../mode/django/django.js | 16 +- .../mode/django/index.html | 0 .../mode/dockerfile/dockerfile.js | 0 .../mode/dockerfile/index.html | 0 .../mode/dtd/dtd.js | 12 +- .../mode/dtd/index.html | 0 .../mode/dylan/dylan.js | 0 .../mode/dylan/index.html | 0 .../mode/dylan/test.js | 0 .../mode/ebnf/ebnf.js | 2 +- .../mode/ebnf/index.html | 0 .../mode/ecl/ecl.js | 0 .../mode/ecl/index.html | 0 .../mode/eiffel/eiffel.js | 0 .../mode/eiffel/index.html | 0 .../mode/elm/elm.js | 0 .../mode/elm/index.html | 0 .../mode/erlang/erlang.js | 0 .../mode/erlang/index.html | 0 .../mode/factor/factor.js | 0 .../mode/factor/index.html | 0 .../mode/fcl/fcl.js | 0 .../mode/fcl/index.html | 0 .../mode/forth/forth.js | 0 .../mode/forth/index.html | 0 .../mode/fortran/fortran.js | 0 .../mode/fortran/index.html | 2 +- .../mode/gas/gas.js | 0 .../mode/gas/index.html | 0 .../mode/gfm/gfm.js | 0 .../mode/gfm/index.html | 2 +- .../mode/gfm/test.js | 6 + .../mode/gherkin/gherkin.js | 0 .../mode/gherkin/index.html | 0 .../mode/go/go.js | 2 +- .../mode/go/index.html | 0 .../mode/groovy/groovy.js | 0 .../mode/groovy/index.html | 0 .../mode/haml/haml.js | 6 +- .../mode/haml/index.html | 0 .../mode/haml/test.js | 0 .../mode/handlebars/handlebars.js | 0 .../mode/handlebars/index.html | 0 .../mode/haskell-literate/haskell-literate.js | 0 .../mode/haskell-literate/index.html | 0 .../mode/haskell/haskell.js | 0 .../mode/haskell/index.html | 0 .../mode/haxe/haxe.js | 0 .../mode/haxe/index.html | 0 .../mode/htmlembedded/htmlembedded.js | 0 .../mode/htmlembedded/index.html | 9 +- .../mode/htmlmixed/htmlmixed.js | 2 +- .../mode/htmlmixed/index.html | 0 .../mode/http/http.js | 0 .../mode/http/index.html | 0 .../mode/idl/idl.js | 0 .../mode/idl/index.html | 0 .../mode/index.html | 5 + .../mode/jade/index.html | 0 .../mode/jade/jade.js | 6 +- .../mode/javascript/index.html | 0 .../mode/javascript/javascript.js | 24 +- .../mode/javascript/json-ld.html | 0 .../mode/javascript/test.js | 0 .../mode/javascript/typescript.html | 0 .../mode/jinja2/index.html | 0 .../mode/jinja2/jinja2.js | 0 .../mode/jsx/index.html | 0 .../mode/jsx/jsx.js | 0 .../mode/jsx/test.js | 0 .../mode/julia/index.html | 0 .../mode/julia/julia.js | 0 .../mode/livescript/index.html | 0 .../mode/livescript/livescript.js | 0 .../mode/lua/index.html | 0 .../mode/lua/lua.js | 0 .../mode/markdown/index.html | 0 .../mode/markdown/markdown.js | 32 +- .../mode/markdown/test.js | 9 +- .../mode/mathematica/index.html | 0 .../mode/mathematica/mathematica.js | 1 + .../CodeMirror-5.16.0/mode/mbox/index.html | 44 ++ www/code/CodeMirror-5.16.0/mode/mbox/mbox.js | 129 ++++++ .../mode/meta.js | 9 +- .../mode/mirc/index.html | 0 .../mode/mirc/mirc.js | 0 .../mode/mllike/index.html | 0 .../mode/mllike/mllike.js | 0 .../mode/modelica/index.html | 0 .../mode/modelica/modelica.js | 0 .../mode/mscgen/index.html | 0 .../mode/mscgen/mscgen.js | 0 .../mode/mscgen/mscgen_test.js | 0 .../mode/mscgen/msgenny_test.js | 0 .../mode/mscgen/xu_test.js | 0 .../mode/mumps/index.html | 0 .../mode/mumps/mumps.js | 0 .../mode/nginx/index.html | 0 .../mode/nginx/nginx.js | 0 .../mode/nsis/index.html | 0 .../mode/nsis/nsis.js | 0 .../mode/ntriples/index.html | 0 .../mode/ntriples/ntriples.js | 0 .../mode/octave/index.html | 2 +- .../mode/octave/octave.js | 0 .../mode/oz/index.html | 0 .../mode/oz/oz.js | 0 .../mode/pascal/index.html | 0 .../mode/pascal/pascal.js | 0 .../mode/pegjs/index.html | 0 .../mode/pegjs/pegjs.js | 12 +- .../mode/perl/index.html | 0 .../mode/perl/perl.js | 2 +- .../mode/php/index.html | 0 .../mode/php/php.js | 2 +- .../mode/php/test.js | 0 .../mode/pig/index.html | 0 .../mode/pig/pig.js | 0 .../mode/powershell/index.html | 204 +++++++++ .../mode/powershell/powershell.js | 396 ++++++++++++++++++ .../CodeMirror-5.16.0/mode/powershell/test.js | 72 ++++ .../mode/properties/index.html | 0 .../mode/properties/properties.js | 2 +- .../mode/protobuf/index.html | 0 .../mode/protobuf/protobuf.js | 0 .../mode/puppet/index.html | 0 .../mode/puppet/puppet.js | 2 +- .../mode/python/index.html | 2 +- .../mode/python/python.js | 48 +-- .../CodeMirror-5.16.0/mode/python/test.js | 30 ++ .../mode/q/index.html | 0 .../mode/q/q.js | 0 .../mode/r/index.html | 0 .../mode/r/r.js | 0 .../mode/rpm/changes/index.html | 0 .../mode/rpm/index.html | 0 .../mode/rpm/rpm.js | 0 .../mode/rst/index.html | 0 .../mode/rst/rst.js | 0 .../mode/ruby/index.html | 0 .../mode/ruby/ruby.js | 0 .../mode/ruby/test.js | 0 .../mode/rust/index.html | 0 .../mode/rust/rust.js | 0 .../mode/rust/test.js | 0 .../CodeMirror-5.16.0/mode/sas/index.html | 81 ++++ www/code/CodeMirror-5.16.0/mode/sas/sas.js | 315 ++++++++++++++ .../mode/sass/index.html | 0 .../mode/sass/sass.js | 0 .../mode/scheme/index.html | 0 .../mode/scheme/scheme.js | 0 .../mode/shell/index.html | 0 .../mode/shell/shell.js | 0 .../mode/shell/test.js | 0 .../mode/sieve/index.html | 0 .../mode/sieve/sieve.js | 0 .../mode/slim/index.html | 0 .../mode/slim/slim.js | 8 +- .../mode/slim/test.js | 0 .../mode/smalltalk/index.html | 0 .../mode/smalltalk/smalltalk.js | 0 .../mode/smarty/index.html | 0 .../mode/smarty/smarty.js | 0 .../mode/solr/index.html | 0 .../mode/solr/solr.js | 0 .../mode/soy/index.html | 0 .../mode/soy/soy.js | 7 +- .../mode/sparql/index.html | 0 .../mode/sparql/sparql.js | 2 +- .../mode/spreadsheet/index.html | 0 .../mode/spreadsheet/spreadsheet.js | 0 .../mode/sql/index.html | 5 +- .../mode/sql/sql.js | 16 +- .../mode/stex/index.html | 0 .../mode/stex/stex.js | 0 .../mode/stex/test.js | 0 .../mode/stylus/index.html | 0 .../mode/stylus/stylus.js | 0 .../mode/swift/index.html | 0 .../mode/swift/swift.js | 0 .../mode/tcl/index.html | 0 .../mode/tcl/tcl.js | 0 .../mode/textile/index.html | 0 .../mode/textile/test.js | 0 .../mode/textile/textile.js | 0 .../mode/tiddlywiki/index.html | 0 .../mode/tiddlywiki/tiddlywiki.css | 0 .../mode/tiddlywiki/tiddlywiki.js | 206 ++++----- .../mode/tiki/index.html | 0 .../mode/tiki/tiki.css | 0 .../mode/tiki/tiki.js | 0 .../mode/toml/index.html | 0 .../mode/toml/toml.js | 0 .../mode/tornado/index.html | 0 .../mode/tornado/tornado.js | 0 .../mode/troff/index.html | 0 .../mode/troff/troff.js | 0 .../mode/ttcn-cfg/index.html | 0 .../mode/ttcn-cfg/ttcn-cfg.js | 0 .../mode/ttcn/index.html | 0 .../mode/ttcn/ttcn.js | 0 .../mode/turtle/index.html | 0 .../mode/turtle/turtle.js | 0 .../mode/twig/index.html | 0 .../mode/twig/twig.js | 0 .../mode/vb/index.html | 0 .../mode/vb/vb.js | 0 .../mode/vbscript/index.html | 0 .../mode/vbscript/vbscript.js | 0 .../mode/velocity/index.html | 0 .../mode/velocity/velocity.js | 0 .../mode/verilog/index.html | 2 +- .../mode/verilog/test.js | 2 +- .../mode/verilog/verilog.js | 2 +- .../mode/vhdl/index.html | 0 .../mode/vhdl/vhdl.js | 2 +- .../mode/vue/index.html | 0 .../mode/vue/vue.js | 0 .../CodeMirror-5.16.0/mode/webidl/index.html | 71 ++++ .../CodeMirror-5.16.0/mode/webidl/webidl.js | 195 +++++++++ .../mode/xml/index.html | 0 .../mode/xml/test.js | 0 .../mode/xml/xml.js | 0 .../mode/xquery/index.html | 0 .../mode/xquery/test.js | 0 .../mode/xquery/xquery.js | 2 +- .../CodeMirror-5.16.0/mode/yacas/index.html | 87 ++++ .../CodeMirror-5.16.0/mode/yacas/yacas.js | 204 +++++++++ .../mode/yaml-frontmatter/index.html | 2 +- .../mode/yaml-frontmatter/yaml-frontmatter.js | 0 .../mode/yaml/index.html | 0 .../mode/yaml/yaml.js | 0 .../mode/z80/index.html | 0 .../mode/z80/z80.js | 0 .../package.json | 4 +- .../test/comment_test.js | 0 .../test/doc_test.js | 0 .../test/driver.js | 0 .../test/emacs_test.js | 0 .../test/index.html | 5 + .../test/lint.js | 0 .../test/mode_test.css | 0 .../test/mode_test.js | 0 .../test/multi_test.js | 0 .../test/phantom_driver.js | 0 .../test/run.js | 0 .../test/scroll_test.js | 0 .../test/search_test.js | 0 .../test/sql-hint-test.js | 0 .../test/sublime_test.js | 4 + .../test/test.js | 0 .../test/vim_test.js | 16 +- .../theme/3024-day.css | 0 .../theme/3024-night.css | 0 .../theme/abcdef.css | 0 .../theme/ambiance-mobile.css | 0 .../theme/ambiance.css | 0 .../theme/base16-dark.css | 0 .../theme/base16-light.css | 0 .../theme/bespin.css | 0 .../theme/blackboard.css | 0 .../theme/cobalt.css | 0 .../theme/colorforth.css | 0 .../theme/dracula.css | 0 .../theme/eclipse.css | 0 .../theme/elegant.css | 0 .../theme/erlang-dark.css | 0 .../theme/hopscotch.css | 0 .../theme/icecoder.css | 8 +- .../theme/isotope.css | 0 .../theme/lesser-dark.css | 0 .../theme/liquibyte.css | 0 .../theme/material.css | 0 .../theme/mbo.css | 0 .../theme/mdn-like.css | 0 .../theme/midnight.css | 0 .../theme/monokai.css | 0 .../theme/neat.css | 0 .../theme/neo.css | 0 .../theme/night.css | 0 .../theme/paraiso-dark.css | 0 .../theme/paraiso-light.css | 0 .../theme/pastel-on-dark.css | 0 .../theme/railscasts.css | 0 .../theme/rubyblue.css | 0 .../theme/seti.css | 0 .../theme/solarized.css | 36 +- .../theme/the-matrix.css | 0 .../theme/tomorrow-night-bright.css | 0 .../theme/tomorrow-night-eighties.css | 0 .../theme/ttcn.css | 0 .../theme/twilight.css | 0 .../theme/vibrant-ink.css | 0 .../theme/xq-dark.css | 0 .../theme/xq-light.css | 0 .../theme/yeti.css | 0 .../theme/zenburn.css | 0 www/code/codemirror-5.13.2/mode/loadmode.js | 64 --- 489 files changed, 2808 insertions(+), 684 deletions(-) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/.gitattributes (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/.gitignore (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/.npmignore (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/.travis.yml (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/AUTHORS (95%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/CHANGELOG.md (93%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/CONTRIBUTING.md (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/LICENSE (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/README.md (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/comment/comment.js (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/comment/continuecomment.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/dialog/dialog.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/dialog/dialog.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/autorefresh.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/fullscreen.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/fullscreen.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/panel.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/placeholder.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/display/rulers.js (59%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/closebrackets.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/closetag.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/continuelist.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/matchbrackets.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/matchtags.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/edit/trailingspace.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/brace-fold.js (87%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/comment-fold.js (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/foldcode.js (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/foldgutter.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/foldgutter.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/indent-fold.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/markdown-fold.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/fold/xml-fold.js (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/anyword-hint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/css-hint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/html-hint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/javascript-hint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/show-hint.css (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/show-hint.js (91%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/sql-hint.js (92%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/hint/xml-hint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/coffeescript-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/css-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/html-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/javascript-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/json-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/lint.css (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/lint.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/lint/yaml-lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/merge/merge.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/merge/merge.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/mode/loadmode.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/mode/multiplex.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/mode/multiplex_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/mode/overlay.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/mode/simple.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/runmode/colorize.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/runmode/runmode-standalone.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/runmode/runmode.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/runmode/runmode.node.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/scroll/annotatescrollbar.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/scroll/scrollpastend.js (94%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/scroll/simplescrollbars.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/scroll/simplescrollbars.js (93%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/jump-to-line.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/match-highlighter.js (78%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/matchesonscrollbar.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/matchesonscrollbar.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/search.js (87%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/search/searchcursor.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/selection/active-line.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/selection/mark-selection.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/selection/selection-pointer.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/tern/tern.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/tern/tern.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/tern/worker.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/addon/wrap/hardwrap.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bin/authors.sh (100%) mode change 100644 => 100755 rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bin/compress (96%) mode change 100644 => 100755 rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bin/lint (100%) mode change 100644 => 100755 rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bin/release (86%) mode change 100644 => 100755 rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bin/source-highlight (100%) mode change 100644 => 100755 create mode 100644 www/code/CodeMirror-5.16.0/bin/upload-release.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/bower.json (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/activeline.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/anywordhint.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/bidi.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/btree.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/buffers.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/changemode.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/closebrackets.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/closetag.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/complete.html (55%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/emacs.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/folding.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/fullscreen.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/hardwrap.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/html5complete.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/indentwrap.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/lint.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/loadmode.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/marker.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/markselection.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/matchhighlighter.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/matchtags.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/merge.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/multiplex.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/mustache.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/panel.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/placeholder.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/preview.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/requirejs.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/resize.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/rulers.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/runmode.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/search.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/simplemode.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/simplescrollbars.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/spanaffectswrapping_shim.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/sublime.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/tern.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/theme.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/trailingspace.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/variableheight.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/vim.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/visibletabs.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/widget.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/demo/xmlcomplete.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/activebookmark.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/compress.html (94%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/docs.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/internals.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/logo.png (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/logo.svg (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/manual.html (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/realworld.html (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/releases.html (95%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/reporting.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/upgrade_v2.2.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/upgrade_v3.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/upgrade_v4.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/doc/yinyang.png (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/index.html (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/keymap/emacs.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/keymap/sublime.js (94%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/keymap/vim.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/lib/codemirror.css (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/lib/codemirror.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/apl/apl.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/apl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asciiarmor/asciiarmor.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asciiarmor/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asn.1/asn.1.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asn.1/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asterisk/asterisk.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/asterisk/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/brainfuck/brainfuck.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/brainfuck/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clike/clike.js (93%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clike/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clike/scala.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clike/test.js (87%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clojure/clojure.js (56%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/clojure/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cmake/cmake.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cmake/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cobol/cobol.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cobol/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/coffeescript/coffeescript.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/coffeescript/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/commonlisp/commonlisp.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/commonlisp/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/crystal/crystal.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/crystal/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/css.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/gss.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/gss_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/less.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/less_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/scss.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/scss_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/css/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cypher/cypher.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/cypher/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/d/d.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/d/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dart/dart.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dart/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/diff/diff.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/diff/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/django/django.js (95%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/django/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dockerfile/dockerfile.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dockerfile/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dtd/dtd.js (94%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dtd/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dylan/dylan.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dylan/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/dylan/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ebnf/ebnf.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ebnf/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ecl/ecl.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ecl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/eiffel/eiffel.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/eiffel/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/elm/elm.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/elm/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/erlang/erlang.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/erlang/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/factor/factor.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/factor/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/fcl/fcl.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/fcl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/forth/forth.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/forth/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/fortran/fortran.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/fortran/index.html (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gas/gas.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gas/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gfm/gfm.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gfm/index.html (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gfm/test.js (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gherkin/gherkin.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/gherkin/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/go/go.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/go/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/groovy/groovy.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/groovy/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haml/haml.js (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haml/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haml/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/handlebars/handlebars.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/handlebars/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haskell-literate/haskell-literate.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haskell-literate/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haskell/haskell.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haskell/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haxe/haxe.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/haxe/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/htmlembedded/htmlembedded.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/htmlembedded/index.html (87%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/htmlmixed/htmlmixed.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/htmlmixed/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/http/http.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/http/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/idl/idl.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/idl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/index.html (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jade/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jade/jade.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/javascript/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/javascript/javascript.js (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/javascript/json-ld.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/javascript/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/javascript/typescript.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jinja2/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jinja2/jinja2.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jsx/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jsx/jsx.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/jsx/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/julia/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/julia/julia.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/livescript/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/livescript/livescript.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/lua/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/lua/lua.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/markdown/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/markdown/markdown.js (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/markdown/test.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mathematica/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mathematica/mathematica.js (99%) create mode 100644 www/code/CodeMirror-5.16.0/mode/mbox/index.html create mode 100644 www/code/CodeMirror-5.16.0/mode/mbox/mbox.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/meta.js (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mirc/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mirc/mirc.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mllike/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mllike/mllike.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/modelica/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/modelica/modelica.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mscgen/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mscgen/mscgen.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mscgen/mscgen_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mscgen/msgenny_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mscgen/xu_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mumps/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/mumps/mumps.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/nginx/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/nginx/nginx.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/nsis/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/nsis/nsis.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ntriples/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ntriples/ntriples.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/octave/index.html (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/octave/octave.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/oz/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/oz/oz.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pascal/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pascal/pascal.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pegjs/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pegjs/pegjs.js (92%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/perl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/perl/perl.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/php/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/php/php.js (71%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/php/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pig/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/pig/pig.js (100%) create mode 100644 www/code/CodeMirror-5.16.0/mode/powershell/index.html create mode 100644 www/code/CodeMirror-5.16.0/mode/powershell/powershell.js create mode 100644 www/code/CodeMirror-5.16.0/mode/powershell/test.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/properties/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/properties/properties.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/protobuf/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/protobuf/protobuf.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/puppet/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/puppet/puppet.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/python/index.html (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/python/python.js (87%) create mode 100644 www/code/CodeMirror-5.16.0/mode/python/test.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/q/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/q/q.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/r/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/r/r.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rpm/changes/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rpm/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rpm/rpm.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rst/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rst/rst.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ruby/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ruby/ruby.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ruby/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rust/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rust/rust.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/rust/test.js (100%) create mode 100644 www/code/CodeMirror-5.16.0/mode/sas/index.html create mode 100755 www/code/CodeMirror-5.16.0/mode/sas/sas.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sass/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sass/sass.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/scheme/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/scheme/scheme.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/shell/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/shell/shell.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/shell/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sieve/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sieve/sieve.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/slim/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/slim/slim.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/slim/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/smalltalk/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/smalltalk/smalltalk.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/smarty/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/smarty/smarty.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/solr/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/solr/solr.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/soy/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/soy/soy.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sparql/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sparql/sparql.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/spreadsheet/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/spreadsheet/spreadsheet.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sql/index.html (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/sql/sql.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/stex/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/stex/stex.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/stex/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/stylus/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/stylus/stylus.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/swift/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/swift/swift.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tcl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tcl/tcl.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/textile/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/textile/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/textile/textile.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiddlywiki/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiddlywiki/tiddlywiki.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiddlywiki/tiddlywiki.js (60%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiki/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiki/tiki.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tiki/tiki.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/toml/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/toml/toml.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tornado/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/tornado/tornado.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/troff/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/troff/troff.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ttcn-cfg/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ttcn-cfg/ttcn-cfg.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ttcn/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/ttcn/ttcn.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/turtle/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/turtle/turtle.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/twig/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/twig/twig.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vb/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vb/vb.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vbscript/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vbscript/vbscript.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/velocity/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/velocity/velocity.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/verilog/index.html (96%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/verilog/test.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/verilog/verilog.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vhdl/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vhdl/vhdl.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vue/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/vue/vue.js (100%) create mode 100644 www/code/CodeMirror-5.16.0/mode/webidl/index.html create mode 100644 www/code/CodeMirror-5.16.0/mode/webidl/webidl.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xml/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xml/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xml/xml.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xquery/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xquery/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/xquery/xquery.js (99%) create mode 100644 www/code/CodeMirror-5.16.0/mode/yacas/index.html create mode 100644 www/code/CodeMirror-5.16.0/mode/yacas/yacas.js rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/yaml-frontmatter/index.html (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/yaml-frontmatter/yaml-frontmatter.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/yaml/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/yaml/yaml.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/z80/index.html (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/mode/z80/z80.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/package.json (91%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/comment_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/doc_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/driver.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/emacs_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/index.html (97%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/lint.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/mode_test.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/mode_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/multi_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/phantom_driver.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/run.js (100%) mode change 100644 => 100755 rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/scroll_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/search_test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/sql-hint-test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/sublime_test.js (98%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/test.js (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/test/vim_test.js (99%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/3024-day.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/3024-night.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/abcdef.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/ambiance-mobile.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/ambiance.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/base16-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/base16-light.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/bespin.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/blackboard.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/cobalt.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/colorforth.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/dracula.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/eclipse.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/elegant.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/erlang-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/hopscotch.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/icecoder.css (91%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/isotope.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/lesser-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/liquibyte.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/material.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/mbo.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/mdn-like.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/midnight.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/monokai.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/neat.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/neo.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/night.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/paraiso-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/paraiso-light.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/pastel-on-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/railscasts.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/rubyblue.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/seti.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/solarized.css (87%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/the-matrix.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/tomorrow-night-bright.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/tomorrow-night-eighties.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/ttcn.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/twilight.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/vibrant-ink.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/xq-dark.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/xq-light.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/yeti.css (100%) rename www/code/{codemirror-5.13.2 => CodeMirror-5.16.0}/theme/zenburn.css (100%) delete mode 100644 www/code/codemirror-5.13.2/mode/loadmode.js diff --git a/www/code/codemirror-5.13.2/.gitattributes b/www/code/CodeMirror-5.16.0/.gitattributes similarity index 100% rename from www/code/codemirror-5.13.2/.gitattributes rename to www/code/CodeMirror-5.16.0/.gitattributes diff --git a/www/code/codemirror-5.13.2/.gitignore b/www/code/CodeMirror-5.16.0/.gitignore similarity index 100% rename from www/code/codemirror-5.13.2/.gitignore rename to www/code/CodeMirror-5.16.0/.gitignore diff --git a/www/code/codemirror-5.13.2/.npmignore b/www/code/CodeMirror-5.16.0/.npmignore similarity index 100% rename from www/code/codemirror-5.13.2/.npmignore rename to www/code/CodeMirror-5.16.0/.npmignore diff --git a/www/code/codemirror-5.13.2/.travis.yml b/www/code/CodeMirror-5.16.0/.travis.yml similarity index 100% rename from www/code/codemirror-5.13.2/.travis.yml rename to www/code/CodeMirror-5.16.0/.travis.yml diff --git a/www/code/codemirror-5.13.2/AUTHORS b/www/code/CodeMirror-5.16.0/AUTHORS similarity index 95% rename from www/code/codemirror-5.13.2/AUTHORS rename to www/code/CodeMirror-5.16.0/AUTHORS index 03b1ac5b0..ce2be8d6d 100644 --- a/www/code/codemirror-5.13.2/AUTHORS +++ b/www/code/CodeMirror-5.16.0/AUTHORS @@ -14,6 +14,7 @@ Ahmad Amireh Ahmad M. Zawawi ahoward Akeksandr Motsjonov +Alasdair Smith Alberto González Palomo Alberto Pose Albert Xing @@ -45,6 +46,7 @@ Andre von Houck Andrey Fedorov Andrey Klyuchnikov Andrey Lushnikov +Andrey Shchekin Andy Joslin Andy Kimball Andy Li @@ -75,9 +77,11 @@ benbro Beni Cherniavsky-Paskin Benjamin DeCoste Ben Keen +Ben Miller Ben Mosher Bernhard Sirlinger Bert Chang +Bharad Billy Moon binny B Krishna Chaitanya @@ -94,6 +98,7 @@ Brian Sletten Bruce Mitchener Caitlin Potter Calin Barbat +Camilo Roca Chad Jolly Chandra Sekhar Pydi Charles Skelton @@ -104,6 +109,7 @@ Chris Granger Chris Houseknecht Chris Lohfink Chris Morgan +Chris Smith Christian Oyarzun Christian Petrov Christopher Brown @@ -135,6 +141,7 @@ Darius Roberts Dave Brondsema Dave Myers David Barnett +David H. Bronke David Mignot David Pathakjee David Vázquez @@ -183,6 +190,7 @@ Gabriel Gheorghian Gabriel Horner Gabriel Nahmias galambalazs +Gary Sheng Gautam Mehta Gavin Douglas gekkoe @@ -199,6 +207,7 @@ Gordon Smith Grant Skinner greengiant Gregory Koberger +Grzegorz Mazur Guillaume Massé Guillaume Massé guraga @@ -206,6 +215,7 @@ Gustavo Rodrigues Hakan Tunc Hans Engel Hardest +Harshvardhan Gupta Hasan Karahan Hector Oswaldo Caballero Herculano Campos @@ -230,6 +240,7 @@ Jakob Miland Jakub Vrana Jakub Vrána James Campos +James Howard James Thorne Jamie Hill Jan Jongboom @@ -238,7 +249,9 @@ Jan Keromnes Jan Odvarko Jan Schär Jan T. Sott +Jared Dean Jared Forsyth +Jared Jacobs Jason Jason Barnabe Jason Grout @@ -248,6 +261,7 @@ Jason Siefken Jaydeep Solanki Jean Boussier Jeff Blaisdell +Jeff Jenkins jeffkenton Jeff Pickhardt jem (graphite) @@ -256,6 +270,7 @@ Jim JobJob jochenberger Jochen Berger +joelpinheiro Johan Ask John Connor John Engler @@ -271,6 +286,7 @@ Jon Sangster Joost-Wim Boekesteijn Joseph Pecoraro Josh Cohen +Josh Soref Joshua Newman Josh Watzman jots @@ -297,6 +313,7 @@ Koh Zi Han, Cliff komakino Konstantin Lopuhin koops +Kris Ciccarello ks-ifware kubelsmieci KwanEsq @@ -314,6 +331,7 @@ LM lochel Lorenzo Stoakes Luciano Longo +Lu Fangjian Luke Stagner lynschinzer M1cha @@ -321,6 +339,7 @@ Madhura Jayaratne Maksim Lin Maksym Taran Malay Majithia +Manideep Manuel Rego Casasnovas Marat Dreizin Marcel Gerber @@ -348,6 +367,7 @@ mats cronqvist Matt Gaide Matthew Bauer Matthew Beale +matthewhayes Matthew Rathbone Matthias Bussonnier Matthias BUSSONNIER @@ -426,6 +446,7 @@ Paul Garvin Paul Ivanov Pavel Pavel Feldman +Pavel Petržela Pavel Strashkin Paweł Bartkiewicz peteguhl @@ -462,6 +483,7 @@ Ruslan Osmanov Ryan Prior sabaca Samuel Ainsworth +Sam Wilson sandeepshetty Sander AKA Redsandro santec @@ -475,6 +497,7 @@ Scott Aikin Scott Goodhew Sebastian Zaha Sergey Goder +Sergey Tselovalnikov Se-Won Kim shaund shaun gilchrist @@ -519,6 +542,7 @@ Thomas Schmid Tim Alby Tim Baumann Timothy Farrell +Timothy Gu Timothy Hatcher TobiasBg Tomas-A @@ -531,11 +555,13 @@ Triangle717 Tristan Tarrant TSUYUSATO Kitsune twifkak +VapidWorx Vestimir Markov vf Victor Bocharsky Vincent Woo Volker Mische +Weiyan Shao wenli Wes Cossick Wesley Wiser diff --git a/www/code/codemirror-5.13.2/CHANGELOG.md b/www/code/CodeMirror-5.16.0/CHANGELOG.md similarity index 93% rename from www/code/codemirror-5.13.2/CHANGELOG.md rename to www/code/CodeMirror-5.16.0/CHANGELOG.md index b0a6ab57f..a34cf82ff 100644 --- a/www/code/codemirror-5.13.2/CHANGELOG.md +++ b/www/code/CodeMirror-5.16.0/CHANGELOG.md @@ -1,3 +1,95 @@ +## 5.16.0 (2016-06-20) + +### Bugfixes + +Fix glitches when dragging content caused by the drop indicator receiving mouse events. + +Make Control-drag work on Firefox. + +Make clicking or selection-dragging at the end of a wrapped line select the right position. + +[show-hint addon](http://codemirror.net/doc/manual.html#addon_show-hint): Prevent widget scrollbar from hiding part of the hint text. + +[rulers addon](http://codemirror.net/doc/manual.html#addon_rulers): Prevent rulers from forcing a horizontal editor scrollbar. + +### New features + +[search addon](http://codemirror.net/doc/manual.html#addon_search): Automatically bind search-related keys in persistent dialog. + +[sublime keymap](http://codemirror.net/demo/sublime.html): Add a multi-cursor aware smart backspace binding. + +## 5.15.2 (2016-05-20) + +### Bugfixes + +Fix a critical document corruption bug that occurs when a document is gradually grown. + +## 5.15.0 (2016-05-20) + +### Bugfixes + +Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode. + +Fix issue where not all ASCII control characters were being replaced by placeholders. + +Remove the assumption that all modes have a `startState` method from several wrapping modes. + +Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any. + +Optimize document tree building when loading or pasting huge chunks of content. + +[markdown mode](http://codemirror.net/mode/markdown/): Fix several issues in matching link targets. + +[clike mode](http://codemirror.net/mode/clike/): Improve indentation of C++ template declarations. + +### New features + +Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected. + +Pasting [linewise-copied](http://codemirror.net/doc/manual.html#option_lineWiseCopyCut) content when there is no selection now inserts the lines above the current line. + +[javascript mode](http://codemirror.net/mode/javascript/): Support `async`/`await` and improve support for TypeScript type syntax. + +## 5.14.2 (2016-04-20) + +### Bugfixes + +Push a new package to NPM due to an [NPM bug](https://github.com/npm/npm/issues/5082) omitting the LICENSE file in 5.14.0. + +Set `dataTransfer.effectAllowed` in `dragstart` handler to help browsers use the right drag icon. + +Add the [mbox mode](http://codemirror.net/mode/mbox/index.html) to `mode/meta.js`. + +## 5.14.0 (2016-04-20) + +### Bugfixes + +[`posFromIndex`](http://codemirror.net/doc/manual.html#posFromIndex) and [`indexFromPos`](http://codemirror.net/doc/manual.html#indexFromPos) now take [`lineSeparator`](http://codemirror.net/doc/manual.html#option_lineSeparator) into account. + +[vim bindings](http://codemirror.net/demo/vim.html): Only call `.save()` when it is actually available. + +[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Be careful not to mangle multi-line strings. + +[Python mode](http://codemirror.net/mode/python/index.html): Improve distinguishing of decorators from `@` operators. + +[`findMarks`](http://codemirror.net/doc/manual.html#findMarks): No longer return marks that touch but don't overlap given range. + +### New features + +[vim bindings](http://codemirror.net/demo/vim.html): Add yank command. + +[match-highlighter addon](http://codemirror.net/doc/manual.html#addon_match-highlighter): Add `trim` option to disable ignoring of whitespace. + +[PowerShell mode](http://codemirror.net/mode/powershell/index.html): Added. + +[Yacas mode](http://codemirror.net/mode/yacas/index.html): Added. + +[Web IDL mode](http://codemirror.net/mode/webidl/index.html): Added. + +[SAS mode](http://codemirror.net/mode/sas/index.html): Added. + +[mbox mode](http://codemirror.net/mode/mbox/index.html): Added. + ## 5.13.2 (2016-03-23) ### Bugfixes @@ -492,9 +584,9 @@ Integrate some bugfixes, enhancements to the vim keymap, and new modes ([D](http * New mode: [Common Lisp](http://codemirror.net/mode/commonlisp/index.html). * Fix right-click select-all on most browsers. -* Change the way highlighting happens: - Saves memory and CPU cycles. - `compareStates` is no longer needed. +* Change the way highlighting happens: + Saves memory and CPU cycles. + `compareStates` is no longer needed. `onHighlightComplete` no longer works. * Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite. * Add a [`CodeMirror.version`](http://codemirror.net/doc/manual.html#version) property. diff --git a/www/code/codemirror-5.13.2/CONTRIBUTING.md b/www/code/CodeMirror-5.16.0/CONTRIBUTING.md similarity index 100% rename from www/code/codemirror-5.13.2/CONTRIBUTING.md rename to www/code/CodeMirror-5.16.0/CONTRIBUTING.md diff --git a/www/code/codemirror-5.13.2/LICENSE b/www/code/CodeMirror-5.16.0/LICENSE similarity index 100% rename from www/code/codemirror-5.13.2/LICENSE rename to www/code/CodeMirror-5.16.0/LICENSE diff --git a/www/code/codemirror-5.13.2/README.md b/www/code/CodeMirror-5.16.0/README.md similarity index 100% rename from www/code/codemirror-5.13.2/README.md rename to www/code/CodeMirror-5.16.0/README.md diff --git a/www/code/codemirror-5.13.2/addon/comment/comment.js b/www/code/CodeMirror-5.16.0/addon/comment/comment.js similarity index 96% rename from www/code/codemirror-5.13.2/addon/comment/comment.js rename to www/code/CodeMirror-5.16.0/addon/comment/comment.js index 3aa468089..2c4f975d0 100644 --- a/www/code/codemirror-5.13.2/addon/comment/comment.js +++ b/www/code/CodeMirror-5.16.0/addon/comment/comment.js @@ -44,9 +44,17 @@ } }); + // Rough heuristic to try and detect lines that are part of multi-line string + function probablyInsideString(cm, pos, line) { + return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"`]/.test(line) + } + CodeMirror.defineExtension("lineComment", function(from, to, options) { if (!options) options = noOptions; var self = this, mode = self.getModeAt(from); + var firstLine = self.getLine(from.line); + if (firstLine == null || probablyInsideString(self, from, firstLine)) return; + var commentString = options.lineComment || mode.lineComment; if (!commentString) { if (options.blockCommentStart || mode.blockCommentStart) { @@ -55,8 +63,7 @@ } return; } - var firstLine = self.getLine(from.line); - if (firstLine == null) return; + var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1); var pad = options.padding == null ? " " : options.padding; var blankLines = options.commentBlankLines || from.line == to.line; diff --git a/www/code/codemirror-5.13.2/addon/comment/continuecomment.js b/www/code/CodeMirror-5.16.0/addon/comment/continuecomment.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/comment/continuecomment.js rename to www/code/CodeMirror-5.16.0/addon/comment/continuecomment.js diff --git a/www/code/codemirror-5.13.2/addon/dialog/dialog.css b/www/code/CodeMirror-5.16.0/addon/dialog/dialog.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/dialog/dialog.css rename to www/code/CodeMirror-5.16.0/addon/dialog/dialog.css diff --git a/www/code/codemirror-5.13.2/addon/dialog/dialog.js b/www/code/CodeMirror-5.16.0/addon/dialog/dialog.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/dialog/dialog.js rename to www/code/CodeMirror-5.16.0/addon/dialog/dialog.js diff --git a/www/code/codemirror-5.13.2/addon/display/autorefresh.js b/www/code/CodeMirror-5.16.0/addon/display/autorefresh.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/display/autorefresh.js rename to www/code/CodeMirror-5.16.0/addon/display/autorefresh.js diff --git a/www/code/codemirror-5.13.2/addon/display/fullscreen.css b/www/code/CodeMirror-5.16.0/addon/display/fullscreen.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/display/fullscreen.css rename to www/code/CodeMirror-5.16.0/addon/display/fullscreen.css diff --git a/www/code/codemirror-5.13.2/addon/display/fullscreen.js b/www/code/CodeMirror-5.16.0/addon/display/fullscreen.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/display/fullscreen.js rename to www/code/CodeMirror-5.16.0/addon/display/fullscreen.js diff --git a/www/code/codemirror-5.13.2/addon/display/panel.js b/www/code/CodeMirror-5.16.0/addon/display/panel.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/display/panel.js rename to www/code/CodeMirror-5.16.0/addon/display/panel.js diff --git a/www/code/codemirror-5.13.2/addon/display/placeholder.js b/www/code/CodeMirror-5.16.0/addon/display/placeholder.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/display/placeholder.js rename to www/code/CodeMirror-5.16.0/addon/display/placeholder.js diff --git a/www/code/codemirror-5.13.2/addon/display/rulers.js b/www/code/CodeMirror-5.16.0/addon/display/rulers.js similarity index 59% rename from www/code/codemirror-5.13.2/addon/display/rulers.js rename to www/code/CodeMirror-5.16.0/addon/display/rulers.js index 01f65667c..730054473 100644 --- a/www/code/codemirror-5.13.2/addon/display/rulers.js +++ b/www/code/CodeMirror-5.16.0/addon/display/rulers.js @@ -11,30 +11,26 @@ })(function(CodeMirror) { "use strict"; - CodeMirror.defineOption("rulers", false, function(cm, val, old) { - if (old && old != CodeMirror.Init) { - clearRulers(cm); - cm.off("refresh", refreshRulers); + CodeMirror.defineOption("rulers", false, function(cm, val) { + if (cm.state.rulerDiv) { + cm.display.lineSpace.removeChild(cm.state.rulerDiv) + cm.state.rulerDiv = null + cm.off("refresh", drawRulers) } if (val && val.length) { - setRulers(cm); - cm.on("refresh", refreshRulers); + cm.state.rulerDiv = cm.display.lineSpace.insertBefore(document.createElement("div"), cm.display.cursorDiv) + cm.state.rulerDiv.className = "CodeMirror-rulers" + drawRulers(cm) + cm.on("refresh", drawRulers) } }); - function clearRulers(cm) { - for (var i = cm.display.lineSpace.childNodes.length - 1; i >= 0; i--) { - var node = cm.display.lineSpace.childNodes[i]; - if (/(^|\s)CodeMirror-ruler($|\s)/.test(node.className)) - node.parentNode.removeChild(node); - } - } - - function setRulers(cm) { + function drawRulers(cm) { + cm.state.rulerDiv.textContent = "" var val = cm.getOption("rulers"); var cw = cm.defaultCharWidth(); var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left; - var minH = cm.display.scroller.offsetHeight + 30; + cm.state.rulerDiv.style.minHeight = (cm.display.scroller.offsetHeight + 30) + "px"; for (var i = 0; i < val.length; i++) { var elt = document.createElement("div"); elt.className = "CodeMirror-ruler"; @@ -49,15 +45,7 @@ if (conf.width) elt.style.borderLeftWidth = conf.width; } elt.style.left = (left + col * cw) + "px"; - elt.style.top = "-50px"; - elt.style.bottom = "-20px"; - elt.style.minHeight = minH + "px"; - cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv); + cm.state.rulerDiv.appendChild(elt) } } - - function refreshRulers(cm) { - clearRulers(cm); - setRulers(cm); - } }); diff --git a/www/code/codemirror-5.13.2/addon/edit/closebrackets.js b/www/code/CodeMirror-5.16.0/addon/edit/closebrackets.js similarity index 99% rename from www/code/codemirror-5.13.2/addon/edit/closebrackets.js rename to www/code/CodeMirror-5.16.0/addon/edit/closebrackets.js index 3eb9d8eae..af7fce2a8 100644 --- a/www/code/codemirror-5.13.2/addon/edit/closebrackets.js +++ b/www/code/CodeMirror-5.16.0/addon/edit/closebrackets.js @@ -109,7 +109,7 @@ var ranges = cm.listSelections(); var opening = pos % 2 == 0; - var type, next; + var type; for (var i = 0; i < ranges.length; i++) { var range = ranges[i], cur = range.head, curType; var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1)); diff --git a/www/code/codemirror-5.13.2/addon/edit/closetag.js b/www/code/CodeMirror-5.16.0/addon/edit/closetag.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/edit/closetag.js rename to www/code/CodeMirror-5.16.0/addon/edit/closetag.js diff --git a/www/code/codemirror-5.13.2/addon/edit/continuelist.js b/www/code/CodeMirror-5.16.0/addon/edit/continuelist.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/edit/continuelist.js rename to www/code/CodeMirror-5.16.0/addon/edit/continuelist.js diff --git a/www/code/codemirror-5.13.2/addon/edit/matchbrackets.js b/www/code/CodeMirror-5.16.0/addon/edit/matchbrackets.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/edit/matchbrackets.js rename to www/code/CodeMirror-5.16.0/addon/edit/matchbrackets.js diff --git a/www/code/codemirror-5.13.2/addon/edit/matchtags.js b/www/code/CodeMirror-5.16.0/addon/edit/matchtags.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/edit/matchtags.js rename to www/code/CodeMirror-5.16.0/addon/edit/matchtags.js diff --git a/www/code/codemirror-5.13.2/addon/edit/trailingspace.js b/www/code/CodeMirror-5.16.0/addon/edit/trailingspace.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/edit/trailingspace.js rename to www/code/CodeMirror-5.16.0/addon/edit/trailingspace.js diff --git a/www/code/codemirror-5.13.2/addon/fold/brace-fold.js b/www/code/CodeMirror-5.16.0/addon/fold/brace-fold.js similarity index 87% rename from www/code/codemirror-5.13.2/addon/fold/brace-fold.js rename to www/code/CodeMirror-5.16.0/addon/fold/brace-fold.js index 1605f6c2a..13c0f0cd8 100644 --- a/www/code/codemirror-5.13.2/addon/fold/brace-fold.js +++ b/www/code/CodeMirror-5.16.0/addon/fold/brace-fold.js @@ -13,7 +13,7 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) { var line = start.line, lineText = cm.getLine(line); - var startCh, tokenType; + var tokenType; function findOpening(openCh) { for (var at = start.ch, pass = 0;;) { @@ -72,15 +72,15 @@ CodeMirror.registerHelper("fold", "import", function(cm, start) { } } - var start = start.line, has = hasImport(start), prev; - if (!has || hasImport(start - 1) || ((prev = hasImport(start - 2)) && prev.end.line == start - 1)) + var startLine = start.line, has = hasImport(startLine), prev; + if (!has || hasImport(startLine - 1) || ((prev = hasImport(startLine - 2)) && prev.end.line == startLine - 1)) return null; for (var end = has.end;;) { var next = hasImport(end.line + 1); if (next == null) break; end = next.end; } - return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end}; + return {from: cm.clipPos(CodeMirror.Pos(startLine, has.startCh + 1)), to: end}; }); CodeMirror.registerHelper("fold", "include", function(cm, start) { @@ -91,14 +91,14 @@ CodeMirror.registerHelper("fold", "include", function(cm, start) { if (start.type == "meta" && start.string.slice(0, 8) == "#include") return start.start + 8; } - var start = start.line, has = hasInclude(start); - if (has == null || hasInclude(start - 1) != null) return null; - for (var end = start;;) { + var startLine = start.line, has = hasInclude(startLine); + if (has == null || hasInclude(startLine - 1) != null) return null; + for (var end = startLine;;) { var next = hasInclude(end + 1); if (next == null) break; ++end; } - return {from: CodeMirror.Pos(start, has + 1), + return {from: CodeMirror.Pos(startLine, has + 1), to: cm.clipPos(CodeMirror.Pos(end))}; }); diff --git a/www/code/codemirror-5.13.2/addon/fold/comment-fold.js b/www/code/CodeMirror-5.16.0/addon/fold/comment-fold.js similarity index 96% rename from www/code/codemirror-5.13.2/addon/fold/comment-fold.js rename to www/code/CodeMirror-5.16.0/addon/fold/comment-fold.js index 60fa3e43d..e8d800eb5 100644 --- a/www/code/codemirror-5.13.2/addon/fold/comment-fold.js +++ b/www/code/CodeMirror-5.16.0/addon/fold/comment-fold.js @@ -29,7 +29,7 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { } if (pass == 1 && found < start.ch) return; if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) && - (lineText.slice(found - endToken.length, found) == endToken || + (found == 0 || lineText.slice(found - endToken.length, found) == endToken || !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) { startCh = found + startToken.length; break; diff --git a/www/code/codemirror-5.13.2/addon/fold/foldcode.js b/www/code/CodeMirror-5.16.0/addon/fold/foldcode.js similarity index 97% rename from www/code/codemirror-5.13.2/addon/fold/foldcode.js rename to www/code/CodeMirror-5.16.0/addon/fold/foldcode.js index 62911f935..78b36c464 100644 --- a/www/code/codemirror-5.13.2/addon/fold/foldcode.js +++ b/www/code/CodeMirror-5.16.0/addon/fold/foldcode.js @@ -49,7 +49,7 @@ }); var myRange = cm.markText(range.from, range.to, { replacedWith: myWidget, - clearOnEnter: true, + clearOnEnter: getOption(cm, options, "clearOnEnter"), __isFold: true }); myRange.on("clear", function(from, to) { @@ -129,7 +129,8 @@ rangeFinder: CodeMirror.fold.auto, widget: "\u2194", minFoldSize: 0, - scanUp: false + scanUp: false, + clearOnEnter: true }; CodeMirror.defineOption("foldOptions", null); diff --git a/www/code/codemirror-5.13.2/addon/fold/foldgutter.css b/www/code/CodeMirror-5.16.0/addon/fold/foldgutter.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/fold/foldgutter.css rename to www/code/CodeMirror-5.16.0/addon/fold/foldgutter.css diff --git a/www/code/codemirror-5.13.2/addon/fold/foldgutter.js b/www/code/CodeMirror-5.16.0/addon/fold/foldgutter.js similarity index 98% rename from www/code/codemirror-5.13.2/addon/fold/foldgutter.js rename to www/code/CodeMirror-5.16.0/addon/fold/foldgutter.js index f101e2670..9d3232656 100644 --- a/www/code/codemirror-5.13.2/addon/fold/foldgutter.js +++ b/www/code/CodeMirror-5.16.0/addon/fold/foldgutter.js @@ -50,7 +50,7 @@ } function isFolded(cm, line) { - var marks = cm.findMarksAt(Pos(line)); + var marks = cm.findMarks(Pos(line, 0), Pos(line + 1, 0)); for (var i = 0; i < marks.length; ++i) if (marks[i].__isFold && marks[i].find().from.line == line) return marks[i]; } diff --git a/www/code/codemirror-5.13.2/addon/fold/indent-fold.js b/www/code/CodeMirror-5.16.0/addon/fold/indent-fold.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/fold/indent-fold.js rename to www/code/CodeMirror-5.16.0/addon/fold/indent-fold.js diff --git a/www/code/codemirror-5.13.2/addon/fold/markdown-fold.js b/www/code/CodeMirror-5.16.0/addon/fold/markdown-fold.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/fold/markdown-fold.js rename to www/code/CodeMirror-5.16.0/addon/fold/markdown-fold.js diff --git a/www/code/codemirror-5.13.2/addon/fold/xml-fold.js b/www/code/CodeMirror-5.16.0/addon/fold/xml-fold.js similarity index 97% rename from www/code/codemirror-5.13.2/addon/fold/xml-fold.js rename to www/code/CodeMirror-5.16.0/addon/fold/xml-fold.js index 504727f38..f8c67b897 100644 --- a/www/code/codemirror-5.13.2/addon/fold/xml-fold.js +++ b/www/code/CodeMirror-5.16.0/addon/fold/xml-fold.js @@ -140,9 +140,9 @@ var openTag = toNextTag(iter), end; if (!openTag || iter.line != start.line || !(end = toTagEnd(iter))) return; if (!openTag[1] && end != "selfClose") { - var start = Pos(iter.line, iter.ch); - var close = findMatchingClose(iter, openTag[2]); - return close && {from: start, to: close.from}; + var startPos = Pos(iter.line, iter.ch); + var endPos = findMatchingClose(iter, openTag[2]); + return endPos && {from: startPos, to: endPos.from}; } } }); diff --git a/www/code/codemirror-5.13.2/addon/hint/anyword-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/anyword-hint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/hint/anyword-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/anyword-hint.js diff --git a/www/code/codemirror-5.13.2/addon/hint/css-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/css-hint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/hint/css-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/css-hint.js diff --git a/www/code/codemirror-5.13.2/addon/hint/html-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/html-hint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/hint/html-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/html-hint.js diff --git a/www/code/codemirror-5.13.2/addon/hint/javascript-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/javascript-hint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/hint/javascript-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/javascript-hint.js diff --git a/www/code/codemirror-5.13.2/addon/hint/show-hint.css b/www/code/CodeMirror-5.16.0/addon/hint/show-hint.css similarity index 96% rename from www/code/codemirror-5.13.2/addon/hint/show-hint.css rename to www/code/CodeMirror-5.16.0/addon/hint/show-hint.css index 924e638f7..453dee4bb 100644 --- a/www/code/codemirror-5.13.2/addon/hint/show-hint.css +++ b/www/code/CodeMirror-5.16.0/addon/hint/show-hint.css @@ -16,6 +16,7 @@ background: white; font-size: 90%; font-family: monospace; + max-width: 19em; max-height: 20em; overflow-y: auto; @@ -25,8 +26,6 @@ margin: 0; padding: 0 4px; border-radius: 2px; - max-width: 19em; - overflow: hidden; white-space: pre; color: black; cursor: pointer; diff --git a/www/code/codemirror-5.13.2/addon/hint/show-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/show-hint.js similarity index 91% rename from www/code/codemirror-5.13.2/addon/hint/show-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/show-hint.js index 7661f6c2c..64ec9289c 100644 --- a/www/code/codemirror-5.13.2/addon/hint/show-hint.js +++ b/www/code/CodeMirror-5.16.0/addon/hint/show-hint.js @@ -108,15 +108,11 @@ }, update: function(first) { - if (this.tick == null) return; - if (!this.options.hint.async) { - this.finishUpdate(this.options.hint(this.cm, this.options), first); - } else { - var myTick = ++this.tick, self = this; - this.options.hint(this.cm, function(data) { - if (self.tick == myTick) self.finishUpdate(data, first); - }, this.options); - } + if (this.tick == null) return + var self = this, myTick = ++this.tick + fetchHints(this.options.hint, this.cm, this.options, function(data) { + if (self.tick == myTick) self.finishUpdate(data, first) + }) }, finishUpdate: function(data, first) { @@ -233,6 +229,7 @@ var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); (completion.options.container || document.body).appendChild(hints); var box = hints.getBoundingClientRect(), overlapY = box.bottom - winH; + var scrolls = hints.scrollHeight > hints.clientHeight + 1 if (overlapY > 0) { var height = box.bottom - box.top, curTop = pos.top - (pos.bottom - box.top); if (curTop - height > 0) { // Fits above cursor @@ -257,6 +254,8 @@ } hints.style.left = (left = pos.left - overlapX) + "px"; } + if (scrolls) for (var node = hints.firstChild; node; node = node.nextSibling) + node.style.paddingRight = cm.display.nativeBarWidth + "px" cm.addKeyMap(this.keyMap = buildKeyMap(completion, { moveFocus: function(n, avoidWrap) { widget.changeActive(widget.selectedHint + n, avoidWrap); }, @@ -362,40 +361,31 @@ return result } + function fetchHints(hint, cm, options, callback) { + if (hint.async) { + hint(cm, callback, options) + } else { + var result = hint(cm, options) + if (result && result.then) result.then(callback) + else callback(result) + } + } + function resolveAutoHints(cm, pos) { var helpers = cm.getHelpers(pos, "hint"), words if (helpers.length) { - var async = false, resolved - for (var i = 0; i < helpers.length; i++) if (helpers[i].async) async = true - if (async) { - resolved = function(cm, callback, options) { - var app = applicableHelpers(cm, helpers) - function run(i, result) { - if (i == app.length) return callback(null) - var helper = app[i] - if (helper.async) { - helper(cm, function(result) { - if (result) callback(result) - else run(i + 1) - }, options) - } else { - var result = helper(cm, options) - if (result) callback(result) - else run(i + 1) - } - } - run(0) - } - resolved.async = true - } else { - resolved = function(cm, options) { - var app = applicableHelpers(cm, helpers) - for (var i = 0; i < app.length; i++) { - var cur = app[i](cm, options) - if (cur && cur.list.length) return cur - } + var resolved = function(cm, callback, options) { + var app = applicableHelpers(cm, helpers); + function run(i) { + if (i == app.length) return callback(null) + fetchHints(app[i], cm, options, function(result) { + if (result && result.list.length > 0) callback(result) + else run(i + 1) + }) } + run(0) } + resolved.async = true resolved.supportsSelection = true return resolved } else if (words = cm.getHelper(cm.getCursor(), "hintWords")) { diff --git a/www/code/codemirror-5.13.2/addon/hint/sql-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/sql-hint.js similarity index 92% rename from www/code/codemirror-5.13.2/addon/hint/sql-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/sql-hint.js index 798fbb1f3..1ee4f0bbe 100644 --- a/www/code/codemirror-5.13.2/addon/hint/sql-hint.js +++ b/www/code/CodeMirror-5.16.0/addon/hint/sql-hint.js @@ -18,7 +18,7 @@ QUERY_DIV: ";", ALIAS_KEYWORD: "AS" }; - var Pos = CodeMirror.Pos; + var Pos = CodeMirror.Pos, cmpPos = CodeMirror.cmpPos; function isArray(val) { return Object.prototype.toString.call(val) == "[object Array]" } @@ -105,7 +105,7 @@ } function nameCompletion(cur, token, result, editor) { - // Try to complete table, colunm names and return start position of completion + // Try to complete table, column names and return start position of completion var useBacktick = false; var nameParts = []; var start = token.start; @@ -178,15 +178,6 @@ } } - function convertCurToNumber(cur) { - // max characters of a line is 999,999. - return cur.line + cur.ch / Math.pow(10, 6); - } - - function convertNumberToCur(num) { - return Pos(Math.floor(num), +num.toString().split('.').pop()); - } - function findTableByAlias(alias, editor) { var doc = editor.doc; var fullQuery = doc.getValue(); @@ -209,15 +200,14 @@ separator.push(Pos(editor.lastLine(), editor.getLineHandle(editor.lastLine()).text.length)); //find valid range - var prevItem = 0; - var current = convertCurToNumber(editor.getCursor()); + var prevItem = null; + var current = editor.getCursor() for (var i = 0; i < separator.length; i++) { - var _v = convertCurToNumber(separator[i]); - if (current > prevItem && current <= _v) { - validRange = { start: convertNumberToCur(prevItem), end: convertNumberToCur(_v) }; + if ((prevItem == null || cmpPos(current, prevItem) > 0) && cmpPos(current, separator[i]) <= 0) { + validRange = {start: prevItem, end: separator[i]}; break; } - prevItem = _v; + prevItem = separator[i]; } var query = doc.getRange(validRange.start, validRange.end, false); @@ -241,7 +231,7 @@ var defaultTableName = options && options.defaultTable; var disableKeywords = options && options.disableKeywords; defaultTable = defaultTableName && getTable(defaultTableName); - keywords = keywords || getKeywords(editor); + keywords = getKeywords(editor); if (defaultTableName && !defaultTable) defaultTable = findTableByAlias(defaultTableName, editor); diff --git a/www/code/codemirror-5.13.2/addon/hint/xml-hint.js b/www/code/CodeMirror-5.16.0/addon/hint/xml-hint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/hint/xml-hint.js rename to www/code/CodeMirror-5.16.0/addon/hint/xml-hint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/coffeescript-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/coffeescript-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/coffeescript-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/coffeescript-lint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/css-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/css-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/css-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/css-lint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/html-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/html-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/html-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/html-lint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/javascript-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/javascript-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/javascript-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/javascript-lint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/json-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/json-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/json-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/json-lint.js diff --git a/www/code/codemirror-5.13.2/addon/lint/lint.css b/www/code/CodeMirror-5.16.0/addon/lint/lint.css similarity index 98% rename from www/code/codemirror-5.13.2/addon/lint/lint.css rename to www/code/CodeMirror-5.16.0/addon/lint/lint.css index 414a9a0e0..f097cfe34 100644 --- a/www/code/codemirror-5.13.2/addon/lint/lint.css +++ b/www/code/CodeMirror-5.16.0/addon/lint/lint.css @@ -4,10 +4,10 @@ } .CodeMirror-lint-tooltip { - background-color: infobackground; + background-color: #ffd; border: 1px solid black; border-radius: 4px 4px 4px 4px; - color: infotext; + color: black; font-family: monospace; font-size: 10pt; overflow: hidden; diff --git a/www/code/codemirror-5.13.2/addon/lint/lint.js b/www/code/CodeMirror-5.16.0/addon/lint/lint.js similarity index 99% rename from www/code/codemirror-5.13.2/addon/lint/lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/lint.js index 01f322b5d..e3a452766 100644 --- a/www/code/codemirror-5.13.2/addon/lint/lint.js +++ b/www/code/CodeMirror-5.16.0/addon/lint/lint.js @@ -204,7 +204,8 @@ var annotations = []; for (var i = 0; i < spans.length; ++i) { - annotations.push(spans[i].__annotation); + var ann = spans[i].__annotation; + if (ann) annotations.push(ann); } if (annotations.length) popupTooltips(annotations, e); } diff --git a/www/code/codemirror-5.13.2/addon/lint/yaml-lint.js b/www/code/CodeMirror-5.16.0/addon/lint/yaml-lint.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/lint/yaml-lint.js rename to www/code/CodeMirror-5.16.0/addon/lint/yaml-lint.js diff --git a/www/code/codemirror-5.13.2/addon/merge/merge.css b/www/code/CodeMirror-5.16.0/addon/merge/merge.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/merge/merge.css rename to www/code/CodeMirror-5.16.0/addon/merge/merge.css diff --git a/www/code/codemirror-5.13.2/addon/merge/merge.js b/www/code/CodeMirror-5.16.0/addon/merge/merge.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/merge/merge.js rename to www/code/CodeMirror-5.16.0/addon/merge/merge.js diff --git a/www/code/codemirror-5.13.2/addon/mode/loadmode.js b/www/code/CodeMirror-5.16.0/addon/mode/loadmode.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/mode/loadmode.js rename to www/code/CodeMirror-5.16.0/addon/mode/loadmode.js diff --git a/www/code/codemirror-5.13.2/addon/mode/multiplex.js b/www/code/CodeMirror-5.16.0/addon/mode/multiplex.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/mode/multiplex.js rename to www/code/CodeMirror-5.16.0/addon/mode/multiplex.js diff --git a/www/code/codemirror-5.13.2/addon/mode/multiplex_test.js b/www/code/CodeMirror-5.16.0/addon/mode/multiplex_test.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/mode/multiplex_test.js rename to www/code/CodeMirror-5.16.0/addon/mode/multiplex_test.js diff --git a/www/code/codemirror-5.13.2/addon/mode/overlay.js b/www/code/CodeMirror-5.16.0/addon/mode/overlay.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/mode/overlay.js rename to www/code/CodeMirror-5.16.0/addon/mode/overlay.js diff --git a/www/code/codemirror-5.13.2/addon/mode/simple.js b/www/code/CodeMirror-5.16.0/addon/mode/simple.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/mode/simple.js rename to www/code/CodeMirror-5.16.0/addon/mode/simple.js diff --git a/www/code/codemirror-5.13.2/addon/runmode/colorize.js b/www/code/CodeMirror-5.16.0/addon/runmode/colorize.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/runmode/colorize.js rename to www/code/CodeMirror-5.16.0/addon/runmode/colorize.js diff --git a/www/code/codemirror-5.13.2/addon/runmode/runmode-standalone.js b/www/code/CodeMirror-5.16.0/addon/runmode/runmode-standalone.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/runmode/runmode-standalone.js rename to www/code/CodeMirror-5.16.0/addon/runmode/runmode-standalone.js diff --git a/www/code/codemirror-5.13.2/addon/runmode/runmode.js b/www/code/CodeMirror-5.16.0/addon/runmode/runmode.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/runmode/runmode.js rename to www/code/CodeMirror-5.16.0/addon/runmode/runmode.js diff --git a/www/code/codemirror-5.13.2/addon/runmode/runmode.node.js b/www/code/CodeMirror-5.16.0/addon/runmode/runmode.node.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/runmode/runmode.node.js rename to www/code/CodeMirror-5.16.0/addon/runmode/runmode.node.js diff --git a/www/code/codemirror-5.13.2/addon/scroll/annotatescrollbar.js b/www/code/CodeMirror-5.16.0/addon/scroll/annotatescrollbar.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/scroll/annotatescrollbar.js rename to www/code/CodeMirror-5.16.0/addon/scroll/annotatescrollbar.js diff --git a/www/code/codemirror-5.13.2/addon/scroll/scrollpastend.js b/www/code/CodeMirror-5.16.0/addon/scroll/scrollpastend.js similarity index 94% rename from www/code/codemirror-5.13.2/addon/scroll/scrollpastend.js rename to www/code/CodeMirror-5.16.0/addon/scroll/scrollpastend.js index 008ae4c7b..a2ed089b4 100644 --- a/www/code/codemirror-5.13.2/addon/scroll/scrollpastend.js +++ b/www/code/CodeMirror-5.16.0/addon/scroll/scrollpastend.js @@ -40,7 +40,9 @@ if (cm.state.scrollPastEndPadding != padding) { cm.state.scrollPastEndPadding = padding; cm.display.lineSpace.parentNode.style.paddingBottom = padding; + cm.off("refresh", updateBottomMargin); cm.setSize(); + cm.on("refresh", updateBottomMargin); } } }); diff --git a/www/code/codemirror-5.13.2/addon/scroll/simplescrollbars.css b/www/code/CodeMirror-5.16.0/addon/scroll/simplescrollbars.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/scroll/simplescrollbars.css rename to www/code/CodeMirror-5.16.0/addon/scroll/simplescrollbars.css diff --git a/www/code/codemirror-5.13.2/addon/scroll/simplescrollbars.js b/www/code/CodeMirror-5.16.0/addon/scroll/simplescrollbars.js similarity index 93% rename from www/code/codemirror-5.13.2/addon/scroll/simplescrollbars.js rename to www/code/CodeMirror-5.16.0/addon/scroll/simplescrollbars.js index 32ba2f35e..23f3e03f8 100644 --- a/www/code/codemirror-5.13.2/addon/scroll/simplescrollbars.js +++ b/www/code/CodeMirror-5.16.0/addon/scroll/simplescrollbars.js @@ -59,10 +59,10 @@ CodeMirror.on(this.node, "DOMMouseScroll", onWheel); } - Bar.prototype.setPos = function(pos) { + Bar.prototype.setPos = function(pos, force) { if (pos < 0) pos = 0; if (pos > this.total - this.screen) pos = this.total - this.screen; - if (pos == this.pos) return false; + if (!force && pos == this.pos) return false; this.pos = pos; this.inner.style[this.orientation == "horizontal" ? "left" : "top"] = (pos * (this.size / this.total)) + "px"; @@ -76,9 +76,12 @@ var minButtonSize = 10; Bar.prototype.update = function(scrollSize, clientSize, barSize) { - this.screen = clientSize; - this.total = scrollSize; - this.size = barSize; + var sizeChanged = this.screen != clientSize || this.total != scrollSize || this.size != barSize + if (sizeChanged) { + this.screen = clientSize; + this.total = scrollSize; + this.size = barSize; + } var buttonSize = this.screen * (this.size / this.total); if (buttonSize < minButtonSize) { @@ -87,7 +90,7 @@ } this.inner.style[this.orientation == "horizontal" ? "width" : "height"] = buttonSize + "px"; - this.setPos(this.pos); + this.setPos(this.pos, sizeChanged); }; function SimpleScrollbars(cls, place, scroll) { diff --git a/www/code/codemirror-5.13.2/addon/search/jump-to-line.js b/www/code/CodeMirror-5.16.0/addon/search/jump-to-line.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/search/jump-to-line.js rename to www/code/CodeMirror-5.16.0/addon/search/jump-to-line.js diff --git a/www/code/codemirror-5.13.2/addon/search/match-highlighter.js b/www/code/CodeMirror-5.16.0/addon/search/match-highlighter.js similarity index 78% rename from www/code/codemirror-5.13.2/addon/search/match-highlighter.js rename to www/code/CodeMirror-5.16.0/addon/search/match-highlighter.js index 8f02f01c8..2c2914a9d 100644 --- a/www/code/codemirror-5.13.2/addon/search/match-highlighter.js +++ b/www/code/CodeMirror-5.16.0/addon/search/match-highlighter.js @@ -16,7 +16,7 @@ // highlighted only if the selected text is a word. showToken, when enabled, // will cause the current token to be highlighted when nothing is selected. // delay is used to specify how much time to wait, in milliseconds, before -// highlighting the matches. If annotateScrollbar is enabled, the occurances +// highlighting the matches. If annotateScrollbar is enabled, the occurences // will be highlighted on the scrollbar via the matchesonscrollbar addon. (function(mod) { @@ -29,24 +29,20 @@ })(function(CodeMirror) { "use strict"; - var DEFAULT_MIN_CHARS = 2; - var DEFAULT_TOKEN_STYLE = "matchhighlight"; - var DEFAULT_DELAY = 100; - var DEFAULT_WORDS_ONLY = false; + var defaults = { + style: "matchhighlight", + minChars: 2, + delay: 100, + wordsOnly: false, + annotateScrollbar: false, + showToken: false, + trim: true + } function State(options) { - if (typeof options == "object") { - this.minChars = options.minChars; - this.style = options.style; - this.showToken = options.showToken; - this.delay = options.delay; - this.wordsOnly = options.wordsOnly; - this.annotateScrollbar = options.annotateScrollbar; - } - if (this.style == null) this.style = DEFAULT_TOKEN_STYLE; - if (this.minChars == null) this.minChars = DEFAULT_MIN_CHARS; - if (this.delay == null) this.delay = DEFAULT_DELAY; - if (this.wordsOnly == null) this.wordsOnly = DEFAULT_WORDS_ONLY; + this.options = {} + for (var name in defaults) + this.options[name] = (options && options.hasOwnProperty(name) ? options : defaults)[name] this.overlay = this.timeout = null; this.matchesonscroll = null; } @@ -68,13 +64,13 @@ function cursorActivity(cm) { var state = cm.state.matchHighlighter; clearTimeout(state.timeout); - state.timeout = setTimeout(function() {highlightMatches(cm);}, state.delay); + state.timeout = setTimeout(function() {highlightMatches(cm);}, state.options.delay); } function addOverlay(cm, query, hasBoundary, style) { var state = cm.state.matchHighlighter; cm.addOverlay(state.overlay = makeOverlay(query, hasBoundary, style)); - if (state.annotateScrollbar) { + if (state.options.annotateScrollbar && cm.showMatchesOnScrollbar) { var searchFor = hasBoundary ? new RegExp("\\b" + query + "\\b") : query; state.matchesonscroll = cm.showMatchesOnScrollbar(searchFor, true, {className: "CodeMirror-selection-highlight-scrollbar"}); @@ -86,7 +82,7 @@ if (state.overlay) { cm.removeOverlay(state.overlay); state.overlay = null; - if (state.annotateScrollbar) { + if (state.matchesonscroll) { state.matchesonscroll.clear(); state.matchesonscroll = null; } @@ -97,21 +93,22 @@ cm.operation(function() { var state = cm.state.matchHighlighter; removeOverlay(cm); - if (!cm.somethingSelected() && state.showToken) { - var re = state.showToken === true ? /[\w$]/ : state.showToken; + if (!cm.somethingSelected() && state.options.showToken) { + var re = state.options.showToken === true ? /[\w$]/ : state.options.showToken; var cur = cm.getCursor(), line = cm.getLine(cur.line), start = cur.ch, end = start; while (start && re.test(line.charAt(start - 1))) --start; while (end < line.length && re.test(line.charAt(end))) ++end; if (start < end) - addOverlay(cm, line.slice(start, end), re, state.style); + addOverlay(cm, line.slice(start, end), re, state.options.style); return; } var from = cm.getCursor("from"), to = cm.getCursor("to"); if (from.line != to.line) return; - if (state.wordsOnly && !isWord(cm, from, to)) return; - var selection = cm.getRange(from, to).replace(/^\s+|\s+$/g, ""); - if (selection.length >= state.minChars) - addOverlay(cm, selection, false, state.style); + if (state.options.wordsOnly && !isWord(cm, from, to)) return; + var selection = cm.getRange(from, to) + if (state.options.trim) selection = selection.replace(/^\s+|\s+$/g, "") + if (selection.length >= state.options.minChars) + addOverlay(cm, selection, false, state.options.style); }); } diff --git a/www/code/codemirror-5.13.2/addon/search/matchesonscrollbar.css b/www/code/CodeMirror-5.16.0/addon/search/matchesonscrollbar.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/search/matchesonscrollbar.css rename to www/code/CodeMirror-5.16.0/addon/search/matchesonscrollbar.css diff --git a/www/code/codemirror-5.13.2/addon/search/matchesonscrollbar.js b/www/code/CodeMirror-5.16.0/addon/search/matchesonscrollbar.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/search/matchesonscrollbar.js rename to www/code/CodeMirror-5.16.0/addon/search/matchesonscrollbar.js diff --git a/www/code/codemirror-5.13.2/addon/search/search.js b/www/code/CodeMirror-5.16.0/addon/search/search.js similarity index 87% rename from www/code/codemirror-5.13.2/addon/search/search.js rename to www/code/CodeMirror-5.16.0/addon/search/search.js index 93e90b36e..c005866f1 100644 --- a/www/code/codemirror-5.13.2/addon/search/search.js +++ b/www/code/CodeMirror-5.16.0/addon/search/search.js @@ -57,12 +57,13 @@ return cm.getSearchCursor(query, pos, queryCaseInsensitive(query)); } - function persistentDialog(cm, text, deflt, f) { - cm.openDialog(text, f, { + function persistentDialog(cm, text, deflt, onEnter, onKeyDown) { + cm.openDialog(text, onEnter, { value: deflt, selectValueOnOpen: true, closeOnEnter: false, - onClose: function() { clearSearch(cm); } + onClose: function() { clearSearch(cm); }, + onKeyDown: onKeyDown }); } @@ -112,16 +113,19 @@ } } - function doSearch(cm, rev, persistent) { + function doSearch(cm, rev, persistent, immediate) { var state = getSearchState(cm); if (state.query) return findNext(cm, rev); var q = cm.getSelection() || state.lastQuery; if (persistent && cm.openDialog) { var hiding = null - persistentDialog(cm, queryDialog, q, function(query, event) { + var searchNext = function(query, event) { CodeMirror.e_stop(event); if (!query) return; - if (query != state.queryText) startSearch(cm, state, query); + if (query != state.queryText) { + startSearch(cm, state, query); + state.posFrom = state.posTo = cm.getCursor(); + } if (hiding) hiding.style.opacity = 1 findNext(cm, event.shiftKey, function(_, to) { var dialog @@ -130,7 +134,22 @@ dialog.getBoundingClientRect().bottom - 4 > cm.cursorCoords(to, "window").top) (hiding = dialog).style.opacity = .4 }) + }; + persistentDialog(cm, queryDialog, q, searchNext, function(event, query) { + var cmd = CodeMirror.keyMap[cm.getOption("keyMap")][CodeMirror.keyName(event)]; + if (cmd == "findNext" || cmd == "findPrev") { + CodeMirror.e_stop(event); + startSearch(cm, getSearchState(cm), query); + cm.execCommand(cmd); + } else if (cmd == "find" || cmd == "findPersistent") { + CodeMirror.e_stop(event); + searchNext(query, event); + } }); + if (immediate) { + startSearch(cm, state, q); + findNext(cm, rev); + } } else { dialog(cm, queryDialog, "Search for:", q, function(query) { if (query && !state.query) cm.operation(function() { @@ -193,7 +212,7 @@ replaceAll(cm, query, text) } else { clearSearch(cm); - var cursor = getSearchCursor(cm, query, cm.getCursor()); + var cursor = getSearchCursor(cm, query, cm.getCursor("from")); var advance = function() { var start = cursor.from(), match; if (!(match = cursor.findNext())) { @@ -220,6 +239,8 @@ CodeMirror.commands.find = function(cm) {clearSearch(cm); doSearch(cm);}; CodeMirror.commands.findPersistent = function(cm) {clearSearch(cm); doSearch(cm, false, true);}; + CodeMirror.commands.findPersistentNext = function(cm) {doSearch(cm, false, true, true);}; + CodeMirror.commands.findPersistentPrev = function(cm) {doSearch(cm, true, true, true);}; CodeMirror.commands.findNext = doSearch; CodeMirror.commands.findPrev = function(cm) {doSearch(cm, true);}; CodeMirror.commands.clearSearch = clearSearch; diff --git a/www/code/codemirror-5.13.2/addon/search/searchcursor.js b/www/code/CodeMirror-5.16.0/addon/search/searchcursor.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/search/searchcursor.js rename to www/code/CodeMirror-5.16.0/addon/search/searchcursor.js diff --git a/www/code/codemirror-5.13.2/addon/selection/active-line.js b/www/code/CodeMirror-5.16.0/addon/selection/active-line.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/selection/active-line.js rename to www/code/CodeMirror-5.16.0/addon/selection/active-line.js diff --git a/www/code/codemirror-5.13.2/addon/selection/mark-selection.js b/www/code/CodeMirror-5.16.0/addon/selection/mark-selection.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/selection/mark-selection.js rename to www/code/CodeMirror-5.16.0/addon/selection/mark-selection.js diff --git a/www/code/codemirror-5.13.2/addon/selection/selection-pointer.js b/www/code/CodeMirror-5.16.0/addon/selection/selection-pointer.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/selection/selection-pointer.js rename to www/code/CodeMirror-5.16.0/addon/selection/selection-pointer.js diff --git a/www/code/codemirror-5.13.2/addon/tern/tern.css b/www/code/CodeMirror-5.16.0/addon/tern/tern.css similarity index 100% rename from www/code/codemirror-5.13.2/addon/tern/tern.css rename to www/code/CodeMirror-5.16.0/addon/tern/tern.css diff --git a/www/code/codemirror-5.13.2/addon/tern/tern.js b/www/code/CodeMirror-5.16.0/addon/tern/tern.js similarity index 99% rename from www/code/codemirror-5.13.2/addon/tern/tern.js rename to www/code/CodeMirror-5.16.0/addon/tern/tern.js index c345c4978..efdf2ed62 100644 --- a/www/code/codemirror-5.13.2/addon/tern/tern.js +++ b/www/code/CodeMirror-5.16.0/addon/tern/tern.js @@ -179,7 +179,7 @@ var data = findDoc(ts, doc); var argHints = ts.cachedArgHints; - if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) <= 0) + if (argHints && argHints.doc == doc && cmpPos(argHints.start, change.to) >= 0) ts.cachedArgHints = null; var changed = data.changed; @@ -306,7 +306,7 @@ ts.request(cm, {type: "type", preferFunction: true, end: start}, function(error, data) { if (error || !data.type || !(/^fn\(/).test(data.type)) return; ts.cachedArgHints = { - start: pos, + start: start, type: parseFnType(data.type), name: data.exprName || data.name || "fn", guess: data.guess, diff --git a/www/code/codemirror-5.13.2/addon/tern/worker.js b/www/code/CodeMirror-5.16.0/addon/tern/worker.js similarity index 100% rename from www/code/codemirror-5.13.2/addon/tern/worker.js rename to www/code/CodeMirror-5.16.0/addon/tern/worker.js diff --git a/www/code/codemirror-5.13.2/addon/wrap/hardwrap.js b/www/code/CodeMirror-5.16.0/addon/wrap/hardwrap.js similarity index 98% rename from www/code/codemirror-5.13.2/addon/wrap/hardwrap.js rename to www/code/CodeMirror-5.16.0/addon/wrap/hardwrap.js index 8806fbe2f..04851f99f 100644 --- a/www/code/codemirror-5.13.2/addon/wrap/hardwrap.js +++ b/www/code/CodeMirror-5.16.0/addon/wrap/hardwrap.js @@ -30,7 +30,9 @@ } function findBreakPoint(text, column, wrapOn, killTrailingSpace) { - for (var at = column; at > 0; --at) + var at = column + while (at < text.length && text.charAt(at) == " ") at++ + for (; at > 0; --at) if (wrapOn.test(text.slice(at - 1, at + 1))) break; for (var first = true;; first = false) { var endOfText = at; diff --git a/www/code/codemirror-5.13.2/bin/authors.sh b/www/code/CodeMirror-5.16.0/bin/authors.sh old mode 100644 new mode 100755 similarity index 100% rename from www/code/codemirror-5.13.2/bin/authors.sh rename to www/code/CodeMirror-5.16.0/bin/authors.sh diff --git a/www/code/codemirror-5.13.2/bin/compress b/www/code/CodeMirror-5.16.0/bin/compress old mode 100644 new mode 100755 similarity index 96% rename from www/code/codemirror-5.13.2/bin/compress rename to www/code/CodeMirror-5.16.0/bin/compress index 809fbe83d..d358f9c3a --- a/www/code/codemirror-5.13.2/bin/compress +++ b/www/code/CodeMirror-5.16.0/bin/compress @@ -18,7 +18,7 @@ // Script files are specified without .js ending. Prefixing them with // their full (local) path is optional. So you may say lib/codemirror // or mode/xml/xml to be more precise. In fact, even the .js suffix -// may be speficied, if wanted. +// may be specified, if wanted. "use strict"; @@ -68,7 +68,7 @@ walk("mode/"); if (!local && !blob) help(false); if (files.length) { - console.log("Some speficied files were not found: " + + console.log("Some specified files were not found: " + files.map(function(a){return a.name;}).join(", ")); process.exit(1); } diff --git a/www/code/codemirror-5.13.2/bin/lint b/www/code/CodeMirror-5.16.0/bin/lint old mode 100644 new mode 100755 similarity index 100% rename from www/code/codemirror-5.13.2/bin/lint rename to www/code/CodeMirror-5.16.0/bin/lint diff --git a/www/code/codemirror-5.13.2/bin/release b/www/code/CodeMirror-5.16.0/bin/release old mode 100644 new mode 100755 similarity index 86% rename from www/code/codemirror-5.13.2/bin/release rename to www/code/CodeMirror-5.16.0/bin/release index b782739fa..18c5cdafc --- a/www/code/codemirror-5.13.2/bin/release +++ b/www/code/CodeMirror-5.16.0/bin/release @@ -32,14 +32,12 @@ if (bumpOnly) process.exit(0); child.exec("bash bin/authors.sh", function(){}); -var simple = number.slice(0, number.lastIndexOf(".")); - rewrite("doc/compress.html", function(cmp) { return cmp.replace(/\n "); + "\n "); }); rewrite("index.html", function(index) { - return index.replace(/\.zip">\d+\.\d+<\/a>/, - ".zip\">" + simple + ""); + return index.replace(/\.zip">\d+\.\d+\.\d+<\/a>/, + ".zip\">" + number + ""); }); diff --git a/www/code/codemirror-5.13.2/bin/source-highlight b/www/code/CodeMirror-5.16.0/bin/source-highlight old mode 100644 new mode 100755 similarity index 100% rename from www/code/codemirror-5.13.2/bin/source-highlight rename to www/code/CodeMirror-5.16.0/bin/source-highlight diff --git a/www/code/CodeMirror-5.16.0/bin/upload-release.js b/www/code/CodeMirror-5.16.0/bin/upload-release.js new file mode 100644 index 000000000..7c8551468 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/bin/upload-release.js @@ -0,0 +1,35 @@ +"use strict" + +let version = process.argv[2] +let auth = process.argv[3] + +if (!auth) { + console.log("Usage: upload-release.js [TAG] [github-user:password]") + process.exit(1) +} + +require('child_process').exec("git --no-pager show -s --format='%s' " + version, (error, stdout) => { + if (error) throw error + let message = stdout.split("\n").slice(2) + message = message.slice(0, message.indexOf("-----BEGIN PGP SIGNATURE-----")).join("\n") + + let req = require("https").request({ + host: "api.github.com", + auth: auth, + headers: {"user-agent": "Release uploader"}, + path: "/repos/codemirror/codemirror/releases", + method: "POST" + }, res => { + if (res.statusCode >= 300) { + console.error(res.statusMessage) + res.on("data", d => console.log(d.toString())) + res.on("end", process.exit(1)) + } + }) + req.write(JSON.stringify({ + tag_name: version, + name: version, + body: message + })) + req.end() +}) diff --git a/www/code/codemirror-5.13.2/bower.json b/www/code/CodeMirror-5.16.0/bower.json similarity index 100% rename from www/code/codemirror-5.13.2/bower.json rename to www/code/CodeMirror-5.16.0/bower.json diff --git a/www/code/codemirror-5.13.2/demo/activeline.html b/www/code/CodeMirror-5.16.0/demo/activeline.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/activeline.html rename to www/code/CodeMirror-5.16.0/demo/activeline.html diff --git a/www/code/codemirror-5.13.2/demo/anywordhint.html b/www/code/CodeMirror-5.16.0/demo/anywordhint.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/anywordhint.html rename to www/code/CodeMirror-5.16.0/demo/anywordhint.html diff --git a/www/code/codemirror-5.13.2/demo/bidi.html b/www/code/CodeMirror-5.16.0/demo/bidi.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/bidi.html rename to www/code/CodeMirror-5.16.0/demo/bidi.html diff --git a/www/code/codemirror-5.13.2/demo/btree.html b/www/code/CodeMirror-5.16.0/demo/btree.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/btree.html rename to www/code/CodeMirror-5.16.0/demo/btree.html diff --git a/www/code/codemirror-5.13.2/demo/buffers.html b/www/code/CodeMirror-5.16.0/demo/buffers.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/buffers.html rename to www/code/CodeMirror-5.16.0/demo/buffers.html diff --git a/www/code/codemirror-5.13.2/demo/changemode.html b/www/code/CodeMirror-5.16.0/demo/changemode.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/changemode.html rename to www/code/CodeMirror-5.16.0/demo/changemode.html diff --git a/www/code/codemirror-5.13.2/demo/closebrackets.html b/www/code/CodeMirror-5.16.0/demo/closebrackets.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/closebrackets.html rename to www/code/CodeMirror-5.16.0/demo/closebrackets.html diff --git a/www/code/codemirror-5.13.2/demo/closetag.html b/www/code/CodeMirror-5.16.0/demo/closetag.html similarity index 100% rename from www/code/codemirror-5.13.2/demo/closetag.html rename to www/code/CodeMirror-5.16.0/demo/closetag.html diff --git a/www/code/codemirror-5.13.2/demo/complete.html b/www/code/CodeMirror-5.16.0/demo/complete.html similarity index 55% rename from www/code/codemirror-5.13.2/demo/complete.html rename to www/code/CodeMirror-5.16.0/demo/complete.html index cdf49dbeb..18e17c812 100644 --- a/www/code/codemirror-5.13.2/demo/complete.html +++ b/www/code/CodeMirror-5.16.0/demo/complete.html @@ -10,6 +10,7 @@ + - +
diff --git a/www/code/codemirror-5.13.2/keymap/emacs.js b/www/code/CodeMirror-5.16.0/keymap/emacs.js similarity index 100% rename from www/code/codemirror-5.13.2/keymap/emacs.js rename to www/code/CodeMirror-5.16.0/keymap/emacs.js diff --git a/www/code/codemirror-5.13.2/keymap/sublime.js b/www/code/CodeMirror-5.16.0/keymap/sublime.js similarity index 94% rename from www/code/codemirror-5.13.2/keymap/sublime.js rename to www/code/CodeMirror-5.16.0/keymap/sublime.js index 49db3b871..ed6b84742 100644 --- a/www/code/codemirror-5.13.2/keymap/sublime.js +++ b/www/code/CodeMirror-5.16.0/keymap/sublime.js @@ -55,6 +55,8 @@ cmds[map["Alt-Left"] = "goSubwordLeft"] = function(cm) { moveSubword(cm, -1); }; cmds[map["Alt-Right"] = "goSubwordRight"] = function(cm) { moveSubword(cm, 1); }; + if (mac) map["Cmd-Left"] = "goLineStartSmart"; + var scrollLineCombo = mac ? "Ctrl-Alt-" : "Ctrl-"; cmds[map[scrollLineCombo + "Up"] = "scrollLineUp"] = function(cm) { @@ -122,6 +124,7 @@ } cm.setSelections(newSelection); }); + cm.execCommand("indentAuto"); } cmds[map[ctrl + "Enter"] = "insertLineAfter"] = function(cm) { return insertLine(cm, false); }; @@ -420,22 +423,29 @@ cmds[map["Backspace"] = "smartBackspace"] = function(cm) { if (cm.somethingSelected()) return CodeMirror.Pass; - var cursor = cm.getCursor(); - var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor); - var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize")); - var indentUnit = cm.getOption("indentUnit"); + cm.operation(function() { + var cursors = cm.listSelections(); + var indentUnit = cm.getOption("indentUnit"); - if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) { - var prevIndent = new Pos(cursor.line, - CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit)); + for (var i = cursors.length - 1; i >= 0; i--) { + var cursor = cursors[i].head; + var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor); + var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize")); - // If no smart delete is happening (due to tab sizing) just do a regular delete - if (prevIndent.ch == cursor.ch) return CodeMirror.Pass; + // Delete by one character by default + var deletePos = cm.findPosH(cursor, -1, "char", false); - return cm.replaceRange("", prevIndent, cursor, "+delete"); - } else { - return CodeMirror.Pass; - } + if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) { + var prevIndent = new Pos(cursor.line, + CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit)); + + // Smart delete only if we found a valid prevIndent location + if (prevIndent.ch != cursor.ch) deletePos = prevIndent; + } + + cm.replaceRange("", deletePos, cursor, "+delete"); + } + }); }; cmds[map[cK + ctrl + "K"] = "delLineRight"] = function(cm) { @@ -490,7 +500,8 @@ cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2); }; - cmds[map["Shift-Alt-Up"] = "selectLinesUpward"] = function(cm) { + var selectLinesCombo = mac ? "Ctrl-Shift-" : "Ctrl-Alt-"; + cmds[map[selectLinesCombo + "Up"] = "selectLinesUpward"] = function(cm) { cm.operation(function() { var ranges = cm.listSelections(); for (var i = 0; i < ranges.length; i++) { @@ -500,7 +511,7 @@ } }); }; - cmds[map["Shift-Alt-Down"] = "selectLinesDownward"] = function(cm) { + cmds[map[selectLinesCombo + "Down"] = "selectLinesDownward"] = function(cm) { cm.operation(function() { var ranges = cm.listSelections(); for (var i = 0; i < ranges.length; i++) { diff --git a/www/code/codemirror-5.13.2/keymap/vim.js b/www/code/CodeMirror-5.16.0/keymap/vim.js similarity index 99% rename from www/code/codemirror-5.13.2/keymap/vim.js rename to www/code/CodeMirror-5.16.0/keymap/vim.js index 5ed2d9bf7..4278ee979 100644 --- a/www/code/codemirror-5.13.2/keymap/vim.js +++ b/www/code/CodeMirror-5.16.0/keymap/vim.js @@ -26,7 +26,7 @@ * 2. Variable declarations and short basic helpers * 3. Instance (External API) implementation * 4. Internal state tracking objects (input state, counter) implementation - * and instanstiation + * and instantiation * 5. Key handler (the main command dispatcher) implementation * 6. Motion, operator, and action implementations * 7. Helper functions for the key handler, motions, operators, and actions @@ -226,6 +226,7 @@ { name: 'sort', shortName: 'sor' }, { name: 'substitute', shortName: 's', possiblyAsync: true }, { name: 'nohlsearch', shortName: 'noh' }, + { name: 'yank', shortName: 'y' }, { name: 'delmarks', shortName: 'delm' }, { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, { name: 'global', shortName: 'g' } @@ -641,7 +642,7 @@ jumpList: createCircularJumpList(), macroModeState: new MacroModeState, // Recording latest f, t, F or T motion command. - lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, + lastCharacterSearch: {increment:0, forward:true, selectedCharacter:''}, registerController: new RegisterController({}), // search history buffer searchHistoryController: new HistoryController({}), @@ -1047,7 +1048,7 @@ }; function HistoryController() { this.historyBuffer = []; - this.iterator; + this.iterator = 0; this.initialPrefix = null; } HistoryController.prototype = { @@ -1372,7 +1373,7 @@ } }, evalInput: function(cm, vim) { - // If the motion comand is set, execute both the operator and motion. + // If the motion command is set, execute both the operator and motion. // Otherwise return. var inputState = vim.inputState; var motion = inputState.motion; @@ -1909,7 +1910,7 @@ }, repeatLastCharacterSearch: function(cm, head, motionArgs) { - var lastSearch = vimGlobalState.lastChararacterSearch; + var lastSearch = vimGlobalState.lastCharacterSearch; var repeat = motionArgs.repeat; var forward = motionArgs.forward === lastSearch.forward; var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); @@ -3002,7 +3003,7 @@ // Only clip if the selection ends with trailing newline + whitespace if (/\n\s*$/.test(selection)) { var lines = selection.split('\n'); - // We know this is all whitepsace. + // We know this is all whitespace. lines.pop(); // Cases: @@ -3088,9 +3089,9 @@ } function recordLastCharacterSearch(increment, args) { - vimGlobalState.lastChararacterSearch.increment = increment; - vimGlobalState.lastChararacterSearch.forward = args.forward; - vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; + vimGlobalState.lastCharacterSearch.increment = increment; + vimGlobalState.lastCharacterSearch.forward = args.forward; + vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter; } var symbolToMode = { @@ -3289,8 +3290,6 @@ line = cm.getLine(lineNum); pos = (dir > 0) ? 0 : line.length; } - // Should never get here. - throw new Error('The impossible happened.'); } /** @@ -3452,7 +3451,7 @@ } // TODO: perhaps this finagling of start and end positions belonds - // in codmirror/replaceRange? + // in codemirror/replaceRange? function selectCompanionObject(cm, head, symb, inclusive) { var cur = head, start, end; @@ -3783,17 +3782,10 @@ } } function makePrompt(prefix, desc) { - var raw = ''; - if (prefix) { - raw += '' + prefix + ''; - } - raw += ' ' + - ''; - if (desc) { - raw += ''; - raw += desc; - raw += ''; - } + var raw = '' + + (prefix || "") + ''; + if (desc) + raw += ' ' + desc + ''; return raw; } var searchPromptDesc = '(Javascript regexp)'; @@ -4514,14 +4506,21 @@ if (CodeMirror.commands.save) { // If a save command is defined, call it. CodeMirror.commands.save(cm); - } else { - // Saves to text area if no save command is defined. + } else if (cm.save) { + // Saves to text area if no save command is defined and cm.save() is available. cm.save(); } }, nohlsearch: function(cm) { clearSearchHighlight(cm); }, + yank: function (cm) { + var cur = copyCursor(cm.getCursor()); + var line = cur.line; + var lineText = cm.getLine(line); + vimGlobalState.registerController.pushText( + '0', 'yank', lineText, true, true); + }, delmarks: function(cm, params) { if (!params.argString || !trim(params.argString)) { showConfirm(cm, 'Argument required'); diff --git a/www/code/codemirror-5.13.2/lib/codemirror.css b/www/code/CodeMirror-5.16.0/lib/codemirror.css similarity index 97% rename from www/code/codemirror-5.13.2/lib/codemirror.css rename to www/code/CodeMirror-5.16.0/lib/codemirror.css index 1cf66a9fa..18b0bf70d 100644 --- a/www/code/codemirror-5.13.2/lib/codemirror.css +++ b/www/code/CodeMirror-5.16.0/lib/codemirror.css @@ -52,7 +52,7 @@ } .cm-fat-cursor .CodeMirror-cursor { width: auto; - border: 0; + border: 0 !important; background: #7e7; } .cm-fat-cursor div.CodeMirror-cursors { @@ -88,8 +88,14 @@ .cm-tab { display: inline-block; text-decoration: inherit; } +.CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: -20px; + overflow: hidden; +} .CodeMirror-ruler { border-left: 1px solid #ccc; + top: 0; bottom: 0; position: absolute; } @@ -291,7 +297,10 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} visibility: hidden; } -.CodeMirror-cursor { position: absolute; } +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} .CodeMirror-measure pre { position: static; } div.CodeMirror-cursors { diff --git a/www/code/codemirror-5.13.2/lib/codemirror.js b/www/code/CodeMirror-5.16.0/lib/codemirror.js similarity index 98% rename from www/code/codemirror-5.13.2/lib/codemirror.js rename to www/code/CodeMirror-5.16.0/lib/codemirror.js index ec49e3a33..7dc842d3b 100644 --- a/www/code/codemirror-5.13.2/lib/codemirror.js +++ b/www/code/CodeMirror-5.16.0/lib/codemirror.js @@ -41,6 +41,7 @@ // This is woefully incomplete. Suggestions for alternative methods welcome. var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); var mac = ios || /Mac/.test(platform); + var chromeOS = /\bCrOS\b/.test(userAgent); var windows = /win/i.test(platform); var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); @@ -1095,9 +1096,9 @@ if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } } - // This will be set to an array of strings when copying, so that, - // when pasting, we know what kind of selections the copied text - // was made out of. + // This will be set to a {lineWise: bool, text: [string]} object, so + // that, when pasting, we know what kind of selections the copied + // text was made out of. var lastCopied = null; function applyTextInput(cm, inserted, deleted, sel, origin) { @@ -1106,14 +1107,14 @@ if (!sel) sel = doc.sel; var paste = cm.state.pasteIncoming || origin == "paste"; - var textLines = doc.splitLines(inserted), multiPaste = null; + var textLines = doc.splitLines(inserted), multiPaste = null // When pasing N lines into N selections, insert one line per selection if (paste && sel.ranges.length > 1) { - if (lastCopied && lastCopied.join("\n") == inserted) { - if (sel.ranges.length % lastCopied.length == 0) { + if (lastCopied && lastCopied.text.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.text.length == 0) { multiPaste = []; - for (var i = 0; i < lastCopied.length; i++) - multiPaste.push(doc.splitLines(lastCopied[i])); + for (var i = 0; i < lastCopied.text.length; i++) + multiPaste.push(doc.splitLines(lastCopied.text[i])); } } else if (textLines.length == sel.ranges.length) { multiPaste = map(textLines, function(l) { return [l]; }); @@ -1129,6 +1130,8 @@ from = Pos(from.line, from.ch - deleted); else if (cm.state.overwrite && !paste) // Handle overwrite to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); + else if (lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted) + from = to = Pos(from.line, 0) } var updateInput = cm.curOp.updateInput; var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, @@ -1261,18 +1264,18 @@ function prepareCopyCut(e) { if (signalDOMEvent(cm, e)) return if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); + lastCopied = {lineWise: false, text: cm.getSelections()}; if (input.inaccurateSelection) { input.prevInput = ""; input.inaccurateSelection = false; - te.value = lastCopied.join("\n"); + te.value = lastCopied.text.join("\n"); selectInput(te); } } else if (!cm.options.lineWiseCopyCut) { return; } else { var ranges = copyableRanges(cm); - lastCopied = ranges.text; + lastCopied = {lineWise: true, text: ranges.text}; if (e.type == "cut") { cm.setSelections(ranges.ranges, null, sel_dontScroll); } else { @@ -1620,13 +1623,13 @@ function onCopyCut(e) { if (signalDOMEvent(cm, e)) return if (cm.somethingSelected()) { - lastCopied = cm.getSelections(); + lastCopied = {lineWise: false, text: cm.getSelections()}; if (e.type == "cut") cm.replaceSelection("", null, "cut"); } else if (!cm.options.lineWiseCopyCut) { return; } else { var ranges = copyableRanges(cm); - lastCopied = ranges.text; + lastCopied = {lineWise: true, text: ranges.text}; if (e.type == "cut") { cm.operation(function() { cm.setSelections(ranges.ranges, 0, sel_dontScroll); @@ -1638,12 +1641,12 @@ if (e.clipboardData && !ios) { e.preventDefault(); e.clipboardData.clearData(); - e.clipboardData.setData("text/plain", lastCopied.join("\n")); + e.clipboardData.setData("text/plain", lastCopied.text.join("\n")); } else { // Old-fashioned briefly-focus-a-textarea hack var kludge = hiddenTextarea(), te = kludge.firstChild; cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); - te.value = lastCopied.join("\n"); + te.value = lastCopied.text.join("\n"); var hadFocus = document.activeElement; selectInput(te); setTimeout(function() { @@ -1662,9 +1665,9 @@ return result; }, - showSelection: function(info) { + showSelection: function(info, takeFocus) { if (!info || !this.cm.display.view.length) return; - if (info.focus) this.showPrimarySelection(); + if (info.focus || takeFocus) this.showPrimarySelection(); this.showMultipleSelections(info); }, @@ -2930,10 +2933,23 @@ for (;;) { if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { var ch = x < fromX || x - fromX <= toX - x ? from : to; + var outside = ch == from ? fromOutside : toOutside var xDiff = x - (ch == from ? fromX : toX); + // This is a kludge to handle the case where the coordinates + // are after a line-wrapped line. We should replace it with a + // more general handling of cursor positions around line + // breaks. (Issue #4078) + if (toOutside && !bidi && !/\s/.test(lineObj.text.charAt(ch)) && xDiff > 0 && + ch < lineObj.text.length && preparedMeasure.view.measure.heights.length > 1) { + var charSize = measureCharPrepared(cm, preparedMeasure, ch, "right"); + if (innerOff <= charSize.bottom && innerOff >= charSize.top && Math.abs(x - charSize.right) < xDiff) { + outside = false + ch++ + xDiff = x - charSize.right + } + } while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; - var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, - xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); + var pos = PosWithInfo(lineNo, ch, outside, xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); return pos; } var step = Math.ceil(dist / 2), middle = from + step; @@ -3100,7 +3116,7 @@ } if (op.updatedDisplay || op.selectionChanged) - op.preparedSelection = display.input.prepareSelection(); + op.preparedSelection = display.input.prepareSelection(op.focus); } function endOperation_W2(op) { @@ -3113,8 +3129,9 @@ cm.display.maxLineChanged = false; } + var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()) if (op.preparedSelection) - cm.display.input.showSelection(op.preparedSelection); + cm.display.input.showSelection(op.preparedSelection, takeFocus); if (op.updatedDisplay || op.startHeight != cm.doc.height) updateScrollbars(cm, op.barMeasure); if (op.updatedDisplay) @@ -3124,8 +3141,7 @@ if (cm.state.focused && op.updateInput) cm.display.input.reset(op.typing); - if (op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus())) - ensureFocus(op.cm); + if (takeFocus) ensureFocus(op.cm); } function endOperation_finish(op) { @@ -3657,6 +3673,7 @@ // Let the drag handler handle this. if (webkit) display.scroller.draggable = true; cm.state.draggingText = dragEnd; + dragEnd.copy = mac ? e.altKey : e.ctrlKey // IE's approach to draggable if (display.scroller.dragDrop) display.scroller.dragDrop(); on(document, "mouseup", dragEnd); @@ -3680,7 +3697,7 @@ ourIndex = doc.sel.primIndex; } - if (e.altKey) { + if (chromeOS ? e.shiftKey && e.metaKey : e.altKey) { type = "rect"; if (!addNew) ourRange = new Range(start, start); start = posFromMouse(cm, e, true, true); @@ -3887,7 +3904,7 @@ try { var text = e.dataTransfer.getData("Text"); if (text) { - if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) + if (cm.state.draggingText && !cm.state.draggingText.copy) var selected = cm.listSelections(); setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); if (selected) for (var i = 0; i < selected.length; ++i) @@ -3905,6 +3922,7 @@ if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; e.dataTransfer.setData("Text", cm.getSelection()); + e.dataTransfer.effectAllowed = "copyMove" // Use dummy image instead of default browsers image. // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. @@ -5390,7 +5408,7 @@ for (var i = newBreaks.length - 1; i >= 0; i--) replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)) }); - option("specialChars", /[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { + option("specialChars", /[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); if (old != CodeMirror.Init) cm.refresh(); }); @@ -5719,7 +5737,7 @@ for (var i = 0; i < ranges.length; i++) { var pos = ranges[i].from(); var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); - spaces.push(new Array(tabSize - col % tabSize + 1).join(" ")); + spaces.push(spaceStr(tabSize - col % tabSize)); } cm.replaceSelections(spaces); }, @@ -5762,6 +5780,7 @@ ensureCursorVisible(cm); }); }, + openLine: function(cm) {cm.replaceSelection("\n", "start")}, toggleOverwrite: function(cm) {cm.toggleOverwrite();} }; @@ -5796,7 +5815,8 @@ "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", - "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars", + "Ctrl-O": "openLine" }; keyMap.macDefault = { "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", @@ -6558,8 +6578,8 @@ var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; - if (fromCmp <= 0 && (cmp(found.to, from) > 0 || (sp.marker.inclusiveRight && marker.inclusiveLeft)) || - fromCmp >= 0 && (cmp(found.from, to) < 0 || (sp.marker.inclusiveLeft && marker.inclusiveRight))) + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || + fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) return true; } } @@ -6961,8 +6981,11 @@ } // See issue #2901 - if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) - builder.content.className = "cm-tab-wrap-hack"; + if (webkit) { + var last = builder.content.lastChild + if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab"))) + builder.content.className = "cm-tab-wrap-hack"; + } signal(cm, "renderLine", cm, lineView.line, builder.pre); if (builder.pre.className) @@ -7314,13 +7337,16 @@ if (at <= sz) { child.insertInner(at, lines, height); if (child.lines && child.lines.length > 50) { - while (child.lines.length > 50) { - var spilled = child.lines.splice(child.lines.length - 25, 25); - var newleaf = new LeafChunk(spilled); - child.height -= newleaf.height; - this.children.splice(i + 1, 0, newleaf); - newleaf.parent = this; + // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. + // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. + var remaining = child.lines.length % 25 + 25 + for (var pos = remaining; pos < child.lines.length;) { + var leaf = new LeafChunk(child.lines.slice(pos, pos += 25)); + child.height -= leaf.height; + this.children.splice(++i, 0, leaf); + leaf.parent = this; } + child.lines = child.lines.slice(0, remaining); this.maybeSpill(); } break; @@ -7340,7 +7366,7 @@ copy.parent = me; me.children = [copy, sibling]; me = copy; - } else { + } else { me.size -= sibling.size; me.height -= sibling.height; var myIndex = indexOf(me.parent.children, me); @@ -7625,9 +7651,9 @@ var spans = line.markedSpans; if (spans) for (var i = 0; i < spans.length; i++) { var span = spans[i]; - if (!(span.to != null && lineNo == from.line && from.ch > span.to || + if (!(span.to != null && lineNo == from.line && from.ch >= span.to || span.from == null && lineNo != from.line || - span.from != null && lineNo == to.line && span.from > to.ch) && + span.from != null && lineNo == to.line && span.from >= to.ch) && (!filter || filter(span.marker))) found.push(span.marker.parent || span.marker); } @@ -7646,9 +7672,9 @@ }, posFromIndex: function(off) { - var ch, lineNo = this.first; + var ch, lineNo = this.first, sepSize = this.lineSeparator().length; this.iter(function(line) { - var sz = line.text.length + 1; + var sz = line.text.length + sepSize; if (sz > off) { ch = off; return true; } off -= sz; ++lineNo; @@ -7659,8 +7685,9 @@ coords = clipPos(this, coords); var index = coords.ch; if (coords.line < this.first || coords.ch < 0) return 0; + var sepSize = this.lineSeparator().length; this.iter(this.first, coords.line, function (line) { - index += line.text.length + 1; + index += line.text.length + sepSize; }); return index; }, @@ -8889,7 +8916,7 @@ // THE END - CodeMirror.version = "5.13.2"; + CodeMirror.version = "5.16.0"; return CodeMirror; }); diff --git a/www/code/codemirror-5.13.2/mode/apl/apl.js b/www/code/CodeMirror-5.16.0/mode/apl/apl.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/apl/apl.js rename to www/code/CodeMirror-5.16.0/mode/apl/apl.js diff --git a/www/code/codemirror-5.13.2/mode/apl/index.html b/www/code/CodeMirror-5.16.0/mode/apl/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/apl/index.html rename to www/code/CodeMirror-5.16.0/mode/apl/index.html diff --git a/www/code/codemirror-5.13.2/mode/asciiarmor/asciiarmor.js b/www/code/CodeMirror-5.16.0/mode/asciiarmor/asciiarmor.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/asciiarmor/asciiarmor.js rename to www/code/CodeMirror-5.16.0/mode/asciiarmor/asciiarmor.js diff --git a/www/code/codemirror-5.13.2/mode/asciiarmor/index.html b/www/code/CodeMirror-5.16.0/mode/asciiarmor/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/asciiarmor/index.html rename to www/code/CodeMirror-5.16.0/mode/asciiarmor/index.html diff --git a/www/code/codemirror-5.13.2/mode/asn.1/asn.1.js b/www/code/CodeMirror-5.16.0/mode/asn.1/asn.1.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/asn.1/asn.1.js rename to www/code/CodeMirror-5.16.0/mode/asn.1/asn.1.js diff --git a/www/code/codemirror-5.13.2/mode/asn.1/index.html b/www/code/CodeMirror-5.16.0/mode/asn.1/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/asn.1/index.html rename to www/code/CodeMirror-5.16.0/mode/asn.1/index.html diff --git a/www/code/codemirror-5.13.2/mode/asterisk/asterisk.js b/www/code/CodeMirror-5.16.0/mode/asterisk/asterisk.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/asterisk/asterisk.js rename to www/code/CodeMirror-5.16.0/mode/asterisk/asterisk.js diff --git a/www/code/codemirror-5.13.2/mode/asterisk/index.html b/www/code/CodeMirror-5.16.0/mode/asterisk/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/asterisk/index.html rename to www/code/CodeMirror-5.16.0/mode/asterisk/index.html diff --git a/www/code/codemirror-5.13.2/mode/brainfuck/brainfuck.js b/www/code/CodeMirror-5.16.0/mode/brainfuck/brainfuck.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/brainfuck/brainfuck.js rename to www/code/CodeMirror-5.16.0/mode/brainfuck/brainfuck.js diff --git a/www/code/codemirror-5.13.2/mode/brainfuck/index.html b/www/code/CodeMirror-5.16.0/mode/brainfuck/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/brainfuck/index.html rename to www/code/CodeMirror-5.16.0/mode/brainfuck/index.html diff --git a/www/code/codemirror-5.13.2/mode/clike/clike.js b/www/code/CodeMirror-5.16.0/mode/clike/clike.js similarity index 93% rename from www/code/codemirror-5.13.2/mode/clike/clike.js rename to www/code/CodeMirror-5.16.0/mode/clike/clike.js index 34d3a5afd..a37921fda 100644 --- a/www/code/codemirror-5.13.2/mode/clike/clike.js +++ b/www/code/CodeMirror-5.16.0/mode/clike/clike.js @@ -11,21 +11,19 @@ })(function(CodeMirror) { "use strict"; -function Context(indented, column, type, align, prev) { +function Context(indented, column, type, info, align, prev) { this.indented = indented; this.column = column; this.type = type; + this.info = info; this.align = align; this.prev = prev; } -function isStatement(type) { - return type == "statement" || type == "switchstatement" || type == "namespace"; -} -function pushContext(state, col, type) { +function pushContext(state, col, type, info) { var indent = state.indented; - if (state.context && isStatement(state.context.type) && !isStatement(type)) + if (state.context && state.context.type != "statement" && type != "statement") indent = state.context.indented; - return state.context = new Context(indent, col, type, null, state.context); + return state.context = new Context(indent, col, type, info, null, state.context); } function popContext(state) { var t = state.context.type; @@ -34,15 +32,16 @@ function popContext(state) { return state.context = state.context.prev; } -function typeBefore(stream, state) { +function typeBefore(stream, state, pos) { if (state.prevToken == "variable" || state.prevToken == "variable-3") return true; - if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, stream.start))) return true; + if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true; + if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true; } function isTopScope(context) { for (;;) { if (!context || context.type == "top") return true; - if (context.type == "}" && context.prev.type != "namespace") return false; + if (context.type == "}" && context.prev.info != "namespace") return false; context = context.prev; } } @@ -147,13 +146,18 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { return "comment"; } + function maybeEOL(stream, state) { + if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context)) + state.typeAtEndOfLine = typeBefore(stream, state, stream.pos) + } + // Interface return { startState: function(basecolumn) { return { tokenize: null, - context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false), indented: 0, startOfLine: true, prevToken: null @@ -167,36 +171,31 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { state.indented = stream.indentation(); state.startOfLine = true; } - if (stream.eatSpace()) return null; + if (stream.eatSpace()) { maybeEOL(stream, state); return null; } curPunc = isDefKeyword = null; var style = (state.tokenize || tokenBase)(stream, state); if (style == "comment" || style == "meta") return style; if (ctx.align == null) ctx.align = true; - if (endStatement.test(curPunc)) while (isStatement(state.context.type)) popContext(state); + if (endStatement.test(curPunc)) while (state.context.type == "statement") popContext(state); else if (curPunc == "{") pushContext(state, stream.column(), "}"); else if (curPunc == "[") pushContext(state, stream.column(), "]"); else if (curPunc == "(") pushContext(state, stream.column(), ")"); else if (curPunc == "}") { - while (isStatement(ctx.type)) ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); if (ctx.type == "}") ctx = popContext(state); - while (isStatement(ctx.type)) ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); } else if (curPunc == ctx.type) popContext(state); else if (indentStatements && (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") || - (isStatement(ctx.type) && curPunc == "newstatement"))) { - var type = "statement"; - if (curPunc == "newstatement" && indentSwitch && stream.current() == "switch") - type = "switchstatement"; - else if (style == "keyword" && stream.current() == "namespace") - type = "namespace"; - pushContext(state, stream.column(), type); + (ctx.type == "statement" && curPunc == "newstatement"))) { + pushContext(state, stream.column(), "statement", stream.current()); } if (style == "variable" && ((state.prevToken == "def" || - (parserConfig.typeFirstDefinitions && typeBefore(stream, state) && + (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) && isTopScope(state.context) && stream.match(/^\s*\(/, false))))) style = "def"; @@ -209,24 +208,28 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { state.startOfLine = false; state.prevToken = isDefKeyword ? "def" : style || curPunc; + maybeEOL(stream, state); return style; }, indent: function(state, textAfter) { - if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass; var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); - if (isStatement(ctx.type) && firstChar == "}") ctx = ctx.prev; + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + if (parserConfig.dontIndentStatements) + while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info)) + ctx = ctx.prev if (hooks.indent) { var hook = hooks.indent(state, ctx, textAfter); if (typeof hook == "number") return hook } var closing = firstChar == ctx.type; - var switchBlock = ctx.prev && ctx.prev.type == "switchstatement"; + var switchBlock = ctx.prev && ctx.prev.info == "switch"; if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) { while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev return ctx.indented } - if (isStatement(ctx.type)) + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1); @@ -386,6 +389,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { defKeywords: words("class namespace struct enum union"), typeFirstDefinitions: true, atoms: words("true false null"), + dontIndentStatements: /^template$/, hooks: { "#": cppHook, "*": pointerHook, @@ -429,6 +433,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { typeFirstDefinitions: true, atoms: words("true false null"), endStatement: /^[;:]$/, + number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, hooks: { "@": function(stream) { stream.eatWhile(/[\w\$_]/); @@ -531,7 +536,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { "=": function(stream, state) { var cx = state.context if (cx.type == "}" && cx.align && stream.eat(">")) { - state.context = new Context(cx.indented, cx.column, cx.type, null, cx.prev) + state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev) return "operator" } else { return false @@ -667,7 +672,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) { def("text/x-objectivec", { name: "clike", - keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in " + + keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in " + "inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"), types: words(cTypes), atoms: words("YES NO NULL NILL ON OFF true false"), diff --git a/www/code/codemirror-5.13.2/mode/clike/index.html b/www/code/CodeMirror-5.16.0/mode/clike/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/clike/index.html rename to www/code/CodeMirror-5.16.0/mode/clike/index.html diff --git a/www/code/codemirror-5.13.2/mode/clike/scala.html b/www/code/CodeMirror-5.16.0/mode/clike/scala.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/clike/scala.html rename to www/code/CodeMirror-5.16.0/mode/clike/scala.html diff --git a/www/code/codemirror-5.13.2/mode/clike/test.js b/www/code/CodeMirror-5.16.0/mode/clike/test.js similarity index 87% rename from www/code/codemirror-5.13.2/mode/clike/test.js rename to www/code/CodeMirror-5.16.0/mode/clike/test.js index c26003266..bea85b869 100644 --- a/www/code/codemirror-5.13.2/mode/clike/test.js +++ b/www/code/CodeMirror-5.16.0/mode/clike/test.js @@ -25,6 +25,10 @@ "[keyword struct] [def bar]{}", "[variable-3 int] [variable-3 *][def baz]() {}"); + MT("def_new_line", + "::[variable std]::[variable SomeTerribleType][operator <][variable T][operator >]", + "[def SomeLongMethodNameThatDoesntFitIntoOneLine]([keyword const] [variable MyType][operator &] [variable param]) {}") + MT("double_block", "[keyword for] (;;)", " [keyword for] (;;)", diff --git a/www/code/codemirror-5.13.2/mode/clojure/clojure.js b/www/code/CodeMirror-5.16.0/mode/clojure/clojure.js similarity index 56% rename from www/code/codemirror-5.13.2/mode/clojure/clojure.js rename to www/code/CodeMirror-5.16.0/mode/clojure/clojure.js index cd8129f75..ed6af2c83 100644 --- a/www/code/codemirror-5.13.2/mode/clojure/clojure.js +++ b/www/code/CodeMirror-5.16.0/mode/clojure/clojure.js @@ -31,14 +31,70 @@ CodeMirror.defineMode("clojure", function (options) { var atoms = makeKeywords("true false nil"); var keywords = makeKeywords( - "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"); + "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest " + + "slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn " + + "do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync " + + "doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars " + + "binding gen-class gen-and-load-class gen-and-save-class handler-case handle"); var builtins = makeKeywords( - "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>"); + "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* " + + "*compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* " + + "*math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* " + + "*source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> " + + "->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor " + + "aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! " + + "alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double " + + "aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 " + + "bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set " + + "bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast " + + "byte byte-array bytes case cat cast char char-array char-escape-string char-name-string char? chars chunk chunk-append " + + "chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors " + + "clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement completing concat cond condp " + + "conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? " + + "declare dedupe default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol " + + "defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc " + + "dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last " + + "drop-while eduction empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info " + + "extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword " + + "find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? " + + "fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? " + + "gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash " + + "hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? " + + "int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep " + + "keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file " + + "load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array " + + "make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods " + + "min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty " + + "not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias " + + "ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all " + + "partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers " + + "primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str " + + "prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues " + + "quot rand rand-int rand-nth random-sample range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern " + + "re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history " + + "ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods " + + "remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest " + + "restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? " + + "seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts " + + "shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? " + + "special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol " + + "symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transduce " + + "transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec " + + "unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int " + + "unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int "+ + "unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote " + + "unquote-splicing update update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of " + + "vector? volatile! volatile? vreset! vswap! when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context " + + "with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap " + + "*default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! " + + "set-agent-send-off-executor! some-> some->>"); var indentKeys = makeKeywords( // Built-ins - "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " + + "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto " + + "locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type " + + "try catch " + // Binding forms "let letfn binding loop for doseq dotimes when-let if-let " + diff --git a/www/code/codemirror-5.13.2/mode/clojure/index.html b/www/code/CodeMirror-5.16.0/mode/clojure/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/clojure/index.html rename to www/code/CodeMirror-5.16.0/mode/clojure/index.html diff --git a/www/code/codemirror-5.13.2/mode/cmake/cmake.js b/www/code/CodeMirror-5.16.0/mode/cmake/cmake.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/cmake/cmake.js rename to www/code/CodeMirror-5.16.0/mode/cmake/cmake.js diff --git a/www/code/codemirror-5.13.2/mode/cmake/index.html b/www/code/CodeMirror-5.16.0/mode/cmake/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/cmake/index.html rename to www/code/CodeMirror-5.16.0/mode/cmake/index.html diff --git a/www/code/codemirror-5.13.2/mode/cobol/cobol.js b/www/code/CodeMirror-5.16.0/mode/cobol/cobol.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/cobol/cobol.js rename to www/code/CodeMirror-5.16.0/mode/cobol/cobol.js diff --git a/www/code/codemirror-5.13.2/mode/cobol/index.html b/www/code/CodeMirror-5.16.0/mode/cobol/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/cobol/index.html rename to www/code/CodeMirror-5.16.0/mode/cobol/index.html diff --git a/www/code/codemirror-5.13.2/mode/coffeescript/coffeescript.js b/www/code/CodeMirror-5.16.0/mode/coffeescript/coffeescript.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/coffeescript/coffeescript.js rename to www/code/CodeMirror-5.16.0/mode/coffeescript/coffeescript.js diff --git a/www/code/codemirror-5.13.2/mode/coffeescript/index.html b/www/code/CodeMirror-5.16.0/mode/coffeescript/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/coffeescript/index.html rename to www/code/CodeMirror-5.16.0/mode/coffeescript/index.html diff --git a/www/code/codemirror-5.13.2/mode/commonlisp/commonlisp.js b/www/code/CodeMirror-5.16.0/mode/commonlisp/commonlisp.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/commonlisp/commonlisp.js rename to www/code/CodeMirror-5.16.0/mode/commonlisp/commonlisp.js diff --git a/www/code/codemirror-5.13.2/mode/commonlisp/index.html b/www/code/CodeMirror-5.16.0/mode/commonlisp/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/commonlisp/index.html rename to www/code/CodeMirror-5.16.0/mode/commonlisp/index.html diff --git a/www/code/codemirror-5.13.2/mode/crystal/crystal.js b/www/code/CodeMirror-5.16.0/mode/crystal/crystal.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/crystal/crystal.js rename to www/code/CodeMirror-5.16.0/mode/crystal/crystal.js index 2e74bee43..e63627cee 100644 --- a/www/code/codemirror-5.13.2/mode/crystal/crystal.js +++ b/www/code/CodeMirror-5.16.0/mode/crystal/crystal.js @@ -209,7 +209,7 @@ // Operators if (stream.match(operators)) { - stream.eat("="); // Operators can follow assigin symbol. + stream.eat("="); // Operators can follow assign symbol. return "operator"; } diff --git a/www/code/codemirror-5.13.2/mode/crystal/index.html b/www/code/CodeMirror-5.16.0/mode/crystal/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/crystal/index.html rename to www/code/CodeMirror-5.16.0/mode/crystal/index.html diff --git a/www/code/codemirror-5.13.2/mode/css/css.js b/www/code/CodeMirror-5.16.0/mode/css/css.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/css/css.js rename to www/code/CodeMirror-5.16.0/mode/css/css.js index e9656e3dc..ea7bd01d8 100644 --- a/www/code/codemirror-5.13.2/mode/css/css.js +++ b/www/code/CodeMirror-5.16.0/mode/css/css.js @@ -484,9 +484,9 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", - "grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end", - "grid-column-start", "grid-row", "grid-row-end", "grid-row-start", - "grid-template", "grid-template-areas", "grid-template-columns", + "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap", + "grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", + "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "inline-box-align", "justify-content", "left", "letter-spacing", @@ -601,7 +601,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "compact", "condensed", "contain", "content", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal", - "decimal-leading-zero", "default", "default-button", "destination-atop", + "decimal-leading-zero", "default", "default-button", "dense", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "difference", "disc", "discard", "disclosure-closed", "disclosure-open", "document", "dot-dash", "dot-dot-dash", @@ -615,13 +615,13 @@ CodeMirror.defineMode("css", function(config, parserConfig) { "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", - "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", + "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew", "help", "hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore", "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", - "inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert", + "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "japanese-formal", "japanese-informal", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer", "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", diff --git a/www/code/codemirror-5.13.2/mode/css/gss.html b/www/code/CodeMirror-5.16.0/mode/css/gss.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/gss.html rename to www/code/CodeMirror-5.16.0/mode/css/gss.html diff --git a/www/code/codemirror-5.13.2/mode/css/gss_test.js b/www/code/CodeMirror-5.16.0/mode/css/gss_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/gss_test.js rename to www/code/CodeMirror-5.16.0/mode/css/gss_test.js diff --git a/www/code/codemirror-5.13.2/mode/css/index.html b/www/code/CodeMirror-5.16.0/mode/css/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/index.html rename to www/code/CodeMirror-5.16.0/mode/css/index.html diff --git a/www/code/codemirror-5.13.2/mode/css/less.html b/www/code/CodeMirror-5.16.0/mode/css/less.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/less.html rename to www/code/CodeMirror-5.16.0/mode/css/less.html diff --git a/www/code/codemirror-5.13.2/mode/css/less_test.js b/www/code/CodeMirror-5.16.0/mode/css/less_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/less_test.js rename to www/code/CodeMirror-5.16.0/mode/css/less_test.js diff --git a/www/code/codemirror-5.13.2/mode/css/scss.html b/www/code/CodeMirror-5.16.0/mode/css/scss.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/scss.html rename to www/code/CodeMirror-5.16.0/mode/css/scss.html diff --git a/www/code/codemirror-5.13.2/mode/css/scss_test.js b/www/code/CodeMirror-5.16.0/mode/css/scss_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/scss_test.js rename to www/code/CodeMirror-5.16.0/mode/css/scss_test.js diff --git a/www/code/codemirror-5.13.2/mode/css/test.js b/www/code/CodeMirror-5.16.0/mode/css/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/css/test.js rename to www/code/CodeMirror-5.16.0/mode/css/test.js diff --git a/www/code/codemirror-5.13.2/mode/cypher/cypher.js b/www/code/CodeMirror-5.16.0/mode/cypher/cypher.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/cypher/cypher.js rename to www/code/CodeMirror-5.16.0/mode/cypher/cypher.js diff --git a/www/code/codemirror-5.13.2/mode/cypher/index.html b/www/code/CodeMirror-5.16.0/mode/cypher/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/cypher/index.html rename to www/code/CodeMirror-5.16.0/mode/cypher/index.html diff --git a/www/code/codemirror-5.13.2/mode/d/d.js b/www/code/CodeMirror-5.16.0/mode/d/d.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/d/d.js rename to www/code/CodeMirror-5.16.0/mode/d/d.js diff --git a/www/code/codemirror-5.13.2/mode/d/index.html b/www/code/CodeMirror-5.16.0/mode/d/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/d/index.html rename to www/code/CodeMirror-5.16.0/mode/d/index.html diff --git a/www/code/codemirror-5.13.2/mode/dart/dart.js b/www/code/CodeMirror-5.16.0/mode/dart/dart.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/dart/dart.js rename to www/code/CodeMirror-5.16.0/mode/dart/dart.js diff --git a/www/code/codemirror-5.13.2/mode/dart/index.html b/www/code/CodeMirror-5.16.0/mode/dart/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/dart/index.html rename to www/code/CodeMirror-5.16.0/mode/dart/index.html diff --git a/www/code/codemirror-5.13.2/mode/diff/diff.js b/www/code/CodeMirror-5.16.0/mode/diff/diff.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/diff/diff.js rename to www/code/CodeMirror-5.16.0/mode/diff/diff.js diff --git a/www/code/codemirror-5.13.2/mode/diff/index.html b/www/code/CodeMirror-5.16.0/mode/diff/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/diff/index.html rename to www/code/CodeMirror-5.16.0/mode/diff/index.html diff --git a/www/code/codemirror-5.13.2/mode/django/django.js b/www/code/CodeMirror-5.16.0/mode/django/django.js similarity index 95% rename from www/code/codemirror-5.13.2/mode/django/django.js rename to www/code/CodeMirror-5.16.0/mode/django/django.js index a8a7d8311..7b4ef3b56 100644 --- a/www/code/codemirror-5.13.2/mode/django/django.js +++ b/www/code/CodeMirror-5.16.0/mode/django/django.js @@ -66,11 +66,11 @@ } // A string can be included in either single or double quotes (this is - // the delimeter). Mark everything as a string until the start delimeter + // the delimiter). Mark everything as a string until the start delimiter // occurs again. - function inString (delimeter, previousTokenizer) { + function inString (delimiter, previousTokenizer) { return function (stream, state) { - if (!state.escapeNext && stream.eat(delimeter)) { + if (!state.escapeNext && stream.eat(delimiter)) { state.tokenize = previousTokenizer; } else { if (state.escapeNext) { @@ -80,7 +80,7 @@ var ch = stream.next(); // Take into account the backslash for escaping characters, such as - // the string delimeter. + // the string delimiter. if (ch == "\\") { state.escapeNext = true; } @@ -100,7 +100,7 @@ return "null"; } - // Dot folowed by a non-word character should be considered an error. + // Dot followed by a non-word character should be considered an error. if (stream.match(/\.\W+/)) { return "error"; } else if (stream.eat(".")) { @@ -119,7 +119,7 @@ return "null"; } - // Pipe folowed by a non-word character should be considered an error. + // Pipe followed by a non-word character should be considered an error. if (stream.match(/\.\W+/)) { return "error"; } else if (stream.eat("|")) { @@ -199,7 +199,7 @@ return "null"; } - // Dot folowed by a non-word character should be considered an error. + // Dot followed by a non-word character should be considered an error. if (stream.match(/\.\W+/)) { return "error"; } else if (stream.eat(".")) { @@ -218,7 +218,7 @@ return "null"; } - // Pipe folowed by a non-word character should be considered an error. + // Pipe followed by a non-word character should be considered an error. if (stream.match(/\.\W+/)) { return "error"; } else if (stream.eat("|")) { diff --git a/www/code/codemirror-5.13.2/mode/django/index.html b/www/code/CodeMirror-5.16.0/mode/django/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/django/index.html rename to www/code/CodeMirror-5.16.0/mode/django/index.html diff --git a/www/code/codemirror-5.13.2/mode/dockerfile/dockerfile.js b/www/code/CodeMirror-5.16.0/mode/dockerfile/dockerfile.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/dockerfile/dockerfile.js rename to www/code/CodeMirror-5.16.0/mode/dockerfile/dockerfile.js diff --git a/www/code/codemirror-5.13.2/mode/dockerfile/index.html b/www/code/CodeMirror-5.16.0/mode/dockerfile/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/dockerfile/index.html rename to www/code/CodeMirror-5.16.0/mode/dockerfile/index.html diff --git a/www/code/codemirror-5.13.2/mode/dtd/dtd.js b/www/code/CodeMirror-5.16.0/mode/dtd/dtd.js similarity index 94% rename from www/code/codemirror-5.13.2/mode/dtd/dtd.js rename to www/code/CodeMirror-5.16.0/mode/dtd/dtd.js index f37029a77..52d76ee11 100644 --- a/www/code/codemirror-5.13.2/mode/dtd/dtd.js +++ b/www/code/CodeMirror-5.16.0/mode/dtd/dtd.js @@ -114,17 +114,17 @@ CodeMirror.defineMode("dtd", function(config) { if( textAfter.match(/\]\s+|\]/) )n=n-1; else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){ - if(textAfter.substr(0,1) === "<")n; - else if( type == "doindent" && textAfter.length > 1 )n; + if(textAfter.substr(0,1) === "<") {} + else if( type == "doindent" && textAfter.length > 1 ) {} else if( type == "doindent")n--; - else if( type == ">" && textAfter.length > 1)n; - else if( type == "tag" && textAfter !== ">")n; + else if( type == ">" && textAfter.length > 1) {} + else if( type == "tag" && textAfter !== ">") {} else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--; else if( type == "tag")n++; else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--; - else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n; + else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule") {} else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1; - else if( textAfter === ">")n; + else if( textAfter === ">") {} else n=n-1; //over rule them all if(type == null || type == "]")n--; diff --git a/www/code/codemirror-5.13.2/mode/dtd/index.html b/www/code/CodeMirror-5.16.0/mode/dtd/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/dtd/index.html rename to www/code/CodeMirror-5.16.0/mode/dtd/index.html diff --git a/www/code/codemirror-5.13.2/mode/dylan/dylan.js b/www/code/CodeMirror-5.16.0/mode/dylan/dylan.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/dylan/dylan.js rename to www/code/CodeMirror-5.16.0/mode/dylan/dylan.js diff --git a/www/code/codemirror-5.13.2/mode/dylan/index.html b/www/code/CodeMirror-5.16.0/mode/dylan/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/dylan/index.html rename to www/code/CodeMirror-5.16.0/mode/dylan/index.html diff --git a/www/code/codemirror-5.13.2/mode/dylan/test.js b/www/code/CodeMirror-5.16.0/mode/dylan/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/dylan/test.js rename to www/code/CodeMirror-5.16.0/mode/dylan/test.js diff --git a/www/code/codemirror-5.13.2/mode/ebnf/ebnf.js b/www/code/CodeMirror-5.16.0/mode/ebnf/ebnf.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/ebnf/ebnf.js rename to www/code/CodeMirror-5.16.0/mode/ebnf/ebnf.js index 6b51aba07..9618f8e42 100644 --- a/www/code/codemirror-5.13.2/mode/ebnf/ebnf.js +++ b/www/code/CodeMirror-5.16.0/mode/ebnf/ebnf.js @@ -94,7 +94,7 @@ if (bracesMode !== null && (state.braced || peek === "{")) { if (state.localState === null) - state.localState = bracesMode.startState(); + state.localState = CodeMirror.startState(bracesMode); var token = bracesMode.token(stream, state.localState), text = stream.current(); diff --git a/www/code/codemirror-5.13.2/mode/ebnf/index.html b/www/code/CodeMirror-5.16.0/mode/ebnf/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/ebnf/index.html rename to www/code/CodeMirror-5.16.0/mode/ebnf/index.html diff --git a/www/code/codemirror-5.13.2/mode/ecl/ecl.js b/www/code/CodeMirror-5.16.0/mode/ecl/ecl.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/ecl/ecl.js rename to www/code/CodeMirror-5.16.0/mode/ecl/ecl.js diff --git a/www/code/codemirror-5.13.2/mode/ecl/index.html b/www/code/CodeMirror-5.16.0/mode/ecl/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/ecl/index.html rename to www/code/CodeMirror-5.16.0/mode/ecl/index.html diff --git a/www/code/codemirror-5.13.2/mode/eiffel/eiffel.js b/www/code/CodeMirror-5.16.0/mode/eiffel/eiffel.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/eiffel/eiffel.js rename to www/code/CodeMirror-5.16.0/mode/eiffel/eiffel.js diff --git a/www/code/codemirror-5.13.2/mode/eiffel/index.html b/www/code/CodeMirror-5.16.0/mode/eiffel/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/eiffel/index.html rename to www/code/CodeMirror-5.16.0/mode/eiffel/index.html diff --git a/www/code/codemirror-5.13.2/mode/elm/elm.js b/www/code/CodeMirror-5.16.0/mode/elm/elm.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/elm/elm.js rename to www/code/CodeMirror-5.16.0/mode/elm/elm.js diff --git a/www/code/codemirror-5.13.2/mode/elm/index.html b/www/code/CodeMirror-5.16.0/mode/elm/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/elm/index.html rename to www/code/CodeMirror-5.16.0/mode/elm/index.html diff --git a/www/code/codemirror-5.13.2/mode/erlang/erlang.js b/www/code/CodeMirror-5.16.0/mode/erlang/erlang.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/erlang/erlang.js rename to www/code/CodeMirror-5.16.0/mode/erlang/erlang.js diff --git a/www/code/codemirror-5.13.2/mode/erlang/index.html b/www/code/CodeMirror-5.16.0/mode/erlang/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/erlang/index.html rename to www/code/CodeMirror-5.16.0/mode/erlang/index.html diff --git a/www/code/codemirror-5.13.2/mode/factor/factor.js b/www/code/CodeMirror-5.16.0/mode/factor/factor.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/factor/factor.js rename to www/code/CodeMirror-5.16.0/mode/factor/factor.js diff --git a/www/code/codemirror-5.13.2/mode/factor/index.html b/www/code/CodeMirror-5.16.0/mode/factor/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/factor/index.html rename to www/code/CodeMirror-5.16.0/mode/factor/index.html diff --git a/www/code/codemirror-5.13.2/mode/fcl/fcl.js b/www/code/CodeMirror-5.16.0/mode/fcl/fcl.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/fcl/fcl.js rename to www/code/CodeMirror-5.16.0/mode/fcl/fcl.js diff --git a/www/code/codemirror-5.13.2/mode/fcl/index.html b/www/code/CodeMirror-5.16.0/mode/fcl/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/fcl/index.html rename to www/code/CodeMirror-5.16.0/mode/fcl/index.html diff --git a/www/code/codemirror-5.13.2/mode/forth/forth.js b/www/code/CodeMirror-5.16.0/mode/forth/forth.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/forth/forth.js rename to www/code/CodeMirror-5.16.0/mode/forth/forth.js diff --git a/www/code/codemirror-5.13.2/mode/forth/index.html b/www/code/CodeMirror-5.16.0/mode/forth/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/forth/index.html rename to www/code/CodeMirror-5.16.0/mode/forth/index.html diff --git a/www/code/codemirror-5.13.2/mode/fortran/fortran.js b/www/code/CodeMirror-5.16.0/mode/fortran/fortran.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/fortran/fortran.js rename to www/code/CodeMirror-5.16.0/mode/fortran/fortran.js diff --git a/www/code/codemirror-5.13.2/mode/fortran/index.html b/www/code/CodeMirror-5.16.0/mode/fortran/index.html similarity index 97% rename from www/code/codemirror-5.13.2/mode/fortran/index.html rename to www/code/CodeMirror-5.16.0/mode/fortran/index.html index 102e8f826..9aed0efcc 100644 --- a/www/code/codemirror-5.13.2/mode/fortran/index.html +++ b/www/code/CodeMirror-5.16.0/mode/fortran/index.html @@ -77,5 +77,5 @@ }); -

MIME types defined: text/x-Fortran.

+

MIME types defined: text/x-fortran.

diff --git a/www/code/codemirror-5.13.2/mode/gas/gas.js b/www/code/CodeMirror-5.16.0/mode/gas/gas.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/gas/gas.js rename to www/code/CodeMirror-5.16.0/mode/gas/gas.js diff --git a/www/code/codemirror-5.13.2/mode/gas/index.html b/www/code/CodeMirror-5.16.0/mode/gas/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/gas/index.html rename to www/code/CodeMirror-5.16.0/mode/gas/index.html diff --git a/www/code/codemirror-5.13.2/mode/gfm/gfm.js b/www/code/CodeMirror-5.16.0/mode/gfm/gfm.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/gfm/gfm.js rename to www/code/CodeMirror-5.16.0/mode/gfm/gfm.js diff --git a/www/code/codemirror-5.13.2/mode/gfm/index.html b/www/code/CodeMirror-5.16.0/mode/gfm/index.html similarity index 98% rename from www/code/codemirror-5.13.2/mode/gfm/index.html rename to www/code/CodeMirror-5.16.0/mode/gfm/index.html index 7e38c52d6..24c90c068 100644 --- a/www/code/codemirror-5.13.2/mode/gfm/index.html +++ b/www/code/CodeMirror-5.16.0/mode/gfm/index.html @@ -47,7 +47,7 @@ Underscores_are_allowed_between_words. GFM adds syntax to strikethrough text, which is missing from standard Markdown. ~~Mistaken text.~~ -~~**works with other fomatting**~~ +~~**works with other formatting**~~ ~~spans across lines~~ diff --git a/www/code/codemirror-5.13.2/mode/gfm/test.js b/www/code/CodeMirror-5.16.0/mode/gfm/test.js similarity index 97% rename from www/code/codemirror-5.13.2/mode/gfm/test.js rename to www/code/CodeMirror-5.16.0/mode/gfm/test.js index 0dcd3619a..7a1a4ccf2 100644 --- a/www/code/codemirror-5.13.2/mode/gfm/test.js +++ b/www/code/CodeMirror-5.16.0/mode/gfm/test.js @@ -51,6 +51,12 @@ "[comment ```]", "bar"); + MT("fencedCodeBlockModeSwitchingObjc", + "[comment ```objective-c]", + "[keyword @property] [variable NSString] [operator *] [variable foo];", + "[comment ```]", + "bar"); + MT("fencedCodeBlocksNoTildes", "~~~", "foo", diff --git a/www/code/codemirror-5.13.2/mode/gherkin/gherkin.js b/www/code/CodeMirror-5.16.0/mode/gherkin/gherkin.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/gherkin/gherkin.js rename to www/code/CodeMirror-5.16.0/mode/gherkin/gherkin.js diff --git a/www/code/codemirror-5.13.2/mode/gherkin/index.html b/www/code/CodeMirror-5.16.0/mode/gherkin/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/gherkin/index.html rename to www/code/CodeMirror-5.16.0/mode/gherkin/index.html diff --git a/www/code/codemirror-5.13.2/mode/go/go.js b/www/code/CodeMirror-5.16.0/mode/go/go.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/go/go.js rename to www/code/CodeMirror-5.16.0/mode/go/go.js index 21fe9a2d6..3c9ef6b98 100644 --- a/www/code/codemirror-5.13.2/mode/go/go.js +++ b/www/code/CodeMirror-5.16.0/mode/go/go.js @@ -23,7 +23,7 @@ CodeMirror.defineMode("go", function(config) { "bool":true, "byte":true, "complex64":true, "complex128":true, "float32":true, "float64":true, "int8":true, "int16":true, "int32":true, "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true, - "uint64":true, "int":true, "uint":true, "uintptr":true + "uint64":true, "int":true, "uint":true, "uintptr":true, "error": true }; var atoms = { diff --git a/www/code/codemirror-5.13.2/mode/go/index.html b/www/code/CodeMirror-5.16.0/mode/go/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/go/index.html rename to www/code/CodeMirror-5.16.0/mode/go/index.html diff --git a/www/code/codemirror-5.13.2/mode/groovy/groovy.js b/www/code/CodeMirror-5.16.0/mode/groovy/groovy.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/groovy/groovy.js rename to www/code/CodeMirror-5.16.0/mode/groovy/groovy.js diff --git a/www/code/codemirror-5.13.2/mode/groovy/index.html b/www/code/CodeMirror-5.16.0/mode/groovy/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/groovy/index.html rename to www/code/CodeMirror-5.16.0/mode/groovy/index.html diff --git a/www/code/codemirror-5.13.2/mode/haml/haml.js b/www/code/CodeMirror-5.16.0/mode/haml/haml.js similarity index 96% rename from www/code/codemirror-5.13.2/mode/haml/haml.js rename to www/code/CodeMirror-5.16.0/mode/haml/haml.js index 03ce83355..20ae1e19c 100644 --- a/www/code/codemirror-5.13.2/mode/haml/haml.js +++ b/www/code/CodeMirror-5.16.0/mode/haml/haml.js @@ -11,7 +11,7 @@ })(function(CodeMirror) { "use strict"; - // full haml mode. This handled embeded ruby and html fragments too + // full haml mode. This handled embedded ruby and html fragments too CodeMirror.defineMode("haml", function(config) { var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); var rubyMode = CodeMirror.getMode(config, "ruby"); @@ -98,8 +98,8 @@ return { // default to html mode startState: function() { - var htmlState = htmlMode.startState(); - var rubyState = rubyMode.startState(); + var htmlState = CodeMirror.startState(htmlMode); + var rubyState = CodeMirror.startState(rubyMode); return { htmlState: htmlState, rubyState: rubyState, diff --git a/www/code/codemirror-5.13.2/mode/haml/index.html b/www/code/CodeMirror-5.16.0/mode/haml/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/haml/index.html rename to www/code/CodeMirror-5.16.0/mode/haml/index.html diff --git a/www/code/codemirror-5.13.2/mode/haml/test.js b/www/code/CodeMirror-5.16.0/mode/haml/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/haml/test.js rename to www/code/CodeMirror-5.16.0/mode/haml/test.js diff --git a/www/code/codemirror-5.13.2/mode/handlebars/handlebars.js b/www/code/CodeMirror-5.16.0/mode/handlebars/handlebars.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/handlebars/handlebars.js rename to www/code/CodeMirror-5.16.0/mode/handlebars/handlebars.js diff --git a/www/code/codemirror-5.13.2/mode/handlebars/index.html b/www/code/CodeMirror-5.16.0/mode/handlebars/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/handlebars/index.html rename to www/code/CodeMirror-5.16.0/mode/handlebars/index.html diff --git a/www/code/codemirror-5.13.2/mode/haskell-literate/haskell-literate.js b/www/code/CodeMirror-5.16.0/mode/haskell-literate/haskell-literate.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/haskell-literate/haskell-literate.js rename to www/code/CodeMirror-5.16.0/mode/haskell-literate/haskell-literate.js diff --git a/www/code/codemirror-5.13.2/mode/haskell-literate/index.html b/www/code/CodeMirror-5.16.0/mode/haskell-literate/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/haskell-literate/index.html rename to www/code/CodeMirror-5.16.0/mode/haskell-literate/index.html diff --git a/www/code/codemirror-5.13.2/mode/haskell/haskell.js b/www/code/CodeMirror-5.16.0/mode/haskell/haskell.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/haskell/haskell.js rename to www/code/CodeMirror-5.16.0/mode/haskell/haskell.js diff --git a/www/code/codemirror-5.13.2/mode/haskell/index.html b/www/code/CodeMirror-5.16.0/mode/haskell/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/haskell/index.html rename to www/code/CodeMirror-5.16.0/mode/haskell/index.html diff --git a/www/code/codemirror-5.13.2/mode/haxe/haxe.js b/www/code/CodeMirror-5.16.0/mode/haxe/haxe.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/haxe/haxe.js rename to www/code/CodeMirror-5.16.0/mode/haxe/haxe.js diff --git a/www/code/codemirror-5.13.2/mode/haxe/index.html b/www/code/CodeMirror-5.16.0/mode/haxe/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/haxe/index.html rename to www/code/CodeMirror-5.16.0/mode/haxe/index.html diff --git a/www/code/codemirror-5.13.2/mode/htmlembedded/htmlembedded.js b/www/code/CodeMirror-5.16.0/mode/htmlembedded/htmlembedded.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/htmlembedded/htmlembedded.js rename to www/code/CodeMirror-5.16.0/mode/htmlembedded/htmlembedded.js diff --git a/www/code/codemirror-5.13.2/mode/htmlembedded/index.html b/www/code/CodeMirror-5.16.0/mode/htmlembedded/index.html similarity index 87% rename from www/code/codemirror-5.13.2/mode/htmlembedded/index.html rename to www/code/CodeMirror-5.16.0/mode/htmlembedded/index.html index 365ef8f36..9ed33cffe 100644 --- a/www/code/codemirror-5.13.2/mode/htmlembedded/index.html +++ b/www/code/CodeMirror-5.16.0/mode/htmlembedded/index.html @@ -51,9 +51,10 @@ This is an example of EJS (embedded javascript) }); -

Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on - JavaScript, CSS and XML.
Other dependancies include those of the scriping language chosen.

+

Mode for html embedded scripts like JSP and ASP.NET. Depends on multiplex and HtmlMixed which in turn depends on + JavaScript, CSS and XML.
Other dependencies include those of the scripting language chosen.

-

MIME types defined: application/x-aspx (ASP.NET), - application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

+

MIME types defined: application/x-aspx (ASP.NET), + application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages) + and application/x-erb

diff --git a/www/code/codemirror-5.13.2/mode/htmlmixed/htmlmixed.js b/www/code/CodeMirror-5.16.0/mode/htmlmixed/htmlmixed.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/htmlmixed/htmlmixed.js rename to www/code/CodeMirror-5.16.0/mode/htmlmixed/htmlmixed.js index 6574fbd56..d74083ee1 100644 --- a/www/code/codemirror-5.13.2/mode/htmlmixed/htmlmixed.js +++ b/www/code/CodeMirror-5.16.0/mode/htmlmixed/htmlmixed.js @@ -115,7 +115,7 @@ return { startState: function () { - var state = htmlMode.startState(); + var state = CodeMirror.startState(htmlMode); return {token: html, inTag: null, localMode: null, localState: null, htmlState: state}; }, diff --git a/www/code/codemirror-5.13.2/mode/htmlmixed/index.html b/www/code/CodeMirror-5.16.0/mode/htmlmixed/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/htmlmixed/index.html rename to www/code/CodeMirror-5.16.0/mode/htmlmixed/index.html diff --git a/www/code/codemirror-5.13.2/mode/http/http.js b/www/code/CodeMirror-5.16.0/mode/http/http.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/http/http.js rename to www/code/CodeMirror-5.16.0/mode/http/http.js diff --git a/www/code/codemirror-5.13.2/mode/http/index.html b/www/code/CodeMirror-5.16.0/mode/http/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/http/index.html rename to www/code/CodeMirror-5.16.0/mode/http/index.html diff --git a/www/code/codemirror-5.13.2/mode/idl/idl.js b/www/code/CodeMirror-5.16.0/mode/idl/idl.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/idl/idl.js rename to www/code/CodeMirror-5.16.0/mode/idl/idl.js diff --git a/www/code/codemirror-5.13.2/mode/idl/index.html b/www/code/CodeMirror-5.16.0/mode/idl/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/idl/index.html rename to www/code/CodeMirror-5.16.0/mode/idl/index.html diff --git a/www/code/codemirror-5.13.2/mode/index.html b/www/code/CodeMirror-5.16.0/mode/index.html similarity index 96% rename from www/code/codemirror-5.13.2/mode/index.html rename to www/code/CodeMirror-5.16.0/mode/index.html index 5e77655bf..732e0e52c 100644 --- a/www/code/codemirror-5.13.2/mode/index.html +++ b/www/code/CodeMirror-5.16.0/mode/index.html @@ -86,6 +86,7 @@ option.

  • Lua
  • Markdown (GitHub-flavour)
  • Mathematica
  • +
  • mbox
  • mIRC
  • Modelica
  • MscGen
  • @@ -103,6 +104,7 @@ option.

  • PGP (ASCII armor)
  • PHP
  • Pig Latin
  • +
  • PowerShell
  • Properties files
  • ProtoBuf
  • Puppet
  • @@ -113,6 +115,7 @@ option.

  • reStructuredText
  • Ruby
  • Rust
  • +
  • SAS
  • Sass
  • Spreadsheet
  • Scala
  • @@ -148,8 +151,10 @@ option.

  • Verilog/SystemVerilog
  • VHDL
  • Vue.js app
  • +
  • Web IDL
  • XML/HTML
  • XQuery
  • +
  • Yacas
  • YAML
  • YAML frontmatter
  • Z80
  • diff --git a/www/code/codemirror-5.13.2/mode/jade/index.html b/www/code/CodeMirror-5.16.0/mode/jade/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/jade/index.html rename to www/code/CodeMirror-5.16.0/mode/jade/index.html diff --git a/www/code/codemirror-5.13.2/mode/jade/jade.js b/www/code/CodeMirror-5.16.0/mode/jade/jade.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/jade/jade.js rename to www/code/CodeMirror-5.16.0/mode/jade/jade.js index 1db069a90..51ed105ac 100644 --- a/www/code/codemirror-5.13.2/mode/jade/jade.js +++ b/www/code/CodeMirror-5.16.0/mode/jade/jade.js @@ -36,7 +36,7 @@ CodeMirror.defineMode('jade', function (config) { this.isInterpolating = false; this.interpolationNesting = 0; - this.jsState = jsMode.startState(); + this.jsState = CodeMirror.startState(jsMode); this.restOfLine = ''; @@ -386,7 +386,7 @@ CodeMirror.defineMode('jade', function (config) { if (state.inAttributeName && stream.match(/^[^=,\)!]+/)) { if (stream.peek() === '=' || stream.peek() === '!') { state.inAttributeName = false; - state.jsState = jsMode.startState(); + state.jsState = CodeMirror.startState(jsMode); if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') { state.attributeIsType = true; } else { @@ -492,7 +492,7 @@ CodeMirror.defineMode('jade', function (config) { if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) { if (state.innerMode) { if (!state.innerState) { - state.innerState = state.innerMode.startState ? state.innerMode.startState(stream.indentation()) : {}; + state.innerState = state.innerMode.startState ? CodeMirror.startState(state.innerMode, stream.indentation()) : {}; } return stream.hideFirstChars(state.indentOf + 2, function () { return state.innerMode.token(stream, state.innerState) || true; diff --git a/www/code/codemirror-5.13.2/mode/javascript/index.html b/www/code/CodeMirror-5.16.0/mode/javascript/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/javascript/index.html rename to www/code/CodeMirror-5.16.0/mode/javascript/index.html diff --git a/www/code/codemirror-5.13.2/mode/javascript/javascript.js b/www/code/CodeMirror-5.16.0/mode/javascript/javascript.js similarity index 97% rename from www/code/codemirror-5.13.2/mode/javascript/javascript.js rename to www/code/CodeMirror-5.16.0/mode/javascript/javascript.js index fa5721d5d..ca875411a 100644 --- a/www/code/codemirror-5.13.2/mode/javascript/javascript.js +++ b/www/code/CodeMirror-5.16.0/mode/javascript/javascript.js @@ -42,7 +42,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { "in": operator, "typeof": operator, "instanceof": operator, "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, "this": kw("this"), "class": kw("class"), "super": kw("atom"), - "yield": C, "export": kw("export"), "import": kw("import"), "extends": C + "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, + "await": C, "async": kw("async") }; // Extend the 'normal' keywords with the TypeScript language extensions @@ -366,6 +367,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "export") return cont(pushlex("stat"), afterExport, poplex); if (type == "import") return cont(pushlex("stat"), afterImport, poplex); if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex) + if (type == "async") return cont(statement) return pass(pushlex("stat"), expression, expect(";"), poplex); } function expression(type) { @@ -488,17 +490,17 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "(") return pass(functiondef); } function commasep(what, end) { - function proceed(type) { + function proceed(type, value) { if (type == ",") { var lex = cx.state.lexical; if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; return cont(what, proceed); } - if (type == end) return cont(); + if (type == end || value == end) return cont(); return cont(expect(end)); } - return function(type) { - if (type == end) return cont(); + return function(type, value) { + if (type == end || value == end) return cont(); return pass(what, proceed); }; } @@ -512,13 +514,17 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { return pass(statement, block); } function maybetype(type) { - if (isTS && type == ":") return cont(typedef); + if (isTS && type == ":") return cont(typeexpr); } function maybedefault(_, value) { if (value == "=") return cont(expressionNoComma); } - function typedef(type) { - if (type == "variable") {cx.marked = "variable-3"; return cont();} + function typeexpr(type) { + if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);} + } + function afterType(type, value) { + if (value == "<") return cont(commasep(typeexpr, ">"), afterType) + if (type == "[") return cont(expect("]"), afterType) } function vardef() { return pass(pattern, maybetype, maybeAssign, vardefCont); @@ -573,7 +579,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { function functiondef(type, value) { if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} if (type == "variable") {register(value); return cont(functiondef);} - if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext); + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext); } function funarg(type) { if (type == "spread") return cont(funarg); diff --git a/www/code/codemirror-5.13.2/mode/javascript/json-ld.html b/www/code/CodeMirror-5.16.0/mode/javascript/json-ld.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/javascript/json-ld.html rename to www/code/CodeMirror-5.16.0/mode/javascript/json-ld.html diff --git a/www/code/codemirror-5.13.2/mode/javascript/test.js b/www/code/CodeMirror-5.16.0/mode/javascript/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/javascript/test.js rename to www/code/CodeMirror-5.16.0/mode/javascript/test.js diff --git a/www/code/codemirror-5.13.2/mode/javascript/typescript.html b/www/code/CodeMirror-5.16.0/mode/javascript/typescript.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/javascript/typescript.html rename to www/code/CodeMirror-5.16.0/mode/javascript/typescript.html diff --git a/www/code/codemirror-5.13.2/mode/jinja2/index.html b/www/code/CodeMirror-5.16.0/mode/jinja2/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/jinja2/index.html rename to www/code/CodeMirror-5.16.0/mode/jinja2/index.html diff --git a/www/code/codemirror-5.13.2/mode/jinja2/jinja2.js b/www/code/CodeMirror-5.16.0/mode/jinja2/jinja2.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/jinja2/jinja2.js rename to www/code/CodeMirror-5.16.0/mode/jinja2/jinja2.js diff --git a/www/code/codemirror-5.13.2/mode/jsx/index.html b/www/code/CodeMirror-5.16.0/mode/jsx/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/jsx/index.html rename to www/code/CodeMirror-5.16.0/mode/jsx/index.html diff --git a/www/code/codemirror-5.13.2/mode/jsx/jsx.js b/www/code/CodeMirror-5.16.0/mode/jsx/jsx.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/jsx/jsx.js rename to www/code/CodeMirror-5.16.0/mode/jsx/jsx.js diff --git a/www/code/codemirror-5.13.2/mode/jsx/test.js b/www/code/CodeMirror-5.16.0/mode/jsx/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/jsx/test.js rename to www/code/CodeMirror-5.16.0/mode/jsx/test.js diff --git a/www/code/codemirror-5.13.2/mode/julia/index.html b/www/code/CodeMirror-5.16.0/mode/julia/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/julia/index.html rename to www/code/CodeMirror-5.16.0/mode/julia/index.html diff --git a/www/code/codemirror-5.13.2/mode/julia/julia.js b/www/code/CodeMirror-5.16.0/mode/julia/julia.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/julia/julia.js rename to www/code/CodeMirror-5.16.0/mode/julia/julia.js diff --git a/www/code/codemirror-5.13.2/mode/livescript/index.html b/www/code/CodeMirror-5.16.0/mode/livescript/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/livescript/index.html rename to www/code/CodeMirror-5.16.0/mode/livescript/index.html diff --git a/www/code/codemirror-5.13.2/mode/livescript/livescript.js b/www/code/CodeMirror-5.16.0/mode/livescript/livescript.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/livescript/livescript.js rename to www/code/CodeMirror-5.16.0/mode/livescript/livescript.js diff --git a/www/code/codemirror-5.13.2/mode/lua/index.html b/www/code/CodeMirror-5.16.0/mode/lua/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/lua/index.html rename to www/code/CodeMirror-5.16.0/mode/lua/index.html diff --git a/www/code/codemirror-5.13.2/mode/lua/lua.js b/www/code/CodeMirror-5.16.0/mode/lua/lua.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/lua/lua.js rename to www/code/CodeMirror-5.16.0/mode/lua/lua.js diff --git a/www/code/codemirror-5.13.2/mode/markdown/index.html b/www/code/CodeMirror-5.16.0/mode/markdown/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/markdown/index.html rename to www/code/CodeMirror-5.16.0/mode/markdown/index.html diff --git a/www/code/codemirror-5.13.2/mode/markdown/markdown.js b/www/code/CodeMirror-5.16.0/mode/markdown/markdown.js similarity index 96% rename from www/code/codemirror-5.13.2/mode/markdown/markdown.js rename to www/code/CodeMirror-5.16.0/mode/markdown/markdown.js index a6942b39c..37329c238 100644 --- a/www/code/codemirror-5.13.2/mode/markdown/markdown.js +++ b/www/code/CodeMirror-5.16.0/mode/markdown/markdown.js @@ -88,7 +88,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { , setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/ , textRE = /^[^#!\[\]*_\\<>` "'(~]+/ , fencedCodeRE = new RegExp("^(" + (modeCfg.fencedCodeBlocks === true ? "~~~+|```+" : modeCfg.fencedCodeBlocks) + - ")[ \\t]*([\\w+#]*)"); + ")[ \\t]*([\\w+#\-]*)"); function switchInline(stream, state, f) { state.f = state.inline = f; @@ -218,7 +218,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { state.fencedChars = match[1] // try switching mode state.localMode = getMode(match[2]); - if (state.localMode) state.localState = state.localMode.startState(); + if (state.localMode) state.localState = CodeMirror.startState(state.localMode); state.f = state.block = local; if (modeCfg.highlightFormatting) state.formatting = "code-block"; state.code = -1 @@ -437,13 +437,13 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return tokenTypes.image; } - if (ch === '[' && stream.match(/.*\](\(.*\)| ?\[.*\])/, false)) { + if (ch === '[' && stream.match(/[^\]]*\](\(.*\)| ?\[.*?\])/, false)) { state.linkText = true; if (modeCfg.highlightFormatting) state.formatting = "link"; return getType(state); } - if (ch === ']' && state.linkText && stream.match(/\(.*\)| ?\[.*\]/, false)) { + if (ch === ']' && state.linkText && stream.match(/\(.*?\)| ?\[.*?\]/, false)) { if (modeCfg.highlightFormatting) state.formatting = "link"; var type = getType(state); state.linkText = false; @@ -596,7 +596,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { } var ch = stream.next(); if (ch === '(' || ch === '[') { - state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]"); + state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]", 0); if (modeCfg.highlightFormatting) state.formatting = "link-string"; state.linkHref = true; return getType(state); @@ -604,6 +604,11 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return 'error'; } + var linkRE = { + ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/, + "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/ + } + function getLinkHrefInside(endChar) { return function(stream, state) { var ch = stream.next(); @@ -616,10 +621,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return returnState; } - if (stream.match(inlineRE(endChar), true)) { - stream.backUp(1); - } - + stream.match(linkRE[endChar]) state.linkHref = true; return getType(state); }; @@ -667,18 +669,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return tokenTypes.linkHref + " url"; } - var savedInlineRE = []; - function inlineRE(endChar) { - if (!savedInlineRE[endChar]) { - // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741) - endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); - // Match any non-endChar, escaped character, as well as the closing - // endChar. - savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')'); - } - return savedInlineRE[endChar]; - } - var mode = { startState: function() { return { diff --git a/www/code/codemirror-5.13.2/mode/markdown/test.js b/www/code/CodeMirror-5.16.0/mode/markdown/test.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/markdown/test.js rename to www/code/CodeMirror-5.16.0/mode/markdown/test.js index a48d15310..e76eae902 100644 --- a/www/code/codemirror-5.13.2/mode/markdown/test.js +++ b/www/code/CodeMirror-5.16.0/mode/markdown/test.js @@ -647,7 +647,7 @@ MT("linkReferenceEmStrong", "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url [[bar]]] hello"); - // Reference-style links with optional space separator (per docuentation) + // Reference-style links with optional space separator (per documentation) // "You can optionally use a space to separate the sets of brackets" MT("linkReferenceSpace", "[link [[foo]]] [string&url [[bar]]] hello"); @@ -683,7 +683,7 @@ MT("labelTitleSingleQuotes", "[link [[foo]]:] [string&url http://example.com/ 'bar']"); - MT("labelTitleParenthese", + MT("labelTitleParentheses", "[link [[foo]]:] [string&url http://example.com/ (bar)]"); MT("labelTitleInvalid", @@ -700,7 +700,7 @@ "[link [[foo]]:] [string&url http://example.com/]", "[string 'bar'] hello"); - MT("labelTitleNextParenthese", + MT("labelTitleNextParentheses", "[link [[foo]]:] [string&url http://example.com/]", "[string (bar)] hello"); @@ -782,6 +782,9 @@ MT("emStrongMixed", "[em *foo][em&strong __bar_hello** world]"); + MT("linkWithNestedParens", + "[link [[foo]]][string&url (bar(baz))]") + // These characters should be escaped: // \ backslash // ` backtick diff --git a/www/code/codemirror-5.13.2/mode/mathematica/index.html b/www/code/CodeMirror-5.16.0/mode/mathematica/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/mathematica/index.html rename to www/code/CodeMirror-5.16.0/mode/mathematica/index.html diff --git a/www/code/codemirror-5.13.2/mode/mathematica/mathematica.js b/www/code/CodeMirror-5.16.0/mode/mathematica/mathematica.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/mathematica/mathematica.js rename to www/code/CodeMirror-5.16.0/mode/mathematica/mathematica.js index 5ae6f55cb..d6977088c 100644 --- a/www/code/codemirror-5.13.2/mode/mathematica/mathematica.js +++ b/www/code/CodeMirror-5.16.0/mode/mathematica/mathematica.js @@ -126,6 +126,7 @@ CodeMirror.defineMode('mathematica', function(_config, _parserConfig) { } // everything else is an error + stream.next(); // advance the stream. return 'error'; } diff --git a/www/code/CodeMirror-5.16.0/mode/mbox/index.html b/www/code/CodeMirror-5.16.0/mode/mbox/index.html new file mode 100644 index 000000000..248ea98e1 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/mbox/index.html @@ -0,0 +1,44 @@ + + +CodeMirror: mbox mode + + + + + + + + + +
    +

    mbox mode

    +
    + + +

    MIME types defined: application/mbox.

    + +
    diff --git a/www/code/CodeMirror-5.16.0/mode/mbox/mbox.js b/www/code/CodeMirror-5.16.0/mode/mbox/mbox.js new file mode 100644 index 000000000..ba2416ac8 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/mbox/mbox.js @@ -0,0 +1,129 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +var rfc2822 = [ + "From", "Sender", "Reply-To", "To", "Cc", "Bcc", "Message-ID", + "In-Reply-To", "References", "Resent-From", "Resent-Sender", "Resent-To", + "Resent-Cc", "Resent-Bcc", "Resent-Message-ID", "Return-Path", "Received" +]; +var rfc2822NoEmail = [ + "Date", "Subject", "Comments", "Keywords", "Resent-Date" +]; + +CodeMirror.registerHelper("hintWords", "mbox", rfc2822.concat(rfc2822NoEmail)); + +var whitespace = /^[ \t]/; +var separator = /^From /; // See RFC 4155 +var rfc2822Header = new RegExp("^(" + rfc2822.join("|") + "): "); +var rfc2822HeaderNoEmail = new RegExp("^(" + rfc2822NoEmail.join("|") + "): "); +var header = /^[^:]+:/; // Optional fields defined in RFC 2822 +var email = /^[^ ]+@[^ ]+/; +var untilEmail = /^.*?(?=[^ ]+?@[^ ]+)/; +var bracketedEmail = /^<.*?>/; +var untilBracketedEmail = /^.*?(?=<.*>)/; + +function styleForHeader(header) { + if (header === "Subject") return "header"; + return "string"; +} + +function readToken(stream, state) { + if (stream.sol()) { + // From last line + state.inSeparator = false; + if (state.inHeader && stream.match(whitespace)) { + // Header folding + return null; + } else { + state.inHeader = false; + state.header = null; + } + + if (stream.match(separator)) { + state.inHeaders = true; + state.inSeparator = true; + return "atom"; + } + + var match; + var emailPermitted = false; + if ((match = stream.match(rfc2822HeaderNoEmail)) || + (emailPermitted = true) && (match = stream.match(rfc2822Header))) { + state.inHeaders = true; + state.inHeader = true; + state.emailPermitted = emailPermitted; + state.header = match[1]; + return "atom"; + } + + // Use vim's heuristics: recognize custom headers only if the line is in a + // block of legitimate headers. + if (state.inHeaders && (match = stream.match(header))) { + state.inHeader = true; + state.emailPermitted = true; + state.header = match[1]; + return "atom"; + } + + state.inHeaders = false; + stream.skipToEnd(); + return null; + } + + if (state.inSeparator) { + if (stream.match(email)) return "link"; + if (stream.match(untilEmail)) return "atom"; + stream.skipToEnd(); + return "atom"; + } + + if (state.inHeader) { + var style = styleForHeader(state.header); + + if (state.emailPermitted) { + if (stream.match(bracketedEmail)) return style + " link"; + if (stream.match(untilBracketedEmail)) return style; + } + stream.skipToEnd(); + return style; + } + + stream.skipToEnd(); + return null; +}; + +CodeMirror.defineMode("mbox", function() { + return { + startState: function() { + return { + // Is in a mbox separator + inSeparator: false, + // Is in a mail header + inHeader: false, + // If bracketed email is permitted. Only applicable when inHeader + emailPermitted: false, + // Name of current header + header: null, + // Is in a region of mail headers + inHeaders: false + }; + }, + token: readToken, + blankLine: function(state) { + state.inHeaders = state.inSeparator = state.inHeader = false; + } + }; +}); + +CodeMirror.defineMIME("application/mbox", "mbox"); +}); diff --git a/www/code/codemirror-5.13.2/mode/meta.js b/www/code/CodeMirror-5.16.0/mode/meta.js similarity index 96% rename from www/code/codemirror-5.13.2/mode/meta.js rename to www/code/CodeMirror-5.16.0/mode/meta.js index 3cb9de21e..eb25e242d 100644 --- a/www/code/codemirror-5.13.2/mode/meta.js +++ b/www/code/CodeMirror-5.16.0/mode/meta.js @@ -87,11 +87,12 @@ {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]}, {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]}, {name: "MS SQL", mime: "text/x-mssql", mode: "sql"}, + {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]}, {name: "MySQL", mime: "text/x-mysql", mode: "sql"}, {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i}, {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]}, {name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]}, - {name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"]}, + {name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"], alias: ["objective-c", "objc"]}, {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]}, {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]}, {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]}, @@ -102,9 +103,10 @@ {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]}, {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]}, {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]}, + {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]}, {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]}, {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]}, - {name: "Python", mime: "text/x-python", mode: "python", ext: ["py", "pyw"]}, + {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/}, {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]}, {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]}, {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"], alias: ["rscript"]}, @@ -113,6 +115,7 @@ {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]}, {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]}, {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]}, + {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]}, {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]}, {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]}, {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]}, @@ -144,6 +147,7 @@ {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]}, {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]}, {name: "Twig", mime: "text/x-twig", mode: "twig"}, + {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]}, {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]}, {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]}, {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]}, @@ -151,6 +155,7 @@ {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]}, {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"], alias: ["rss", "wsdl", "xsd"]}, {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]}, + {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]}, {name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]}, {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}, {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]}, diff --git a/www/code/codemirror-5.13.2/mode/mirc/index.html b/www/code/CodeMirror-5.16.0/mode/mirc/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/mirc/index.html rename to www/code/CodeMirror-5.16.0/mode/mirc/index.html diff --git a/www/code/codemirror-5.13.2/mode/mirc/mirc.js b/www/code/CodeMirror-5.16.0/mode/mirc/mirc.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mirc/mirc.js rename to www/code/CodeMirror-5.16.0/mode/mirc/mirc.js diff --git a/www/code/codemirror-5.13.2/mode/mllike/index.html b/www/code/CodeMirror-5.16.0/mode/mllike/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/mllike/index.html rename to www/code/CodeMirror-5.16.0/mode/mllike/index.html diff --git a/www/code/codemirror-5.13.2/mode/mllike/mllike.js b/www/code/CodeMirror-5.16.0/mode/mllike/mllike.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mllike/mllike.js rename to www/code/CodeMirror-5.16.0/mode/mllike/mllike.js diff --git a/www/code/codemirror-5.13.2/mode/modelica/index.html b/www/code/CodeMirror-5.16.0/mode/modelica/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/modelica/index.html rename to www/code/CodeMirror-5.16.0/mode/modelica/index.html diff --git a/www/code/codemirror-5.13.2/mode/modelica/modelica.js b/www/code/CodeMirror-5.16.0/mode/modelica/modelica.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/modelica/modelica.js rename to www/code/CodeMirror-5.16.0/mode/modelica/modelica.js diff --git a/www/code/codemirror-5.13.2/mode/mscgen/index.html b/www/code/CodeMirror-5.16.0/mode/mscgen/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/mscgen/index.html rename to www/code/CodeMirror-5.16.0/mode/mscgen/index.html diff --git a/www/code/codemirror-5.13.2/mode/mscgen/mscgen.js b/www/code/CodeMirror-5.16.0/mode/mscgen/mscgen.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mscgen/mscgen.js rename to www/code/CodeMirror-5.16.0/mode/mscgen/mscgen.js diff --git a/www/code/codemirror-5.13.2/mode/mscgen/mscgen_test.js b/www/code/CodeMirror-5.16.0/mode/mscgen/mscgen_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mscgen/mscgen_test.js rename to www/code/CodeMirror-5.16.0/mode/mscgen/mscgen_test.js diff --git a/www/code/codemirror-5.13.2/mode/mscgen/msgenny_test.js b/www/code/CodeMirror-5.16.0/mode/mscgen/msgenny_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mscgen/msgenny_test.js rename to www/code/CodeMirror-5.16.0/mode/mscgen/msgenny_test.js diff --git a/www/code/codemirror-5.13.2/mode/mscgen/xu_test.js b/www/code/CodeMirror-5.16.0/mode/mscgen/xu_test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mscgen/xu_test.js rename to www/code/CodeMirror-5.16.0/mode/mscgen/xu_test.js diff --git a/www/code/codemirror-5.13.2/mode/mumps/index.html b/www/code/CodeMirror-5.16.0/mode/mumps/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/mumps/index.html rename to www/code/CodeMirror-5.16.0/mode/mumps/index.html diff --git a/www/code/codemirror-5.13.2/mode/mumps/mumps.js b/www/code/CodeMirror-5.16.0/mode/mumps/mumps.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/mumps/mumps.js rename to www/code/CodeMirror-5.16.0/mode/mumps/mumps.js diff --git a/www/code/codemirror-5.13.2/mode/nginx/index.html b/www/code/CodeMirror-5.16.0/mode/nginx/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/nginx/index.html rename to www/code/CodeMirror-5.16.0/mode/nginx/index.html diff --git a/www/code/codemirror-5.13.2/mode/nginx/nginx.js b/www/code/CodeMirror-5.16.0/mode/nginx/nginx.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/nginx/nginx.js rename to www/code/CodeMirror-5.16.0/mode/nginx/nginx.js diff --git a/www/code/codemirror-5.13.2/mode/nsis/index.html b/www/code/CodeMirror-5.16.0/mode/nsis/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/nsis/index.html rename to www/code/CodeMirror-5.16.0/mode/nsis/index.html diff --git a/www/code/codemirror-5.13.2/mode/nsis/nsis.js b/www/code/CodeMirror-5.16.0/mode/nsis/nsis.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/nsis/nsis.js rename to www/code/CodeMirror-5.16.0/mode/nsis/nsis.js diff --git a/www/code/codemirror-5.13.2/mode/ntriples/index.html b/www/code/CodeMirror-5.16.0/mode/ntriples/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/ntriples/index.html rename to www/code/CodeMirror-5.16.0/mode/ntriples/index.html diff --git a/www/code/codemirror-5.13.2/mode/ntriples/ntriples.js b/www/code/CodeMirror-5.16.0/mode/ntriples/ntriples.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/ntriples/ntriples.js rename to www/code/CodeMirror-5.16.0/mode/ntriples/ntriples.js diff --git a/www/code/codemirror-5.13.2/mode/octave/index.html b/www/code/CodeMirror-5.16.0/mode/octave/index.html similarity index 99% rename from www/code/codemirror-5.13.2/mode/octave/index.html rename to www/code/CodeMirror-5.16.0/mode/octave/index.html index 79df58119..3490ee637 100644 --- a/www/code/codemirror-5.13.2/mode/octave/index.html +++ b/www/code/CodeMirror-5.16.0/mode/octave/index.html @@ -65,7 +65,7 @@ global persistent %one line comment %{ multi -line commment %} +line comment %} + + + + + +
    +

    PowerShell mode

    + +
    + + +

    MIME types defined: application/x-powershell.

    +
    + + diff --git a/www/code/CodeMirror-5.16.0/mode/powershell/powershell.js b/www/code/CodeMirror-5.16.0/mode/powershell/powershell.js new file mode 100644 index 000000000..c443e7232 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/powershell/powershell.js @@ -0,0 +1,396 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function(mod) { + 'use strict'; + if (typeof exports == 'object' && typeof module == 'object') // CommonJS + mod(require('codemirror')); + else if (typeof define == 'function' && define.amd) // AMD + define(['codemirror'], mod); + else // Plain browser env + mod(window.CodeMirror); +})(function(CodeMirror) { +'use strict'; + +CodeMirror.defineMode('powershell', function() { + function buildRegexp(patterns, options) { + options = options || {}; + var prefix = options.prefix !== undefined ? options.prefix : '^'; + var suffix = options.suffix !== undefined ? options.suffix : '\\b'; + + for (var i = 0; i < patterns.length; i++) { + if (patterns[i] instanceof RegExp) { + patterns[i] = patterns[i].source; + } + else { + patterns[i] = patterns[i].replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + } + + return new RegExp(prefix + '(' + patterns.join('|') + ')' + suffix, 'i'); + } + + var notCharacterOrDash = '(?=[^A-Za-z\\d\\-_]|$)'; + var varNames = /[\w\-:]/ + var keywords = buildRegexp([ + /begin|break|catch|continue|data|default|do|dynamicparam/, + /else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/, + /param|process|return|switch|throw|trap|try|until|where|while/ + ], { suffix: notCharacterOrDash }); + + var punctuation = /[\[\]{},;`\.]|@[({]/; + var wordOperators = buildRegexp([ + 'f', + /b?not/, + /[ic]?split/, 'join', + /is(not)?/, 'as', + /[ic]?(eq|ne|[gl][te])/, + /[ic]?(not)?(like|match|contains)/, + /[ic]?replace/, + /b?(and|or|xor)/ + ], { prefix: '-' }); + var symbolOperators = /[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/; + var operators = buildRegexp([wordOperators, symbolOperators], { suffix: '' }); + + var numbers = /^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i; + + var identifiers = /^[A-Za-z\_][A-Za-z\-\_\d]*\b/; + + var symbolBuiltins = /[A-Z]:|%|\?/i; + var namedBuiltins = buildRegexp([ + /Add-(Computer|Content|History|Member|PSSnapin|Type)/, + /Checkpoint-Computer/, + /Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/, + /Compare-Object/, + /Complete-Transaction/, + /Connect-PSSession/, + /ConvertFrom-(Csv|Json|SecureString|StringData)/, + /Convert-Path/, + /ConvertTo-(Csv|Html|Json|SecureString|Xml)/, + /Copy-Item(Property)?/, + /Debug-Process/, + /Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/, + /Disconnect-PSSession/, + /Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/, + /(Enter|Exit)-PSSession/, + /Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/, + /ForEach-Object/, + /Format-(Custom|List|Table|Wide)/, + new RegExp('Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential' + + '|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job' + + '|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration' + + '|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)'), + /Group-Object/, + /Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/, + /ImportSystemModules/, + /Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/, + /Join-Path/, + /Limit-EventLog/, + /Measure-(Command|Object)/, + /Move-Item(Property)?/, + new RegExp('New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile' + + '|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)'), + /Out-(Default|File|GridView|Host|Null|Printer|String)/, + /Pause/, + /(Pop|Push)-Location/, + /Read-Host/, + /Receive-(Job|PSSession)/, + /Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/, + /Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/, + /Rename-(Computer|Item(Property)?)/, + /Reset-ComputerMachinePassword/, + /Resolve-Path/, + /Restart-(Computer|Service)/, + /Restore-Computer/, + /Resume-(Job|Service)/, + /Save-Help/, + /Select-(Object|String|Xml)/, + /Send-MailMessage/, + new RegExp('Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug' + + '|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)'), + /Show-(Command|ControlPanelItem|EventLog)/, + /Sort-Object/, + /Split-Path/, + /Start-(Job|Process|Service|Sleep|Transaction|Transcript)/, + /Stop-(Computer|Job|Process|Service|Transcript)/, + /Suspend-(Job|Service)/, + /TabExpansion2/, + /Tee-Object/, + /Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/, + /Trace-Command/, + /Unblock-File/, + /Undo-Transaction/, + /Unregister-(Event|PSSessionConfiguration)/, + /Update-(FormatData|Help|List|TypeData)/, + /Use-Transaction/, + /Wait-(Event|Job|Process)/, + /Where-Object/, + /Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/, + /cd|help|mkdir|more|oss|prompt/, + /ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/, + /echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/, + /group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/, + /measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/, + /rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/, + /sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/ + ], { prefix: '', suffix: '' }); + var variableBuiltins = buildRegexp([ + /[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/, + /FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/, + /MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/, + /PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/, + /PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/, + /WarningPreference|WhatIfPreference/, + + /Event|EventArgs|EventSubscriber|Sender/, + /Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/, + /true|false|null/ + ], { prefix: '\\$', suffix: '' }); + + var builtins = buildRegexp([symbolBuiltins, namedBuiltins, variableBuiltins], { suffix: notCharacterOrDash }); + + var grammar = { + keyword: keywords, + number: numbers, + operator: operators, + builtin: builtins, + punctuation: punctuation, + identifier: identifiers + }; + + // tokenizers + function tokenBase(stream, state) { + // Handle Comments + //var ch = stream.peek(); + + var parent = state.returnStack[state.returnStack.length - 1]; + if (parent && parent.shouldReturnFrom(state)) { + state.tokenize = parent.tokenize; + state.returnStack.pop(); + return state.tokenize(stream, state); + } + + if (stream.eatSpace()) { + return null; + } + + if (stream.eat('(')) { + state.bracketNesting += 1; + return 'punctuation'; + } + + if (stream.eat(')')) { + state.bracketNesting -= 1; + return 'punctuation'; + } + + for (var key in grammar) { + if (stream.match(grammar[key])) { + return key; + } + } + + var ch = stream.next(); + + // single-quote string + if (ch === "'") { + return tokenSingleQuoteString(stream, state); + } + + if (ch === '$') { + return tokenVariable(stream, state); + } + + // double-quote string + if (ch === '"') { + return tokenDoubleQuoteString(stream, state); + } + + if (ch === '<' && stream.eat('#')) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + + if (ch === '@') { + var quoteMatch = stream.eat(/["']/); + if (quoteMatch && stream.eol()) { + state.tokenize = tokenMultiString; + state.startQuote = quoteMatch[0]; + return tokenMultiString(stream, state); + } else if (stream.peek().match(/[({]/)) { + return 'punctuation'; + } else if (stream.peek().match(varNames)) { + // splatted variable + return tokenVariable(stream, state); + } + } + return 'error'; + } + + function tokenSingleQuoteString(stream, state) { + var ch; + while ((ch = stream.peek()) != null) { + stream.next(); + + if (ch === "'" && !stream.eat("'")) { + state.tokenize = tokenBase; + return 'string'; + } + } + + return 'error'; + } + + function tokenDoubleQuoteString(stream, state) { + var ch; + while ((ch = stream.peek()) != null) { + if (ch === '$') { + state.tokenize = tokenStringInterpolation; + return 'string'; + } + + stream.next(); + if (ch === '`') { + stream.next(); + continue; + } + + if (ch === '"' && !stream.eat('"')) { + state.tokenize = tokenBase; + return 'string'; + } + } + + return 'error'; + } + + function tokenStringInterpolation(stream, state) { + return tokenInterpolation(stream, state, tokenDoubleQuoteString); + } + + function tokenMultiStringReturn(stream, state) { + state.tokenize = tokenMultiString; + state.startQuote = '"' + return tokenMultiString(stream, state); + } + + function tokenHereStringInterpolation(stream, state) { + return tokenInterpolation(stream, state, tokenMultiStringReturn); + } + + function tokenInterpolation(stream, state, parentTokenize) { + if (stream.match('$(')) { + var savedBracketNesting = state.bracketNesting; + state.returnStack.push({ + /*jshint loopfunc:true */ + shouldReturnFrom: function(state) { + return state.bracketNesting === savedBracketNesting; + }, + tokenize: parentTokenize + }); + state.tokenize = tokenBase; + state.bracketNesting += 1; + return 'punctuation'; + } else { + stream.next(); + state.returnStack.push({ + shouldReturnFrom: function() { return true; }, + tokenize: parentTokenize + }); + state.tokenize = tokenVariable; + return state.tokenize(stream, state); + } + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == '>') { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch === '#'); + } + return 'comment'; + } + + function tokenVariable(stream, state) { + var ch = stream.peek(); + if (stream.eat('{')) { + state.tokenize = tokenVariableWithBraces; + return tokenVariableWithBraces(stream, state); + } else if (ch != undefined && ch.match(varNames)) { + stream.eatWhile(varNames); + state.tokenize = tokenBase; + return 'variable-2'; + } else { + state.tokenize = tokenBase; + return 'error'; + } + } + + function tokenVariableWithBraces(stream, state) { + var ch; + while ((ch = stream.next()) != null) { + if (ch === '}') { + state.tokenize = tokenBase; + break; + } + } + return 'variable-2'; + } + + function tokenMultiString(stream, state) { + var quote = state.startQuote; + if (stream.sol() && stream.match(new RegExp(quote + '@'))) { + state.tokenize = tokenBase; + } + else if (quote === '"') { + while (!stream.eol()) { + var ch = stream.peek(); + if (ch === '$') { + state.tokenize = tokenHereStringInterpolation; + return 'string'; + } + + stream.next(); + if (ch === '`') { + stream.next(); + } + } + } + else { + stream.skipToEnd(); + } + + return 'string'; + } + + var external = { + startState: function() { + return { + returnStack: [], + bracketNesting: 0, + tokenize: tokenBase + }; + }, + + token: function(stream, state) { + return state.tokenize(stream, state); + }, + + blockCommentStart: '<#', + blockCommentEnd: '#>', + lineComment: '#', + fold: 'brace' + }; + return external; +}); + +CodeMirror.defineMIME('application/x-powershell', 'powershell'); +}); diff --git a/www/code/CodeMirror-5.16.0/mode/powershell/test.js b/www/code/CodeMirror-5.16.0/mode/powershell/test.js new file mode 100644 index 000000000..59b8e6fca --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/powershell/test.js @@ -0,0 +1,72 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "powershell"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT('comment', '[number 1][comment # A]'); + MT('comment_multiline', '[number 1][comment <#]', + '[comment ABC]', + '[comment #>][number 2]'); + + [ + '0', '1234', + '12kb', '12mb', '12Gb', '12Tb', '12PB', '12L', '12D', '12lkb', '12dtb', + '1.234', '1.234e56', '1.', '1.e2', '.2', '.2e34', + '1.2MB', '1.kb', '.1dTB', '1.e1gb', '.2', '.2e34', + '0x1', '0xabcdef', '0x3tb', '0xelmb' + ].forEach(function(number) { + MT("number_" + number, "[number " + number + "]"); + }); + + MT('string_literal_escaping', "[string 'a''']"); + MT('string_literal_variable', "[string 'a $x']"); + MT('string_escaping_1', '[string "a `""]'); + MT('string_escaping_2', '[string "a """]'); + MT('string_variable_escaping', '[string "a `$x"]'); + MT('string_variable', '[string "a ][variable-2 $x][string b"]'); + MT('string_variable_spaces', '[string "a ][variable-2 ${x y}][string b"]'); + MT('string_expression', '[string "a ][punctuation $(][variable-2 $x][operator +][number 3][punctuation )][string b"]'); + MT('string_expression_nested', '[string "A][punctuation $(][string "a][punctuation $(][string "w"][punctuation )][string b"][punctuation )][string B"]'); + + MT('string_heredoc', '[string @"]', + '[string abc]', + '[string "@]'); + MT('string_heredoc_quotes', '[string @"]', + '[string abc "\']', + '[string "@]'); + MT('string_heredoc_variable', '[string @"]', + '[string a ][variable-2 $x][string b]', + '[string "@]'); + MT('string_heredoc_nested_string', '[string @"]', + '[string a][punctuation $(][string "w"][punctuation )][string b]', + '[string "@]'); + MT('string_heredoc_literal_quotes', "[string @']", + '[string abc "\']', + "[string '@]"); + + MT('array', "[punctuation @(][string 'a'][punctuation ,][string 'b'][punctuation )]"); + MT('hash', "[punctuation @{][string 'key'][operator :][string 'value'][punctuation }]"); + + MT('variable', "[variable-2 $test]"); + MT('variable_global', "[variable-2 $global:test]"); + MT('variable_spaces', "[variable-2 ${test test}]"); + MT('operator_splat', "[variable-2 @x]"); + MT('variable_builtin', "[builtin $ErrorActionPreference]"); + MT('variable_builtin_symbols', "[builtin $$]"); + + MT('operator', "[operator +]"); + MT('operator_unary', "[operator +][number 3]"); + MT('operator_long', "[operator -match]"); + + [ + '(', ')', '[[', ']]', '{', '}', ',', '`', ';', '.' + ].forEach(function(punctuation) { + MT("punctuation_" + punctuation.replace(/^[\[\]]/,''), "[punctuation " + punctuation + "]"); + }); + + MT('keyword', "[keyword if]"); + + MT('call_builtin', "[builtin Get-ChildItem]"); +})(); diff --git a/www/code/codemirror-5.13.2/mode/properties/index.html b/www/code/CodeMirror-5.16.0/mode/properties/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/properties/index.html rename to www/code/CodeMirror-5.16.0/mode/properties/index.html diff --git a/www/code/codemirror-5.13.2/mode/properties/properties.js b/www/code/CodeMirror-5.16.0/mode/properties/properties.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/properties/properties.js rename to www/code/CodeMirror-5.16.0/mode/properties/properties.js index 9da5baf42..ef8bf37ee 100644 --- a/www/code/codemirror-5.13.2/mode/properties/properties.js +++ b/www/code/CodeMirror-5.16.0/mode/properties/properties.js @@ -34,7 +34,7 @@ CodeMirror.defineMode("properties", function() { } if (sol) { - while(stream.eatSpace()); + while(stream.eatSpace()) {} } var ch = stream.next(); diff --git a/www/code/codemirror-5.13.2/mode/protobuf/index.html b/www/code/CodeMirror-5.16.0/mode/protobuf/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/protobuf/index.html rename to www/code/CodeMirror-5.16.0/mode/protobuf/index.html diff --git a/www/code/codemirror-5.13.2/mode/protobuf/protobuf.js b/www/code/CodeMirror-5.16.0/mode/protobuf/protobuf.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/protobuf/protobuf.js rename to www/code/CodeMirror-5.16.0/mode/protobuf/protobuf.js diff --git a/www/code/codemirror-5.13.2/mode/puppet/index.html b/www/code/CodeMirror-5.16.0/mode/puppet/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/puppet/index.html rename to www/code/CodeMirror-5.16.0/mode/puppet/index.html diff --git a/www/code/codemirror-5.13.2/mode/puppet/puppet.js b/www/code/CodeMirror-5.16.0/mode/puppet/puppet.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/puppet/puppet.js rename to www/code/CodeMirror-5.16.0/mode/puppet/puppet.js index e7f799f78..57041300a 100644 --- a/www/code/codemirror-5.13.2/mode/puppet/puppet.js +++ b/www/code/CodeMirror-5.16.0/mode/puppet/puppet.js @@ -126,7 +126,7 @@ CodeMirror.defineMode("puppet", function () { if (word && words.hasOwnProperty(word)) { // Negates the initial next() stream.backUp(1); - // Acutally move the stream + // rs move the stream stream.match(/[\w]+/); // We want to process these words differently // do to the importance they have in Puppet diff --git a/www/code/codemirror-5.13.2/mode/python/index.html b/www/code/CodeMirror-5.16.0/mode/python/index.html similarity index 98% rename from www/code/codemirror-5.13.2/mode/python/index.html rename to www/code/CodeMirror-5.16.0/mode/python/index.html index 86eb3d52f..6116a13b6 100644 --- a/www/code/codemirror-5.13.2/mode/python/index.html +++ b/www/code/CodeMirror-5.16.0/mode/python/index.html @@ -186,7 +186,7 @@ def pairwise_cython(double[:, ::1] X):
  • singleOperators - RegEx - Regular Expression for single operator matching, default :
    ^[\\+\\-\\*/%&|\\^~<>!]
    including
    @
    on Python 3
  • singleDelimiters - RegEx - Regular Expression for single delimiter matching, default :
    ^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]
  • doubleOperators - RegEx - Regular Expression for double operators matching, default :
    ^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))
  • -
  • doubleDelimiters - RegEx - Regular Expressoin for double delimiters matching, default :
    ^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))
  • +
  • doubleDelimiters - RegEx - Regular Expression for double delimiters matching, default :
    ^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))
  • tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default :
    ^((//=)|(>>=)|(<<=)|(\\*\\*=))
  • identifiers - RegEx - Regular Expression for identifier, default :
    ^[_A-Za-z][_A-Za-z0-9]*
    on Python 2 and
    ^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*
    on Python 3.
  • extra_keywords - list of string - List of extra words ton consider as keywords
  • diff --git a/www/code/codemirror-5.13.2/mode/python/python.js b/www/code/CodeMirror-5.16.0/mode/python/python.js similarity index 87% rename from www/code/codemirror-5.13.2/mode/python/python.js rename to www/code/CodeMirror-5.16.0/mode/python/python.js index 196b026c6..ec662b1a9 100644 --- a/www/code/codemirror-5.13.2/mode/python/python.js +++ b/www/code/CodeMirror-5.16.0/mode/python/python.js @@ -32,13 +32,6 @@ "sorted", "staticmethod", "str", "sum", "super", "tuple", "type", "vars", "zip", "__import__", "NotImplemented", "Ellipsis", "__debug__"]; - var py2 = {builtins: ["apply", "basestring", "buffer", "cmp", "coerce", "execfile", - "file", "intern", "long", "raw_input", "reduce", "reload", - "unichr", "unicode", "xrange", "False", "True", "None"], - keywords: ["exec", "print"]}; - var py3 = {builtins: ["ascii", "bytes", "exec", "print"], - keywords: ["nonlocal", "False", "True", "None", "async", "await"]}; - CodeMirror.registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins)); function top(state) { @@ -53,15 +46,6 @@ var doubleDelimiters = parserConf.doubleDelimiters || /^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/; var tripleDelimiters = parserConf.tripleDelimiters || /^(\/\/=|>>=|<<=|\*\*=)/; - if (parserConf.version && parseInt(parserConf.version, 10) == 3) { - // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator - var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!@]/; - var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/; - } else { - var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!]/; - var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/; - } - var hangingIndent = parserConf.hangingIndent || conf.indentUnit; var myKeywords = commonKeywords, myBuiltins = commonBuiltins; @@ -71,13 +55,21 @@ if (parserConf.extra_builtins != undefined) myBuiltins = myBuiltins.concat(parserConf.extra_builtins); - if (parserConf.version && parseInt(parserConf.version, 10) == 3) { - myKeywords = myKeywords.concat(py3.keywords); - myBuiltins = myBuiltins.concat(py3.builtins); - var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); + var py3 = parserConf.version && parseInt(parserConf.version, 10) == 3 + if (py3) { + // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator + var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!@]/; + var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/; + myKeywords = myKeywords.concat(["nonlocal", "False", "True", "None", "async", "await"]); + myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]); + var stringPrefixes = new RegExp("^(([rbuf]|(br))?('{3}|\"{3}|['\"]))", "i"); } else { - myKeywords = myKeywords.concat(py2.keywords); - myBuiltins = myBuiltins.concat(py2.builtins); + var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!]/; + var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/; + myKeywords = myKeywords.concat(["exec", "print"]); + myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile", + "file", "intern", "long", "raw_input", "reduce", "reload", + "unichr", "unicode", "xrange", "False", "True", "None"]); var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); } var keywords = wordRegexp(myKeywords); @@ -249,16 +241,16 @@ } function tokenLexer(stream, state) { + if (stream.sol()) state.beginningOfLine = true; + var style = state.tokenize(stream, state); var current = stream.current(); // Handle decorators - if (current == "@") { - if (parserConf.version && parseInt(parserConf.version, 10) == 3) - return stream.match(identifiers, false) ? "meta" : "operator"; - else - return stream.match(identifiers, false) ? "meta" : ERRORCLASS; - } + if (state.beginningOfLine && current == "@") + return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS; + + if (/\S/.test(current)) state.beginningOfLine = false; if ((style == "variable" || style == "builtin") && state.lastToken == "meta") diff --git a/www/code/CodeMirror-5.16.0/mode/python/test.js b/www/code/CodeMirror-5.16.0/mode/python/test.js new file mode 100644 index 000000000..c1a9c6a99 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/python/test.js @@ -0,0 +1,30 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 4}, + {name: "python", + version: 3, + singleLineStringErrors: false}); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Error, because "foobarhello" is neither a known type or property, but + // property was expected (after "and"), and it should be in parentheses. + MT("decoratorStartOfLine", + "[meta @dec]", + "[keyword def] [def function]():", + " [keyword pass]"); + + MT("decoratorIndented", + "[keyword class] [def Foo]:", + " [meta @dec]", + " [keyword def] [def function]():", + " [keyword pass]"); + + MT("matmulWithSpace:", "[variable a] [operator @] [variable b]"); + MT("matmulWithoutSpace:", "[variable a][operator @][variable b]"); + MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]"); + + MT("fValidStringPrefix", "[string f'this is a {formatted} string']"); + MT("uValidStringPrefix", "[string u'this is an unicode string']"); +})(); diff --git a/www/code/codemirror-5.13.2/mode/q/index.html b/www/code/CodeMirror-5.16.0/mode/q/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/q/index.html rename to www/code/CodeMirror-5.16.0/mode/q/index.html diff --git a/www/code/codemirror-5.13.2/mode/q/q.js b/www/code/CodeMirror-5.16.0/mode/q/q.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/q/q.js rename to www/code/CodeMirror-5.16.0/mode/q/q.js diff --git a/www/code/codemirror-5.13.2/mode/r/index.html b/www/code/CodeMirror-5.16.0/mode/r/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/r/index.html rename to www/code/CodeMirror-5.16.0/mode/r/index.html diff --git a/www/code/codemirror-5.13.2/mode/r/r.js b/www/code/CodeMirror-5.16.0/mode/r/r.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/r/r.js rename to www/code/CodeMirror-5.16.0/mode/r/r.js diff --git a/www/code/codemirror-5.13.2/mode/rpm/changes/index.html b/www/code/CodeMirror-5.16.0/mode/rpm/changes/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/rpm/changes/index.html rename to www/code/CodeMirror-5.16.0/mode/rpm/changes/index.html diff --git a/www/code/codemirror-5.13.2/mode/rpm/index.html b/www/code/CodeMirror-5.16.0/mode/rpm/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/rpm/index.html rename to www/code/CodeMirror-5.16.0/mode/rpm/index.html diff --git a/www/code/codemirror-5.13.2/mode/rpm/rpm.js b/www/code/CodeMirror-5.16.0/mode/rpm/rpm.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/rpm/rpm.js rename to www/code/CodeMirror-5.16.0/mode/rpm/rpm.js diff --git a/www/code/codemirror-5.13.2/mode/rst/index.html b/www/code/CodeMirror-5.16.0/mode/rst/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/rst/index.html rename to www/code/CodeMirror-5.16.0/mode/rst/index.html diff --git a/www/code/codemirror-5.13.2/mode/rst/rst.js b/www/code/CodeMirror-5.16.0/mode/rst/rst.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/rst/rst.js rename to www/code/CodeMirror-5.16.0/mode/rst/rst.js diff --git a/www/code/codemirror-5.13.2/mode/ruby/index.html b/www/code/CodeMirror-5.16.0/mode/ruby/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/ruby/index.html rename to www/code/CodeMirror-5.16.0/mode/ruby/index.html diff --git a/www/code/codemirror-5.13.2/mode/ruby/ruby.js b/www/code/CodeMirror-5.16.0/mode/ruby/ruby.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/ruby/ruby.js rename to www/code/CodeMirror-5.16.0/mode/ruby/ruby.js diff --git a/www/code/codemirror-5.13.2/mode/ruby/test.js b/www/code/CodeMirror-5.16.0/mode/ruby/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/ruby/test.js rename to www/code/CodeMirror-5.16.0/mode/ruby/test.js diff --git a/www/code/codemirror-5.13.2/mode/rust/index.html b/www/code/CodeMirror-5.16.0/mode/rust/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/rust/index.html rename to www/code/CodeMirror-5.16.0/mode/rust/index.html diff --git a/www/code/codemirror-5.13.2/mode/rust/rust.js b/www/code/CodeMirror-5.16.0/mode/rust/rust.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/rust/rust.js rename to www/code/CodeMirror-5.16.0/mode/rust/rust.js diff --git a/www/code/codemirror-5.13.2/mode/rust/test.js b/www/code/CodeMirror-5.16.0/mode/rust/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/rust/test.js rename to www/code/CodeMirror-5.16.0/mode/rust/test.js diff --git a/www/code/CodeMirror-5.16.0/mode/sas/index.html b/www/code/CodeMirror-5.16.0/mode/sas/index.html new file mode 100644 index 000000000..636e06594 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/sas/index.html @@ -0,0 +1,81 @@ + + +CodeMirror: SAS mode + + + + + + + + + + +
    +

    SAS mode

    +
    + + + +

    MIME types defined: text/x-sas.

    + +
    diff --git a/www/code/CodeMirror-5.16.0/mode/sas/sas.js b/www/code/CodeMirror-5.16.0/mode/sas/sas.js new file mode 100755 index 000000000..fe114827c --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/sas/sas.js @@ -0,0 +1,315 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + + +// SAS mode copyright (c) 2016 Jared Dean, SAS Institute +// Created by Jared Dean + +// TODO +// indent and de-indent +// identify macro variables + + +//Definitions +// comment -- text withing * ; or /* */ +// keyword -- SAS language variable +// variable -- macro variables starts with '&' or variable formats +// variable-2 -- DATA Step, proc, or macro names +// string -- text within ' ' or " " +// operator -- numeric operator + / - * ** le eq ge ... and so on +// builtin -- proc %macro data run mend +// atom +// def + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("sas", function () { + var words = {}; + var isDoubleOperatorSym = { + eq: 'operator', + lt: 'operator', + le: 'operator', + gt: 'operator', + ge: 'operator', + "in": 'operator', + ne: 'operator', + or: 'operator' + }; + var isDoubleOperatorChar = /(<=|>=|!=|<>)/; + var isSingleOperatorChar = /[=\(:\),{}.*<>+\-\/^\[\]]/; + + // Takes a string of words separated by spaces and adds them as + // keys with the value of the first argument 'style' + function define(style, string, context) { + if (context) { + var split = string.split(' '); + for (var i = 0; i < split.length; i++) { + words[split[i]] = {style: style, state: context}; + } + } + } + //datastep + define('def', 'stack pgm view source debug nesting nolist', ['inDataStep']); + define('def', 'if while until for do do; end end; then else cancel', ['inDataStep']); + define('def', 'label format _n_ _error_', ['inDataStep']); + define('def', 'ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME', ['inDataStep']); + define('def', 'filevar finfo finv fipname fipnamel fipstate first firstobs floor', ['inDataStep']); + define('def', 'varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday', ['inDataStep']); + define('def', 'zipfips zipname zipnamel zipstate', ['inDataStep']); + define('def', 'put putc putn', ['inDataStep']); + define('builtin', 'data run', ['inDataStep']); + + + //proc + define('def', 'data', ['inProc']); + + // flow control for macros + define('def', '%if %end %end; %else %else; %do %do; %then', ['inMacro']); + + //everywhere + define('builtin', 'proc run; quit; libname filename %macro %mend option options', ['ALL']); + + define('def', 'footnote title libname ods', ['ALL']); + define('def', '%let %put %global %sysfunc %eval ', ['ALL']); + // automatic macro variables http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a003167023.htm + define('variable', '&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext', ['ALL']); + + //footnote[1-9]? title[1-9]? + + //options statement + define('def', 'source2 nosource2 page pageno pagesize', ['ALL']); + + //proc and datastep + define('def', '_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni read recfm register regr remote remove rename repeat replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max', ['inDataStep', 'inProc']); + define('operator', 'and not ', ['inDataStep', 'inProc']); + + // Main function + function tokenize(stream, state) { + // Finally advance the stream + var ch = stream.next(); + + // BLOCKCOMMENT + if (ch === '/' && stream.eat('*')) { + state.continueComment = true; + return "comment"; + } else if (state.continueComment === true) { // in comment block + //comment ends at the beginning of the line + if (ch === '*' && stream.peek() === '/') { + stream.next(); + state.continueComment = false; + } else if (stream.skipTo('*')) { //comment is potentially later in line + stream.skipTo('*'); + stream.next(); + if (stream.eat('/')) + state.continueComment = false; + } else { + stream.skipToEnd(); + } + return "comment"; + } + + // DoubleOperator match + var doubleOperator = ch + stream.peek(); + + // Match all line comments. + var myString = stream.string; + var myRegexp = /(?:^\s*|[;]\s*)(\*.*?);/ig; + var match = myRegexp.exec(myString); + if (match !== null) { + if (match.index === 0 && (stream.column() !== (match.index + match[0].length - 1))) { + stream.backUp(stream.column()); + stream.skipTo(';'); + stream.next(); + return 'comment'; + } else if (match.index + 1 < stream.column() && stream.column() < match.index + match[0].length - 1) { + // the ';' triggers the match so move one past it to start + // the comment block that is why match.index+1 + stream.backUp(stream.column() - match.index - 1); + stream.skipTo(';'); + stream.next(); + return 'comment'; + } + } else if (!state.continueString && (ch === '"' || ch === "'")) { + // Have we found a string? + state.continueString = ch; //save the matching quote in the state + return "string"; + } else if (state.continueString !== null) { + if (stream.skipTo(state.continueString)) { + // quote found on this line + stream.next(); + state.continueString = null; + } else { + stream.skipToEnd(); + } + return "string"; + } else if (state.continueString !== null && stream.eol()) { + stream.skipTo(state.continueString) || stream.skipToEnd(); + return "string"; + } else if (/[\d\.]/.test(ch)) { //find numbers + if (ch === ".") + stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/); + else if (ch === "0") + stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/); + else + stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/); + return "number"; + } else if (isDoubleOperatorChar.test(ch + stream.peek())) { // TWO SYMBOL TOKENS + stream.next(); + return "operator"; + } else if (isDoubleOperatorSym.hasOwnProperty(doubleOperator)) { + stream.next(); + if (stream.peek() === ' ') + return isDoubleOperatorSym[doubleOperator.toLowerCase()]; + } else if (isSingleOperatorChar.test(ch)) { // SINGLE SYMBOL TOKENS + return "operator"; + } + + // Matches one whole word -- even if the word is a character + var word; + if (stream.match(/[%&;\w]+/, false) != null) { + word = ch + stream.match(/[%&;\w]+/, true); + if (/&/.test(word)) return 'variable' + } else { + word = ch; + } + // the word after DATA PROC or MACRO + if (state.nextword) { + stream.match(/[\w]+/); + // match memname.libname + if (stream.peek() === '.') stream.skipTo(' '); + state.nextword = false; + return 'variable-2'; + + } + + // Are we in a DATA Step? + if (state.inDataStep) { + if (word.toLowerCase() === 'run;' || stream.match(/run\s;/)) { + state.inDataStep = false; + return 'builtin'; + } + // variable formats + if ((word) && stream.next() === '.') { + //either a format or libname.memname + if (/\w/.test(stream.peek())) return 'variable-2'; + else return 'variable'; + } + // do we have a DATA Step keyword + if (word && words.hasOwnProperty(word.toLowerCase()) && + (words[word.toLowerCase()].state.indexOf("inDataStep") !== -1 || + words[word.toLowerCase()].state.indexOf("ALL") !== -1)) { + //backup to the start of the word + if (stream.start < stream.pos) + stream.backUp(stream.pos - stream.start); + //advance the length of the word and return + for (var i = 0; i < word.length; ++i) stream.next(); + return words[word.toLowerCase()].style; + } + } + // Are we in an Proc statement? + if (state.inProc) { + if (word.toLowerCase() === 'run;' || word.toLowerCase() === 'quit;') { + state.inProc = false; + return 'builtin'; + } + // do we have a proc keyword + if (word && words.hasOwnProperty(word.toLowerCase()) && + (words[word.toLowerCase()].state.indexOf("inProc") !== -1 || + words[word.toLowerCase()].state.indexOf("ALL") !== -1)) { + stream.match(/[\w]+/); + return words[word].style; + } + } + // Are we in a Macro statement? + if (state.inMacro) { + if (word.toLowerCase() === '%mend') { + if (stream.peek() === ';') stream.next(); + state.inMacro = false; + return 'builtin'; + } + if (word && words.hasOwnProperty(word.toLowerCase()) && + (words[word.toLowerCase()].state.indexOf("inMacro") !== -1 || + words[word.toLowerCase()].state.indexOf("ALL") !== -1)) { + stream.match(/[\w]+/); + return words[word.toLowerCase()].style; + } + + return 'atom'; + } + // Do we have Keywords specific words? + if (word && words.hasOwnProperty(word.toLowerCase())) { + // Negates the initial next() + stream.backUp(1); + // Actually move the stream + stream.match(/[\w]+/); + if (word.toLowerCase() === 'data' && /=/.test(stream.peek()) === false) { + state.inDataStep = true; + state.nextword = true; + return 'builtin'; + } + if (word.toLowerCase() === 'proc') { + state.inProc = true; + state.nextword = true; + return 'builtin'; + } + if (word.toLowerCase() === '%macro') { + state.inMacro = true; + state.nextword = true; + return 'builtin'; + } + if (/title[1-9]/i.test(word)) return 'def'; + + if (word.toLowerCase() === 'footnote') { + stream.eat(/[1-9]/); + return 'def'; + } + + // Returns their value as state in the prior define methods + if (state.inDataStep === true && words[word.toLowerCase()].state.indexOf("inDataStep") !== -1) + return words[word.toLowerCase()].style; + if (state.inProc === true && words[word.toLowerCase()].state.indexOf("inProc") !== -1) + return words[word.toLowerCase()].style; + if (state.inMacro === true && words[word.toLowerCase()].state.indexOf("inMacro") !== -1) + return words[word.toLowerCase()].style; + if (words[word.toLowerCase()].state.indexOf("ALL") !== -1) + return words[word.toLowerCase()].style; + return null; + } + // Unrecognized syntax + return null; + } + + return { + startState: function () { + return { + inDataStep: false, + inProc: false, + inMacro: false, + nextword: false, + continueString: null, + continueComment: false + }; + }, + token: function (stream, state) { + // Strip the spaces, but regex will account for them either way + if (stream.eatSpace()) return null; + // Go through the main process + return tokenize(stream, state); + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; + + }); + + CodeMirror.defineMIME("text/x-sas", "sas"); +}); diff --git a/www/code/codemirror-5.13.2/mode/sass/index.html b/www/code/CodeMirror-5.16.0/mode/sass/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/sass/index.html rename to www/code/CodeMirror-5.16.0/mode/sass/index.html diff --git a/www/code/codemirror-5.13.2/mode/sass/sass.js b/www/code/CodeMirror-5.16.0/mode/sass/sass.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/sass/sass.js rename to www/code/CodeMirror-5.16.0/mode/sass/sass.js diff --git a/www/code/codemirror-5.13.2/mode/scheme/index.html b/www/code/CodeMirror-5.16.0/mode/scheme/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/scheme/index.html rename to www/code/CodeMirror-5.16.0/mode/scheme/index.html diff --git a/www/code/codemirror-5.13.2/mode/scheme/scheme.js b/www/code/CodeMirror-5.16.0/mode/scheme/scheme.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/scheme/scheme.js rename to www/code/CodeMirror-5.16.0/mode/scheme/scheme.js diff --git a/www/code/codemirror-5.13.2/mode/shell/index.html b/www/code/CodeMirror-5.16.0/mode/shell/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/shell/index.html rename to www/code/CodeMirror-5.16.0/mode/shell/index.html diff --git a/www/code/codemirror-5.13.2/mode/shell/shell.js b/www/code/CodeMirror-5.16.0/mode/shell/shell.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/shell/shell.js rename to www/code/CodeMirror-5.16.0/mode/shell/shell.js diff --git a/www/code/codemirror-5.13.2/mode/shell/test.js b/www/code/CodeMirror-5.16.0/mode/shell/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/shell/test.js rename to www/code/CodeMirror-5.16.0/mode/shell/test.js diff --git a/www/code/codemirror-5.13.2/mode/sieve/index.html b/www/code/CodeMirror-5.16.0/mode/sieve/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/sieve/index.html rename to www/code/CodeMirror-5.16.0/mode/sieve/index.html diff --git a/www/code/codemirror-5.13.2/mode/sieve/sieve.js b/www/code/CodeMirror-5.16.0/mode/sieve/sieve.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/sieve/sieve.js rename to www/code/CodeMirror-5.16.0/mode/sieve/sieve.js diff --git a/www/code/codemirror-5.13.2/mode/slim/index.html b/www/code/CodeMirror-5.16.0/mode/slim/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/slim/index.html rename to www/code/CodeMirror-5.16.0/mode/slim/index.html diff --git a/www/code/codemirror-5.13.2/mode/slim/slim.js b/www/code/CodeMirror-5.16.0/mode/slim/slim.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/slim/slim.js rename to www/code/CodeMirror-5.16.0/mode/slim/slim.js index 164464d06..991a97efc 100644 --- a/www/code/codemirror-5.13.2/mode/slim/slim.js +++ b/www/code/CodeMirror-5.16.0/mode/slim/slim.js @@ -165,7 +165,7 @@ }; return function(stream, state) { rubyState = state.rubyState; - state.rubyState = rubyMode.startState(); + state.rubyState = CodeMirror.startState(rubyMode); state.tokenize = runSplat; return ruby(stream, state); }; @@ -317,7 +317,7 @@ function startSubMode(mode, state) { var subMode = getMode(mode); - var subState = subMode.startState && subMode.startState(); + var subState = CodeMirror.startState(subMode); state.subMode = subMode; state.subState = subState; @@ -507,8 +507,8 @@ var mode = { // default to html mode startState: function() { - var htmlState = htmlMode.startState(); - var rubyState = rubyMode.startState(); + var htmlState = CodeMirror.startState(htmlMode); + var rubyState = CodeMirror.startState(rubyMode); return { htmlState: htmlState, rubyState: rubyState, diff --git a/www/code/codemirror-5.13.2/mode/slim/test.js b/www/code/CodeMirror-5.16.0/mode/slim/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/slim/test.js rename to www/code/CodeMirror-5.16.0/mode/slim/test.js diff --git a/www/code/codemirror-5.13.2/mode/smalltalk/index.html b/www/code/CodeMirror-5.16.0/mode/smalltalk/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/smalltalk/index.html rename to www/code/CodeMirror-5.16.0/mode/smalltalk/index.html diff --git a/www/code/codemirror-5.13.2/mode/smalltalk/smalltalk.js b/www/code/CodeMirror-5.16.0/mode/smalltalk/smalltalk.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/smalltalk/smalltalk.js rename to www/code/CodeMirror-5.16.0/mode/smalltalk/smalltalk.js diff --git a/www/code/codemirror-5.13.2/mode/smarty/index.html b/www/code/CodeMirror-5.16.0/mode/smarty/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/smarty/index.html rename to www/code/CodeMirror-5.16.0/mode/smarty/index.html diff --git a/www/code/codemirror-5.13.2/mode/smarty/smarty.js b/www/code/CodeMirror-5.16.0/mode/smarty/smarty.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/smarty/smarty.js rename to www/code/CodeMirror-5.16.0/mode/smarty/smarty.js diff --git a/www/code/codemirror-5.13.2/mode/solr/index.html b/www/code/CodeMirror-5.16.0/mode/solr/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/solr/index.html rename to www/code/CodeMirror-5.16.0/mode/solr/index.html diff --git a/www/code/codemirror-5.13.2/mode/solr/solr.js b/www/code/CodeMirror-5.16.0/mode/solr/solr.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/solr/solr.js rename to www/code/CodeMirror-5.16.0/mode/solr/solr.js diff --git a/www/code/codemirror-5.13.2/mode/soy/index.html b/www/code/CodeMirror-5.16.0/mode/soy/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/soy/index.html rename to www/code/CodeMirror-5.16.0/mode/soy/index.html diff --git a/www/code/codemirror-5.13.2/mode/soy/soy.js b/www/code/CodeMirror-5.16.0/mode/soy/soy.js similarity index 98% rename from www/code/codemirror-5.13.2/mode/soy/soy.js rename to www/code/CodeMirror-5.16.0/mode/soy/soy.js index 79bfc24df..580c306f1 100644 --- a/www/code/codemirror-5.13.2/mode/soy/soy.js +++ b/www/code/CodeMirror-5.16.0/mode/soy/soy.js @@ -121,10 +121,11 @@ return tokenUntil(stream, state, /\{\/literal}/); case "string": - if (stream.match(/^.*?"/)) { - state.soyState.pop(); - } else { + var match = stream.match(/^.*?("|\\[\s\S])/); + if (!match) { stream.skipToEnd(); + } else if (match[1] == "\"") { + state.soyState.pop(); } return "string"; } diff --git a/www/code/codemirror-5.13.2/mode/sparql/index.html b/www/code/CodeMirror-5.16.0/mode/sparql/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/sparql/index.html rename to www/code/CodeMirror-5.16.0/mode/sparql/index.html diff --git a/www/code/codemirror-5.13.2/mode/sparql/sparql.js b/www/code/CodeMirror-5.16.0/mode/sparql/sparql.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/sparql/sparql.js rename to www/code/CodeMirror-5.16.0/mode/sparql/sparql.js index 90b08e18f..095dcca65 100644 --- a/www/code/codemirror-5.13.2/mode/sparql/sparql.js +++ b/www/code/CodeMirror-5.16.0/mode/sparql/sparql.js @@ -25,7 +25,7 @@ CodeMirror.defineMode("sparql", function(config) { "strbefore", "strafter", "year", "month", "day", "hours", "minutes", "seconds", "timezone", "tz", "now", "uuid", "struuid", "md5", "sha1", "sha256", "sha384", "sha512", "coalesce", "if", "strlang", "strdt", "isnumeric", "regex", "exists", - "isblank", "isliteral", "a"]); + "isblank", "isliteral", "a", "bind"]); var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", "graph", "by", "asc", "desc", "as", "having", "undef", "values", "group", diff --git a/www/code/codemirror-5.13.2/mode/spreadsheet/index.html b/www/code/CodeMirror-5.16.0/mode/spreadsheet/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/spreadsheet/index.html rename to www/code/CodeMirror-5.16.0/mode/spreadsheet/index.html diff --git a/www/code/codemirror-5.13.2/mode/spreadsheet/spreadsheet.js b/www/code/CodeMirror-5.16.0/mode/spreadsheet/spreadsheet.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/spreadsheet/spreadsheet.js rename to www/code/CodeMirror-5.16.0/mode/spreadsheet/spreadsheet.js diff --git a/www/code/codemirror-5.13.2/mode/sql/index.html b/www/code/CodeMirror-5.16.0/mode/sql/index.html similarity index 97% rename from www/code/codemirror-5.13.2/mode/sql/index.html rename to www/code/CodeMirror-5.16.0/mode/sql/index.html index 7ea4b6934..dba069dc8 100644 --- a/www/code/codemirror-5.13.2/mode/sql/index.html +++ b/www/code/CodeMirror-5.16.0/mode/sql/index.html @@ -56,8 +56,9 @@ SELECT SQL_NO_CACHE DISTINCT text/x-cassandra, text/x-plsql, text/x-mssql, - text/x-hive. - text/x-pgsql. + text/x-hive, + text/x-pgsql, + text/x-gql.

    + + + + + + +
    +

    Web IDL mode

    + +
    + +
    + + + +

    MIME type defined: text/x-webidl.

    +
    diff --git a/www/code/CodeMirror-5.16.0/mode/webidl/webidl.js b/www/code/CodeMirror-5.16.0/mode/webidl/webidl.js new file mode 100644 index 000000000..814333620 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/webidl/webidl.js @@ -0,0 +1,195 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); +}; + +var builtinArray = [ + "Clamp", + "Constructor", + "EnforceRange", + "Exposed", + "ImplicitThis", + "Global", "PrimaryGlobal", + "LegacyArrayClass", + "LegacyUnenumerableNamedProperties", + "LenientThis", + "NamedConstructor", + "NewObject", + "NoInterfaceObject", + "OverrideBuiltins", + "PutForwards", + "Replaceable", + "SameObject", + "TreatNonObjectAsNull", + "TreatNullAs", + "EmptyString", + "Unforgeable", + "Unscopeable" +]; +var builtins = wordRegexp(builtinArray); + +var typeArray = [ + "unsigned", "short", "long", // UnsignedIntegerType + "unrestricted", "float", "double", // UnrestrictedFloatType + "boolean", "byte", "octet", // Rest of PrimitiveType + "Promise", // PromiseType + "ArrayBuffer", "DataView", "Int8Array", "Int16Array", "Int32Array", + "Uint8Array", "Uint16Array", "Uint32Array", "Uint8ClampedArray", + "Float32Array", "Float64Array", // BufferRelatedType + "ByteString", "DOMString", "USVString", "sequence", "object", "RegExp", + "Error", "DOMException", "FrozenArray", // Rest of NonAnyType + "any", // Rest of SingleType + "void" // Rest of ReturnType +]; +var types = wordRegexp(typeArray); + +var keywordArray = [ + "attribute", "callback", "const", "deleter", "dictionary", "enum", "getter", + "implements", "inherit", "interface", "iterable", "legacycaller", "maplike", + "partial", "required", "serializer", "setlike", "setter", "static", + "stringifier", "typedef", // ArgumentNameKeyword except + // "unrestricted" + "optional", "readonly", "or" +]; +var keywords = wordRegexp(keywordArray); + +var atomArray = [ + "true", "false", // BooleanLiteral + "Infinity", "NaN", // FloatLiteral + "null" // Rest of ConstValue +]; +var atoms = wordRegexp(atomArray); + +CodeMirror.registerHelper("hintWords", "webidl", + builtinArray.concat(typeArray).concat(keywordArray).concat(atomArray)); + +var startDefArray = ["callback", "dictionary", "enum", "interface"]; +var startDefs = wordRegexp(startDefArray); + +var endDefArray = ["typedef"]; +var endDefs = wordRegexp(endDefArray); + +var singleOperators = /^[:<=>?]/; +var integers = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/; +var floats = /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/; +var identifiers = /^_?[A-Za-z][0-9A-Z_a-z-]*/; +var identifiersEnd = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/; +var strings = /^"[^"]*"/; +var multilineComments = /^\/\*.*?\*\//; +var multilineCommentsStart = /^\/\*.*/; +var multilineCommentsEnd = /^.*?\*\//; + +function readToken(stream, state) { + // whitespace + if (stream.eatSpace()) return null; + + // comment + if (state.inComment) { + if (stream.match(multilineCommentsEnd)) { + state.inComment = false; + return "comment"; + } + stream.skipToEnd(); + return "comment"; + } + if (stream.match("//")) { + stream.skipToEnd(); + return "comment"; + } + if (stream.match(multilineComments)) return "comment"; + if (stream.match(multilineCommentsStart)) { + state.inComment = true; + return "comment"; + } + + // integer and float + if (stream.match(/^-?[0-9\.]/, false)) { + if (stream.match(integers) || stream.match(floats)) return "number"; + } + + // string + if (stream.match(strings)) return "string"; + + // identifier + if (state.startDef && stream.match(identifiers)) return "def"; + + if (state.endDef && stream.match(identifiersEnd)) { + state.endDef = false; + return "def"; + } + + if (stream.match(keywords)) return "keyword"; + + if (stream.match(types)) { + var lastToken = state.lastToken; + var nextToken = (stream.match(/^\s*(.+?)\b/, false) || [])[1]; + + if (lastToken === ":" || lastToken === "implements" || + nextToken === "implements" || nextToken === "=") { + // Used as identifier + return "builtin"; + } else { + // Used as type + return "variable-3"; + } + } + + if (stream.match(builtins)) return "builtin"; + if (stream.match(atoms)) return "atom"; + if (stream.match(identifiers)) return "variable"; + + // other + if (stream.match(singleOperators)) return "operator"; + + // unrecognized + stream.next(); + return null; +}; + +CodeMirror.defineMode("webidl", function() { + return { + startState: function() { + return { + // Is in multiline comment + inComment: false, + // Last non-whitespace, matched token + lastToken: "", + // Next token is a definition + startDef: false, + // Last token of the statement is a definition + endDef: false + }; + }, + token: function(stream, state) { + var style = readToken(stream, state); + + if (style) { + var cur = stream.current(); + state.lastToken = cur; + if (style === "keyword") { + state.startDef = startDefs.test(cur); + state.endDef = state.endDef || endDefs.test(cur); + } else { + state.startDef = false; + } + } + + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-webidl", "webidl"); +}); diff --git a/www/code/codemirror-5.13.2/mode/xml/index.html b/www/code/CodeMirror-5.16.0/mode/xml/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/xml/index.html rename to www/code/CodeMirror-5.16.0/mode/xml/index.html diff --git a/www/code/codemirror-5.13.2/mode/xml/test.js b/www/code/CodeMirror-5.16.0/mode/xml/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/xml/test.js rename to www/code/CodeMirror-5.16.0/mode/xml/test.js diff --git a/www/code/codemirror-5.13.2/mode/xml/xml.js b/www/code/CodeMirror-5.16.0/mode/xml/xml.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/xml/xml.js rename to www/code/CodeMirror-5.16.0/mode/xml/xml.js diff --git a/www/code/codemirror-5.13.2/mode/xquery/index.html b/www/code/CodeMirror-5.16.0/mode/xquery/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/xquery/index.html rename to www/code/CodeMirror-5.16.0/mode/xquery/index.html diff --git a/www/code/codemirror-5.13.2/mode/xquery/test.js b/www/code/CodeMirror-5.16.0/mode/xquery/test.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/xquery/test.js rename to www/code/CodeMirror-5.16.0/mode/xquery/test.js diff --git a/www/code/codemirror-5.13.2/mode/xquery/xquery.js b/www/code/CodeMirror-5.16.0/mode/xquery/xquery.js similarity index 99% rename from www/code/codemirror-5.13.2/mode/xquery/xquery.js rename to www/code/CodeMirror-5.16.0/mode/xquery/xquery.js index c642ee58f..75dcbee3e 100644 --- a/www/code/codemirror-5.13.2/mode/xquery/xquery.js +++ b/www/code/CodeMirror-5.16.0/mode/xquery/xquery.js @@ -17,7 +17,7 @@ CodeMirror.defineMode("xquery", function() { // function. Each keyword is a property of the keywords object whose // value is {type: atype, style: astyle} var keywords = function(){ - // conveinence functions used to build keywords object + // convenience functions used to build keywords object function kw(type) {return {type: type, style: "keyword"};} var A = kw("keyword a") , B = kw("keyword b") diff --git a/www/code/CodeMirror-5.16.0/mode/yacas/index.html b/www/code/CodeMirror-5.16.0/mode/yacas/index.html new file mode 100644 index 000000000..8e52cafb1 --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/yacas/index.html @@ -0,0 +1,87 @@ + + +CodeMirror: yacas mode + + + + + + + + + + +
    +

    yacas mode

    + + + + + + +

    MIME types defined: text/x-yacas (yacas).

    +
    diff --git a/www/code/CodeMirror-5.16.0/mode/yacas/yacas.js b/www/code/CodeMirror-5.16.0/mode/yacas/yacas.js new file mode 100644 index 000000000..30bd60b2f --- /dev/null +++ b/www/code/CodeMirror-5.16.0/mode/yacas/yacas.js @@ -0,0 +1,204 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// Yacas mode copyright (c) 2015 by Grzegorz Mazur +// Loosely based on mathematica mode by Calin Barbat + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('yacas', function(_config, _parserConfig) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var bodiedOps = words("Assert BackQuote D Defun Deriv For ForEach FromFile " + + "FromString Function Integrate InverseTaylor Limit " + + "LocalSymbols Macro MacroRule MacroRulePattern " + + "NIntegrate Rule RulePattern Subst TD TExplicitSum " + + "TSum Taylor Taylor1 Taylor2 Taylor3 ToFile " + + "ToStdout ToString TraceRule Until While"); + + // patterns + var pFloatForm = "(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)"; + var pIdentifier = "(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)"; + + // regular expressions + var reFloatForm = new RegExp(pFloatForm); + var reIdentifier = new RegExp(pIdentifier); + var rePattern = new RegExp(pIdentifier + "?_" + pIdentifier); + var reFunctionLike = new RegExp(pIdentifier + "\\s*\\("); + + function tokenBase(stream, state) { + var ch; + + // get next character + ch = stream.next(); + + // string + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + + // comment + if (ch === '/') { + if (stream.eat('*')) { + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + + // go back one character + stream.backUp(1); + + // update scope info + var m = stream.match(/^(\w+)\s*\(/, false); + if (m !== null && bodiedOps.hasOwnProperty(m[1])) + state.scopes.push('bodied'); + + var scope = currentScope(state); + + if (scope === 'bodied' && ch === '[') + state.scopes.pop(); + + if (ch === '[' || ch === '{' || ch === '(') + state.scopes.push(ch); + + scope = currentScope(state); + + if (scope === '[' && ch === ']' || + scope === '{' && ch === '}' || + scope === '(' && ch === ')') + state.scopes.pop(); + + if (ch === ';') { + while (scope === 'bodied') { + state.scopes.pop(); + scope = currentScope(state); + } + } + + // look for ordered rules + if (stream.match(/\d+ *#/, true, false)) { + return 'qualifier'; + } + + // look for numbers + if (stream.match(reFloatForm, true, false)) { + return 'number'; + } + + // look for placeholders + if (stream.match(rePattern, true, false)) { + return 'variable-3'; + } + + // match all braces separately + if (stream.match(/(?:\[|\]|{|}|\(|\))/, true, false)) { + return 'bracket'; + } + + // literals looking like function calls + if (stream.match(reFunctionLike, true, false)) { + stream.backUp(1); + return 'variable'; + } + + // all other identifiers + if (stream.match(reIdentifier, true, false)) { + return 'variable-2'; + } + + // operators; note that operators like @@ or /; are matched separately for each symbol. + if (stream.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, true, false)) { + return 'operator'; + } + + // everything else is an error + return 'error'; + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while((next = stream.next()) != null) { + if (prev === '*' && next === '/') { + state.tokenize = tokenBase; + break; + } + prev = next; + } + return 'comment'; + } + + function currentScope(state) { + var scope = null; + if (state.scopes.length > 0) + scope = state.scopes[state.scopes.length - 1]; + return scope; + } + + return { + startState: function() { + return { + tokenize: tokenBase, + scopes: [] + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + indent: function(state, textAfter) { + if (state.tokenize !== tokenBase && state.tokenize !== null) + return CodeMirror.Pass; + + var delta = 0; + if (textAfter === ']' || textAfter === '];' || + textAfter === '}' || textAfter === '};' || + textAfter === ');') + delta = -1; + + return (state.scopes.length + delta) * _config.indentUnit; + }, + electricChars: "{}[]();", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME('text/x-yacas', { + name: 'yacas' +}); + +}); diff --git a/www/code/codemirror-5.13.2/mode/yaml-frontmatter/index.html b/www/code/CodeMirror-5.16.0/mode/yaml-frontmatter/index.html similarity index 98% rename from www/code/codemirror-5.13.2/mode/yaml-frontmatter/index.html rename to www/code/CodeMirror-5.16.0/mode/yaml-frontmatter/index.html index 30bed2f85..30cb294e8 100644 --- a/www/code/codemirror-5.13.2/mode/yaml-frontmatter/index.html +++ b/www/code/CodeMirror-5.16.0/mode/yaml-frontmatter/index.html @@ -78,7 +78,7 @@ Underscores_are_allowed_between_words. GFM adds syntax to strikethrough text, which is missing from standard Markdown. ~~Mistaken text.~~ -~~**works with other fomatting**~~ +~~**works with other formatting**~~ ~~spans across lines~~ diff --git a/www/code/codemirror-5.13.2/mode/yaml-frontmatter/yaml-frontmatter.js b/www/code/CodeMirror-5.16.0/mode/yaml-frontmatter/yaml-frontmatter.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/yaml-frontmatter/yaml-frontmatter.js rename to www/code/CodeMirror-5.16.0/mode/yaml-frontmatter/yaml-frontmatter.js diff --git a/www/code/codemirror-5.13.2/mode/yaml/index.html b/www/code/CodeMirror-5.16.0/mode/yaml/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/yaml/index.html rename to www/code/CodeMirror-5.16.0/mode/yaml/index.html diff --git a/www/code/codemirror-5.13.2/mode/yaml/yaml.js b/www/code/CodeMirror-5.16.0/mode/yaml/yaml.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/yaml/yaml.js rename to www/code/CodeMirror-5.16.0/mode/yaml/yaml.js diff --git a/www/code/codemirror-5.13.2/mode/z80/index.html b/www/code/CodeMirror-5.16.0/mode/z80/index.html similarity index 100% rename from www/code/codemirror-5.13.2/mode/z80/index.html rename to www/code/CodeMirror-5.16.0/mode/z80/index.html diff --git a/www/code/codemirror-5.13.2/mode/z80/z80.js b/www/code/CodeMirror-5.16.0/mode/z80/z80.js similarity index 100% rename from www/code/codemirror-5.13.2/mode/z80/z80.js rename to www/code/CodeMirror-5.16.0/mode/z80/z80.js diff --git a/www/code/codemirror-5.13.2/package.json b/www/code/CodeMirror-5.16.0/package.json similarity index 91% rename from www/code/codemirror-5.13.2/package.json rename to www/code/CodeMirror-5.16.0/package.json index 7440fd5b3..5638b12a1 100644 --- a/www/code/codemirror-5.13.2/package.json +++ b/www/code/CodeMirror-5.16.0/package.json @@ -1,8 +1,8 @@ { "name": "codemirror", - "version":"5.13.2", + "version":"5.16.0", "main": "lib/codemirror.js", - "description": "In-browser code editing made bearable", + "description": "Full-featured in-browser code editor", "license": "MIT", "directories": {"lib": "./lib"}, "scripts": { diff --git a/www/code/codemirror-5.13.2/test/comment_test.js b/www/code/CodeMirror-5.16.0/test/comment_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/comment_test.js rename to www/code/CodeMirror-5.16.0/test/comment_test.js diff --git a/www/code/codemirror-5.13.2/test/doc_test.js b/www/code/CodeMirror-5.16.0/test/doc_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/doc_test.js rename to www/code/CodeMirror-5.16.0/test/doc_test.js diff --git a/www/code/codemirror-5.13.2/test/driver.js b/www/code/CodeMirror-5.16.0/test/driver.js similarity index 100% rename from www/code/codemirror-5.13.2/test/driver.js rename to www/code/CodeMirror-5.16.0/test/driver.js diff --git a/www/code/codemirror-5.13.2/test/emacs_test.js b/www/code/CodeMirror-5.16.0/test/emacs_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/emacs_test.js rename to www/code/CodeMirror-5.16.0/test/emacs_test.js diff --git a/www/code/codemirror-5.13.2/test/index.html b/www/code/CodeMirror-5.16.0/test/index.html similarity index 97% rename from www/code/codemirror-5.13.2/test/index.html rename to www/code/CodeMirror-5.16.0/test/index.html index 5f8ebadc1..90c033517 100644 --- a/www/code/codemirror-5.13.2/test/index.html +++ b/www/code/CodeMirror-5.16.0/test/index.html @@ -8,6 +8,7 @@ + @@ -26,6 +27,8 @@ + + @@ -112,6 +115,7 @@ + @@ -120,6 +124,7 @@ + diff --git a/www/code/codemirror-5.13.2/test/lint.js b/www/code/CodeMirror-5.16.0/test/lint.js similarity index 100% rename from www/code/codemirror-5.13.2/test/lint.js rename to www/code/CodeMirror-5.16.0/test/lint.js diff --git a/www/code/codemirror-5.13.2/test/mode_test.css b/www/code/CodeMirror-5.16.0/test/mode_test.css similarity index 100% rename from www/code/codemirror-5.13.2/test/mode_test.css rename to www/code/CodeMirror-5.16.0/test/mode_test.css diff --git a/www/code/codemirror-5.13.2/test/mode_test.js b/www/code/CodeMirror-5.16.0/test/mode_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/mode_test.js rename to www/code/CodeMirror-5.16.0/test/mode_test.js diff --git a/www/code/codemirror-5.13.2/test/multi_test.js b/www/code/CodeMirror-5.16.0/test/multi_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/multi_test.js rename to www/code/CodeMirror-5.16.0/test/multi_test.js diff --git a/www/code/codemirror-5.13.2/test/phantom_driver.js b/www/code/CodeMirror-5.16.0/test/phantom_driver.js similarity index 100% rename from www/code/codemirror-5.13.2/test/phantom_driver.js rename to www/code/CodeMirror-5.16.0/test/phantom_driver.js diff --git a/www/code/codemirror-5.13.2/test/run.js b/www/code/CodeMirror-5.16.0/test/run.js old mode 100644 new mode 100755 similarity index 100% rename from www/code/codemirror-5.13.2/test/run.js rename to www/code/CodeMirror-5.16.0/test/run.js diff --git a/www/code/codemirror-5.13.2/test/scroll_test.js b/www/code/CodeMirror-5.16.0/test/scroll_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/scroll_test.js rename to www/code/CodeMirror-5.16.0/test/scroll_test.js diff --git a/www/code/codemirror-5.13.2/test/search_test.js b/www/code/CodeMirror-5.16.0/test/search_test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/search_test.js rename to www/code/CodeMirror-5.16.0/test/search_test.js diff --git a/www/code/codemirror-5.13.2/test/sql-hint-test.js b/www/code/CodeMirror-5.16.0/test/sql-hint-test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/sql-hint-test.js rename to www/code/CodeMirror-5.16.0/test/sql-hint-test.js diff --git a/www/code/codemirror-5.13.2/test/sublime_test.js b/www/code/CodeMirror-5.16.0/test/sublime_test.js similarity index 98% rename from www/code/codemirror-5.13.2/test/sublime_test.js rename to www/code/CodeMirror-5.16.0/test/sublime_test.js index c93e041b8..c5c19c0a2 100644 --- a/www/code/codemirror-5.13.2/test/sublime_test.js +++ b/www/code/CodeMirror-5.16.0/test/sublime_test.js @@ -274,6 +274,10 @@ "clearBookmarks", Pos(0, 0), "selectBookmarks", at(0, 0)); + stTest("smartBackspace", " foo\n bar", + setSel(0, 2, 0, 2, 1, 4, 1, 4, 1, 6, 1, 6), "smartBackspace", + val("foo\n br")) + stTest("upAndDowncaseAtCursor", "abc\ndef x\nghI", setSel(0, 1, 0, 3, 1, 1, 1, 1, diff --git a/www/code/codemirror-5.13.2/test/test.js b/www/code/CodeMirror-5.16.0/test/test.js similarity index 100% rename from www/code/codemirror-5.13.2/test/test.js rename to www/code/CodeMirror-5.16.0/test/test.js diff --git a/www/code/codemirror-5.13.2/test/vim_test.js b/www/code/CodeMirror-5.16.0/test/vim_test.js similarity index 99% rename from www/code/codemirror-5.13.2/test/vim_test.js rename to www/code/CodeMirror-5.16.0/test/vim_test.js index 7080c3062..fb612b140 100644 --- a/www/code/codemirror-5.13.2/test/vim_test.js +++ b/www/code/CodeMirror-5.16.0/test/vim_test.js @@ -273,10 +273,10 @@ testJumplist('jumplist_repeat_', ['*', '*', '*', '3', '', '2', '' testJumplist('jumplist_repeated_motion', ['3', '*', ''], [2,3], [2,3]); testJumplist('jumplist_/', ['/', ''], [2,3], [2,3], 'dialog'); testJumplist('jumplist_?', ['?', ''], [2,3], [2,3], 'dialog'); -testJumplist('jumplist_skip_delted_mark', +testJumplist('jumplist_skip_deleted_mark', ['*', 'n', 'n', 'k', 'd', 'k', '', '', ''], [0,2], [0,2]); -testJumplist('jumplist_skip_delted_mark', +testJumplist('jumplist_skip_deleted_mark', ['*', 'n', 'n', 'k', 'd', 'k', '', '', ''], [1,0], [0,2]); @@ -482,7 +482,7 @@ testVim('gj_gk', function(cm, vim, helpers) { var topLeftCharCoords = cm.charCoords(makeCursor(0, 0)); var endingCharCoords = cm.charCoords(endingPos); is(topLeftCharCoords.left == endingCharCoords.left, 'gj should end up on column 0'); -},{ lineNumbers: false, lineWrapping:true, value: 'Thislineisintentiallylongtotestmovementofgjandgkoverwrappedlines.' }); +},{ lineNumbers: false, lineWrapping:true, value: 'Thislineisintentionallylongtotestmovementofgjandgkoverwrappedlines.' }); testVim('}', function(cm, vim, helpers) { cm.setCursor(0, 0); helpers.doKeys('}'); @@ -3682,7 +3682,7 @@ function testSubstituteConfirm(name, command, initialValue, expectedValue, keys, } catch(e) { throw e } finally { - // Restore overriden functions. + // Restore overridden functions. CodeMirror.keyName = savedKeyName; cm.openDialog = savedOpenDialog; } @@ -3725,6 +3725,14 @@ testVim('ex_noh_clearSearchHighlight', function(cm, vim, helpers) { helpers.doKeys('n'); helpers.assertCursorAt(0, 11,'can\'t resume search after clearing highlighting'); }, { value: 'match nope match \n nope Match' }); +testVim('ex_yank', function (cm, vim, helpers) { + var curStart = makeCursor(3, 0); + cm.setCursor(curStart); + helpers.doEx('y'); + var register = helpers.getRegisterController().getRegister(); + var line = cm.getLine(3); + eq(line + '\n', register.toString()); +}); testVim('set_boolean', function(cm, vim, helpers) { CodeMirror.Vim.defineOption('testoption', true, 'boolean'); // Test default value is set. diff --git a/www/code/codemirror-5.13.2/theme/3024-day.css b/www/code/CodeMirror-5.16.0/theme/3024-day.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/3024-day.css rename to www/code/CodeMirror-5.16.0/theme/3024-day.css diff --git a/www/code/codemirror-5.13.2/theme/3024-night.css b/www/code/CodeMirror-5.16.0/theme/3024-night.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/3024-night.css rename to www/code/CodeMirror-5.16.0/theme/3024-night.css diff --git a/www/code/codemirror-5.13.2/theme/abcdef.css b/www/code/CodeMirror-5.16.0/theme/abcdef.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/abcdef.css rename to www/code/CodeMirror-5.16.0/theme/abcdef.css diff --git a/www/code/codemirror-5.13.2/theme/ambiance-mobile.css b/www/code/CodeMirror-5.16.0/theme/ambiance-mobile.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/ambiance-mobile.css rename to www/code/CodeMirror-5.16.0/theme/ambiance-mobile.css diff --git a/www/code/codemirror-5.13.2/theme/ambiance.css b/www/code/CodeMirror-5.16.0/theme/ambiance.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/ambiance.css rename to www/code/CodeMirror-5.16.0/theme/ambiance.css diff --git a/www/code/codemirror-5.13.2/theme/base16-dark.css b/www/code/CodeMirror-5.16.0/theme/base16-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/base16-dark.css rename to www/code/CodeMirror-5.16.0/theme/base16-dark.css diff --git a/www/code/codemirror-5.13.2/theme/base16-light.css b/www/code/CodeMirror-5.16.0/theme/base16-light.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/base16-light.css rename to www/code/CodeMirror-5.16.0/theme/base16-light.css diff --git a/www/code/codemirror-5.13.2/theme/bespin.css b/www/code/CodeMirror-5.16.0/theme/bespin.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/bespin.css rename to www/code/CodeMirror-5.16.0/theme/bespin.css diff --git a/www/code/codemirror-5.13.2/theme/blackboard.css b/www/code/CodeMirror-5.16.0/theme/blackboard.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/blackboard.css rename to www/code/CodeMirror-5.16.0/theme/blackboard.css diff --git a/www/code/codemirror-5.13.2/theme/cobalt.css b/www/code/CodeMirror-5.16.0/theme/cobalt.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/cobalt.css rename to www/code/CodeMirror-5.16.0/theme/cobalt.css diff --git a/www/code/codemirror-5.13.2/theme/colorforth.css b/www/code/CodeMirror-5.16.0/theme/colorforth.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/colorforth.css rename to www/code/CodeMirror-5.16.0/theme/colorforth.css diff --git a/www/code/codemirror-5.13.2/theme/dracula.css b/www/code/CodeMirror-5.16.0/theme/dracula.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/dracula.css rename to www/code/CodeMirror-5.16.0/theme/dracula.css diff --git a/www/code/codemirror-5.13.2/theme/eclipse.css b/www/code/CodeMirror-5.16.0/theme/eclipse.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/eclipse.css rename to www/code/CodeMirror-5.16.0/theme/eclipse.css diff --git a/www/code/codemirror-5.13.2/theme/elegant.css b/www/code/CodeMirror-5.16.0/theme/elegant.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/elegant.css rename to www/code/CodeMirror-5.16.0/theme/elegant.css diff --git a/www/code/codemirror-5.13.2/theme/erlang-dark.css b/www/code/CodeMirror-5.16.0/theme/erlang-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/erlang-dark.css rename to www/code/CodeMirror-5.16.0/theme/erlang-dark.css diff --git a/www/code/codemirror-5.13.2/theme/hopscotch.css b/www/code/CodeMirror-5.16.0/theme/hopscotch.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/hopscotch.css rename to www/code/CodeMirror-5.16.0/theme/hopscotch.css diff --git a/www/code/codemirror-5.13.2/theme/icecoder.css b/www/code/CodeMirror-5.16.0/theme/icecoder.css similarity index 91% rename from www/code/codemirror-5.13.2/theme/icecoder.css rename to www/code/CodeMirror-5.16.0/theme/icecoder.css index d70d26e82..ffebaf2f0 100644 --- a/www/code/codemirror-5.13.2/theme/icecoder.css +++ b/www/code/CodeMirror-5.16.0/theme/icecoder.css @@ -2,7 +2,7 @@ ICEcoder default theme by Matt Pass, used in code editor available at https://icecoder.net */ -.cm-s-icecoder { color: #666; background: #141612; } +.cm-s-icecoder { color: #666; background: #1d1d1b; } .cm-s-icecoder span.cm-keyword { color: #eee; font-weight:bold; } /* off-white 1 */ .cm-s-icecoder span.cm-atom { color: #e1c76e; } /* yellow */ @@ -37,7 +37,7 @@ ICEcoder default theme by Matt Pass, used in code editor available at https://ic .cm-s-icecoder .CodeMirror-cursor { border-left: 1px solid white; } .cm-s-icecoder div.CodeMirror-selected { color: #fff; background: #037; } -.cm-s-icecoder .CodeMirror-gutters { background: #141612; min-width: 41px; border-right: 0; } +.cm-s-icecoder .CodeMirror-gutters { background: #1d1d1b; min-width: 41px; border-right: 0; } .cm-s-icecoder .CodeMirror-linenumber { color: #555; cursor: default; } -.cm-s-icecoder .CodeMirror-matchingbracket { border: 1px solid grey; color: black !important; } -.cm-s-icecoder .CodeMirror-activeline-background { background: #000; } \ No newline at end of file +.cm-s-icecoder .CodeMirror-matchingbracket { color: #fff !important; background: #555 !important; } +.cm-s-icecoder .CodeMirror-activeline-background { background: #000; } diff --git a/www/code/codemirror-5.13.2/theme/isotope.css b/www/code/CodeMirror-5.16.0/theme/isotope.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/isotope.css rename to www/code/CodeMirror-5.16.0/theme/isotope.css diff --git a/www/code/codemirror-5.13.2/theme/lesser-dark.css b/www/code/CodeMirror-5.16.0/theme/lesser-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/lesser-dark.css rename to www/code/CodeMirror-5.16.0/theme/lesser-dark.css diff --git a/www/code/codemirror-5.13.2/theme/liquibyte.css b/www/code/CodeMirror-5.16.0/theme/liquibyte.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/liquibyte.css rename to www/code/CodeMirror-5.16.0/theme/liquibyte.css diff --git a/www/code/codemirror-5.13.2/theme/material.css b/www/code/CodeMirror-5.16.0/theme/material.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/material.css rename to www/code/CodeMirror-5.16.0/theme/material.css diff --git a/www/code/codemirror-5.13.2/theme/mbo.css b/www/code/CodeMirror-5.16.0/theme/mbo.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/mbo.css rename to www/code/CodeMirror-5.16.0/theme/mbo.css diff --git a/www/code/codemirror-5.13.2/theme/mdn-like.css b/www/code/CodeMirror-5.16.0/theme/mdn-like.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/mdn-like.css rename to www/code/CodeMirror-5.16.0/theme/mdn-like.css diff --git a/www/code/codemirror-5.13.2/theme/midnight.css b/www/code/CodeMirror-5.16.0/theme/midnight.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/midnight.css rename to www/code/CodeMirror-5.16.0/theme/midnight.css diff --git a/www/code/codemirror-5.13.2/theme/monokai.css b/www/code/CodeMirror-5.16.0/theme/monokai.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/monokai.css rename to www/code/CodeMirror-5.16.0/theme/monokai.css diff --git a/www/code/codemirror-5.13.2/theme/neat.css b/www/code/CodeMirror-5.16.0/theme/neat.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/neat.css rename to www/code/CodeMirror-5.16.0/theme/neat.css diff --git a/www/code/codemirror-5.13.2/theme/neo.css b/www/code/CodeMirror-5.16.0/theme/neo.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/neo.css rename to www/code/CodeMirror-5.16.0/theme/neo.css diff --git a/www/code/codemirror-5.13.2/theme/night.css b/www/code/CodeMirror-5.16.0/theme/night.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/night.css rename to www/code/CodeMirror-5.16.0/theme/night.css diff --git a/www/code/codemirror-5.13.2/theme/paraiso-dark.css b/www/code/CodeMirror-5.16.0/theme/paraiso-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/paraiso-dark.css rename to www/code/CodeMirror-5.16.0/theme/paraiso-dark.css diff --git a/www/code/codemirror-5.13.2/theme/paraiso-light.css b/www/code/CodeMirror-5.16.0/theme/paraiso-light.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/paraiso-light.css rename to www/code/CodeMirror-5.16.0/theme/paraiso-light.css diff --git a/www/code/codemirror-5.13.2/theme/pastel-on-dark.css b/www/code/CodeMirror-5.16.0/theme/pastel-on-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/pastel-on-dark.css rename to www/code/CodeMirror-5.16.0/theme/pastel-on-dark.css diff --git a/www/code/codemirror-5.13.2/theme/railscasts.css b/www/code/CodeMirror-5.16.0/theme/railscasts.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/railscasts.css rename to www/code/CodeMirror-5.16.0/theme/railscasts.css diff --git a/www/code/codemirror-5.13.2/theme/rubyblue.css b/www/code/CodeMirror-5.16.0/theme/rubyblue.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/rubyblue.css rename to www/code/CodeMirror-5.16.0/theme/rubyblue.css diff --git a/www/code/codemirror-5.13.2/theme/seti.css b/www/code/CodeMirror-5.16.0/theme/seti.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/seti.css rename to www/code/CodeMirror-5.16.0/theme/seti.css diff --git a/www/code/codemirror-5.13.2/theme/solarized.css b/www/code/CodeMirror-5.16.0/theme/solarized.css similarity index 87% rename from www/code/codemirror-5.13.2/theme/solarized.css rename to www/code/CodeMirror-5.16.0/theme/solarized.css index 7882c9376..4b1e16307 100644 --- a/www/code/codemirror-5.13.2/theme/solarized.css +++ b/www/code/CodeMirror-5.16.0/theme/solarized.css @@ -4,7 +4,7 @@ http://ethanschoonover.com/solarized */ /* -Solarized color pallet +Solarized color palette http://ethanschoonover.com/solarized/img/solarized-palette.png */ @@ -34,7 +34,7 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png } .cm-s-solarized.cm-s-dark { color: #839496; - background-color: #002b36; + background-color: #002b36; text-shadow: #002b36 0 1px; } .cm-s-solarized.cm-s-light { @@ -113,32 +113,34 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png box-shadow: inset 7px 0 12px -6px #000; } -/* Gutter border and some shadow from it */ +/* Remove gutter border */ .cm-s-solarized .CodeMirror-gutters { - border-right: 1px solid; + border-right: 0; } /* Gutter colors and line number styling based of color scheme (dark / light) */ /* Dark */ .cm-s-solarized.cm-s-dark .CodeMirror-gutters { - background-color: #002b36; - border-color: #00232c; + background-color: #073642; } .cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: #586e75; text-shadow: #021014 0 -1px; } /* Light */ .cm-s-solarized.cm-s-light .CodeMirror-gutters { - background-color: #fdf6e3; - border-color: #eee8d5; + background-color: #eee8d5; +} + +.cm-s-solarized.cm-s-light .CodeMirror-linenumber { + color: #839496; } /* Common */ .cm-s-solarized .CodeMirror-linenumber { - color: #586e75; padding: 0 5px; } .cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; } @@ -149,15 +151,19 @@ http://ethanschoonover.com/solarized/img/solarized-palette.png color: #586e75; } +/* Cursor */ .cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; } -/* -Active line. Negative margin compensates left padding of the text in the -view-port -*/ +/* Fat cursor */ +.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #fdf6e3; } +.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #fdf6e3; } +.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; } +.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; } + +/* Active line */ .cm-s-solarized.cm-s-dark .CodeMirror-activeline-background { - background: rgba(255, 255, 255, 0.10); + background: rgba(255, 255, 255, 0.06); } .cm-s-solarized.cm-s-light .CodeMirror-activeline-background { - background: rgba(0, 0, 0, 0.10); + background: rgba(0, 0, 0, 0.06); } diff --git a/www/code/codemirror-5.13.2/theme/the-matrix.css b/www/code/CodeMirror-5.16.0/theme/the-matrix.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/the-matrix.css rename to www/code/CodeMirror-5.16.0/theme/the-matrix.css diff --git a/www/code/codemirror-5.13.2/theme/tomorrow-night-bright.css b/www/code/CodeMirror-5.16.0/theme/tomorrow-night-bright.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/tomorrow-night-bright.css rename to www/code/CodeMirror-5.16.0/theme/tomorrow-night-bright.css diff --git a/www/code/codemirror-5.13.2/theme/tomorrow-night-eighties.css b/www/code/CodeMirror-5.16.0/theme/tomorrow-night-eighties.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/tomorrow-night-eighties.css rename to www/code/CodeMirror-5.16.0/theme/tomorrow-night-eighties.css diff --git a/www/code/codemirror-5.13.2/theme/ttcn.css b/www/code/CodeMirror-5.16.0/theme/ttcn.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/ttcn.css rename to www/code/CodeMirror-5.16.0/theme/ttcn.css diff --git a/www/code/codemirror-5.13.2/theme/twilight.css b/www/code/CodeMirror-5.16.0/theme/twilight.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/twilight.css rename to www/code/CodeMirror-5.16.0/theme/twilight.css diff --git a/www/code/codemirror-5.13.2/theme/vibrant-ink.css b/www/code/CodeMirror-5.16.0/theme/vibrant-ink.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/vibrant-ink.css rename to www/code/CodeMirror-5.16.0/theme/vibrant-ink.css diff --git a/www/code/codemirror-5.13.2/theme/xq-dark.css b/www/code/CodeMirror-5.16.0/theme/xq-dark.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/xq-dark.css rename to www/code/CodeMirror-5.16.0/theme/xq-dark.css diff --git a/www/code/codemirror-5.13.2/theme/xq-light.css b/www/code/CodeMirror-5.16.0/theme/xq-light.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/xq-light.css rename to www/code/CodeMirror-5.16.0/theme/xq-light.css diff --git a/www/code/codemirror-5.13.2/theme/yeti.css b/www/code/CodeMirror-5.16.0/theme/yeti.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/yeti.css rename to www/code/CodeMirror-5.16.0/theme/yeti.css diff --git a/www/code/codemirror-5.13.2/theme/zenburn.css b/www/code/CodeMirror-5.16.0/theme/zenburn.css similarity index 100% rename from www/code/codemirror-5.13.2/theme/zenburn.css rename to www/code/CodeMirror-5.16.0/theme/zenburn.css diff --git a/www/code/codemirror-5.13.2/mode/loadmode.js b/www/code/codemirror-5.13.2/mode/loadmode.js deleted file mode 100644 index 10117ec22..000000000 --- a/www/code/codemirror-5.13.2/mode/loadmode.js +++ /dev/null @@ -1,64 +0,0 @@ -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror"), "cjs"); - else if (typeof define == "function" && define.amd) // AMD - define(["../../lib/codemirror"], function(CM) { mod(CM, "amd"); }); - else // Plain browser env - mod(CodeMirror, "plain"); -})(function(CodeMirror, env) { - if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js"; - - var loading = {}; - function splitCallback(cont, n) { - var countDown = n; - return function() { if (--countDown == 0) cont(); }; - } - function ensureDeps(mode, cont) { - var deps = CodeMirror.modes[mode].dependencies; - if (!deps) return cont(); - var missing = []; - for (var i = 0; i < deps.length; ++i) { - if (!CodeMirror.modes.hasOwnProperty(deps[i])) - missing.push(deps[i]); - } - if (!missing.length) return cont(); - var split = splitCallback(cont, missing.length); - for (var i = 0; i < missing.length; ++i) - CodeMirror.requireMode(missing[i], split); - } - - CodeMirror.requireMode = function(mode, cont) { - if (typeof mode != "string") mode = mode.name; - if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont); - if (loading.hasOwnProperty(mode)) return loading[mode].push(cont); - - var file = CodeMirror.modeURL.replace(/%N/g, mode); - if (env == "plain") { - var script = document.createElement("script"); - script.src = file; - var others = document.getElementsByTagName("script")[0]; - var list = loading[mode] = [cont]; - CodeMirror.on(script, "load", function() { - ensureDeps(mode, function() { - for (var i = 0; i < list.length; ++i) list[i](); - }); - }); - others.parentNode.insertBefore(script, others); - } else if (env == "cjs") { - require(file); - cont(); - } else if (env == "amd") { - requirejs([file], cont); - } - }; - - CodeMirror.autoLoadMode = function(instance, mode) { - if (!CodeMirror.modes.hasOwnProperty(mode)) - CodeMirror.requireMode(mode, function() { - instance.setOption("mode", instance.getOption("mode")); - }); - }; -});