gump 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +71 -0
- data/Rakefile +2 -0
- data/bin/gump +37 -0
- data/gump.gemspec +17 -0
- data/lib/gump.rb +50 -0
- data/lib/version.rb +3 -0
- data/server/assets/css/style.css +6949 -0
- data/server/assets/images/arrow.png +0 -0
- data/server/assets/images/logo.png +0 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css +347 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.min.css +7 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css +5785 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.min.css +7 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.js +1951 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.min.js +6 -0
- data/server/assets/js/jquery.codemirror/.gitattributes +8 -0
- data/server/assets/js/jquery.codemirror/.gitignore +6 -0
- data/server/assets/js/jquery.codemirror/.travis.yml +3 -0
- data/server/assets/js/jquery.codemirror/AUTHORS +255 -0
- data/server/assets/js/jquery.codemirror/CONTRIBUTING.md +72 -0
- data/server/assets/js/jquery.codemirror/LICENSE +19 -0
- data/server/assets/js/jquery.codemirror/README.md +11 -0
- data/server/assets/js/jquery.codemirror/addon/comment/comment.js +145 -0
- data/server/assets/js/jquery.codemirror/addon/comment/continuecomment.js +54 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.css +32 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.css +6 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.js +31 -0
- data/server/assets/js/jquery.codemirror/addon/display/placeholder.js +48 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closebrackets.js +82 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closetag.js +89 -0
- data/server/assets/js/jquery.codemirror/addon/edit/continuelist.js +25 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchbrackets.js +87 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchtags.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/edit/trailingspace.js +15 -0
- data/server/assets/js/jquery.codemirror/addon/fold/brace-fold.js +93 -0
- data/server/assets/js/jquery.codemirror/addon/fold/comment-fold.js +40 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldcode.js +75 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.css +21 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.js +124 -0
- data/server/assets/js/jquery.codemirror/addon/fold/indent-fold.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/fold/xml-fold.js +167 -0
- data/server/assets/js/jquery.codemirror/addon/hint/anyword-hint.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/hint/css-hint.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/hint/html-hint.js +337 -0
- data/server/assets/js/jquery.codemirror/addon/hint/javascript-hint.js +131 -0
- data/server/assets/js/jquery.codemirror/addon/hint/pig-hint.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/hint/python-hint.js +95 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.css +38 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.js +286 -0
- data/server/assets/js/jquery.codemirror/addon/hint/sql-hint.js +105 -0
- data/server/assets/js/jquery.codemirror/addon/hint/xml-hint.js +69 -0
- data/server/assets/js/jquery.codemirror/addon/lint/coffeescript-lint.js +27 -0
- data/server/assets/js/jquery.codemirror/addon/lint/css-lint.js +19 -0
- data/server/assets/js/jquery.codemirror/addon/lint/javascript-lint.js +126 -0
- data/server/assets/js/jquery.codemirror/addon/lint/json-lint.js +17 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.css +73 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.js +203 -0
- data/server/assets/js/jquery.codemirror/addon/merge/dep/diff_match_patch.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.css +92 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.js +474 -0
- data/server/assets/js/jquery.codemirror/addon/mode/loadmode.js +51 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex.js +101 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex_test.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/mode/overlay.js +59 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/colorize.js +29 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode-standalone.js +136 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.node.js +103 -0
- data/server/assets/js/jquery.codemirror/addon/scroll/scrollpastend.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/search/match-highlighter.js +91 -0
- data/server/assets/js/jquery.codemirror/addon/search/search.js +133 -0
- data/server/assets/js/jquery.codemirror/addon/search/searchcursor.js +143 -0
- data/server/assets/js/jquery.codemirror/addon/selection/active-line.js +39 -0
- data/server/assets/js/jquery.codemirror/addon/selection/mark-selection.js +108 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.css +85 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.js +632 -0
- data/server/assets/js/jquery.codemirror/addon/tern/worker.js +41 -0
- data/server/assets/js/jquery.codemirror/addon/wrap/hardwrap.js +99 -0
- data/server/assets/js/jquery.codemirror/bin/authors.sh +6 -0
- data/server/assets/js/jquery.codemirror/bin/compress +92 -0
- data/server/assets/js/jquery.codemirror/bin/lint +16 -0
- data/server/assets/js/jquery.codemirror/bin/source-highlight +61 -0
- data/server/assets/js/jquery.codemirror/bower.json +15 -0
- data/server/assets/js/jquery.codemirror/demo/activeline.html +78 -0
- data/server/assets/js/jquery.codemirror/demo/anywordhint.html +79 -0
- data/server/assets/js/jquery.codemirror/demo/bidi.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/btree.html +86 -0
- data/server/assets/js/jquery.codemirror/demo/buffers.html +109 -0
- data/server/assets/js/jquery.codemirror/demo/changemode.html +59 -0
- data/server/assets/js/jquery.codemirror/demo/closebrackets.html +63 -0
- data/server/assets/js/jquery.codemirror/demo/closetag.html +40 -0
- data/server/assets/js/jquery.codemirror/demo/complete.html +80 -0
- data/server/assets/js/jquery.codemirror/demo/emacs.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/folding.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/fullscreen.html +130 -0
- data/server/assets/js/jquery.codemirror/demo/hardwrap.html +69 -0
- data/server/assets/js/jquery.codemirror/demo/html5complete.html +54 -0
- data/server/assets/js/jquery.codemirror/demo/indentwrap.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/lint.html +171 -0
- data/server/assets/js/jquery.codemirror/demo/loadmode.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/marker.html +52 -0
- data/server/assets/js/jquery.codemirror/demo/markselection.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/matchhighlighter.html +47 -0
- data/server/assets/js/jquery.codemirror/demo/matchtags.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/merge.html +82 -0
- data/server/assets/js/jquery.codemirror/demo/multiplex.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/mustache.html +68 -0
- data/server/assets/js/jquery.codemirror/demo/placeholder.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/preview.html +88 -0
- data/server/assets/js/jquery.codemirror/demo/resize.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/runmode.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/search.html +94 -0
- data/server/assets/js/jquery.codemirror/demo/spanaffectswrapping_shim.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/tern.html +129 -0
- data/server/assets/js/jquery.codemirror/demo/theme.html +121 -0
- data/server/assets/js/jquery.codemirror/demo/trailingspace.html +48 -0
- data/server/assets/js/jquery.codemirror/demo/variableheight.html +67 -0
- data/server/assets/js/jquery.codemirror/demo/vim.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/visibletabs.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/widget.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/xmlcomplete.html +116 -0
- data/server/assets/js/jquery.codemirror/index.html +192 -0
- data/server/assets/js/jquery.codemirror/keymap/emacs.js +387 -0
- data/server/assets/js/jquery.codemirror/keymap/extra.js +43 -0
- data/server/assets/js/jquery.codemirror/keymap/vim.js +3703 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.css +263 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.js +5944 -0
- data/server/assets/js/jquery.codemirror/mode/apl/apl.js +160 -0
- data/server/assets/js/jquery.codemirror/mode/apl/index.html +72 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/asterisk.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/index.html +154 -0
- data/server/assets/js/jquery.codemirror/mode/clike/clike.js +362 -0
- data/server/assets/js/jquery.codemirror/mode/clike/index.html +195 -0
- data/server/assets/js/jquery.codemirror/mode/clike/scala.html +767 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/clojure.js +224 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/index.html +88 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/cobol.js +240 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/coffeescript.js +354 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/index.html +740 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/commonlisp.js +105 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/index.html +177 -0
- data/server/assets/js/jquery.codemirror/mode/css/css.js +639 -0
- data/server/assets/js/jquery.codemirror/mode/css/index.html +70 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss.html +157 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss_test.js +93 -0
- data/server/assets/js/jquery.codemirror/mode/css/test.js +142 -0
- data/server/assets/js/jquery.codemirror/mode/d/d.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/d/index.html +273 -0
- data/server/assets/js/jquery.codemirror/mode/diff/diff.js +32 -0
- data/server/assets/js/jquery.codemirror/mode/diff/index.html +117 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/dtd.js +127 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/index.html +89 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/ecl.js +192 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/eiffel.js +147 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/index.html +430 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/erlang.js +484 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/fortran.js +173 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/index.html +81 -0
- data/server/assets/js/jquery.codemirror/mode/gas/gas.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/gas/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/gfm.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/index.html +82 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/test.js +112 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/gherkin.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/index.html +48 -0
- data/server/assets/js/jquery.codemirror/mode/go/go.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/go/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/groovy.js +211 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/index.html +84 -0
- data/server/assets/js/jquery.codemirror/mode/haml/haml.js +153 -0
- data/server/assets/js/jquery.codemirror/mode/haml/index.html +79 -0
- data/server/assets/js/jquery.codemirror/mode/haml/test.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/haskell.js +250 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/haxe.js +429 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/index.html +60 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/htmlmixed.js +104 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/http/http.js +98 -0
- data/server/assets/js/jquery.codemirror/mode/http/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/jade/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/jade/jade.js +90 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/index.html +107 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/javascript.js +617 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/test.js +72 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/typescript.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/index.html +50 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/jinja2.js +42 -0
- data/server/assets/js/jquery.codemirror/mode/julia/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/julia/julia.js +262 -0
- data/server/assets/js/jquery.codemirror/mode/less/index.html +753 -0
- data/server/assets/js/jquery.codemirror/mode/less/less.js +346 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/index.html +459 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.js +267 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.ls +266 -0
- data/server/assets/js/jquery.codemirror/mode/lua/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/lua/lua.js +144 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/index.html +359 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/markdown.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/test.js +664 -0
- data/server/assets/js/jquery.codemirror/mode/meta.js +91 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/index.html +161 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/mirc.js +177 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/index.html +181 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/nginx.js +163 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/ntriples.js +170 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/index.html +146 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/ocaml.js +116 -0
- data/server/assets/js/jquery.codemirror/mode/octave/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/octave/octave.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/pascal.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/pegjs.js +103 -0
- data/server/assets/js/jquery.codemirror/mode/perl/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/perl/perl.js +816 -0
- data/server/assets/js/jquery.codemirror/mode/php/index.html +62 -0
- data/server/assets/js/jquery.codemirror/mode/php/php.js +132 -0
- data/server/assets/js/jquery.codemirror/mode/pig/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/pig/pig.js +171 -0
- data/server/assets/js/jquery.codemirror/mode/properties/index.html +53 -0
- data/server/assets/js/jquery.codemirror/mode/properties/properties.js +63 -0
- data/server/assets/js/jquery.codemirror/mode/python/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/python/python.js +368 -0
- data/server/assets/js/jquery.codemirror/mode/q/index.html +144 -0
- data/server/assets/js/jquery.codemirror/mode/q/q.js +124 -0
- data/server/assets/js/jquery.codemirror/mode/r/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/r/r.js +141 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/changes.js +19 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/index.html +67 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.css +5 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.js +66 -0
- data/server/assets/js/jquery.codemirror/mode/rst/index.html +534 -0
- data/server/assets/js/jquery.codemirror/mode/rst/rst.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/index.html +185 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/ruby.js +247 -0
- data/server/assets/js/jquery.codemirror/mode/rust/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/rust/rust.js +436 -0
- data/server/assets/js/jquery.codemirror/mode/sass/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/sass/sass.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/index.html +77 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/scheme.js +232 -0
- data/server/assets/js/jquery.codemirror/mode/shell/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/shell/shell.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/index.html +93 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/sieve.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/smalltalk.js +151 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/index.html +136 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/smarty.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/smartymixed.js +175 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/index.html +54 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/sparql.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/sql/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/sql/sql.js +365 -0
- data/server/assets/js/jquery.codemirror/mode/stex/index.html +110 -0
- data/server/assets/js/jquery.codemirror/mode/stex/stex.js +246 -0
- data/server/assets/js/jquery.codemirror/mode/stex/test.js +120 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/index.html +143 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/tcl.js +131 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/index.html +155 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.css +26 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.js +308 -0
- data/server/assets/js/jquery.codemirror/mode/toml/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/toml/toml.js +71 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/index.html +51 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/turtle.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/vb/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/vb/vb.js +259 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/vbscript.js +334 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/index.html +119 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/velocity.js +186 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/index.html +132 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/verilog.js +182 -0
- data/server/assets/js/jquery.codemirror/mode/xml/index.html +57 -0
- data/server/assets/js/jquery.codemirror/mode/xml/xml.js +345 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/test.js +64 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/xquery.js +432 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/index.html +80 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/yaml.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/z80/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/z80/z80.js +85 -0
- data/server/assets/js/jquery.codemirror/package.json +19 -0
- data/server/assets/js/jquery.codemirror/test/comment_test.js +51 -0
- data/server/assets/js/jquery.codemirror/test/doc_test.js +329 -0
- data/server/assets/js/jquery.codemirror/test/driver.js +139 -0
- data/server/assets/js/jquery.codemirror/test/emacs_test.js +135 -0
- data/server/assets/js/jquery.codemirror/test/index.html +209 -0
- data/server/assets/js/jquery.codemirror/test/lint/acorn.js +1593 -0
- data/server/assets/js/jquery.codemirror/test/lint/lint.js +139 -0
- data/server/assets/js/jquery.codemirror/test/lint/walk.js +216 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.css +10 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.js +200 -0
- data/server/assets/js/jquery.codemirror/test/phantom_driver.js +31 -0
- data/server/assets/js/jquery.codemirror/test/run.js +34 -0
- data/server/assets/js/jquery.codemirror/test/test.js +1562 -0
- data/server/assets/js/jquery.codemirror/test/vim_test.js +2391 -0
- data/server/assets/js/jquery.codemirror/theme/3024-day.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/3024-night.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance-mobile.css +5 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance.css +70 -0
- data/server/assets/js/jquery.codemirror/theme/base16-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/base16-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/blackboard.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/cobalt.css +21 -0
- data/server/assets/js/jquery.codemirror/theme/eclipse.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/elegant.css +13 -0
- data/server/assets/js/jquery.codemirror/theme/erlang-dark.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/lesser-dark.css +47 -0
- data/server/assets/js/jquery.codemirror/theme/mbo.css +37 -0
- data/server/assets/js/jquery.codemirror/theme/midnight.css +43 -0
- data/server/assets/js/jquery.codemirror/theme/monokai.css +29 -0
- data/server/assets/js/jquery.codemirror/theme/neat.css +12 -0
- data/server/assets/js/jquery.codemirror/theme/night.css +24 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/rubyblue.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/solarized.css +180 -0
- data/server/assets/js/jquery.codemirror/theme/the-matrix.css +26 -0
- data/server/assets/js/jquery.codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/twilight.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/vibrant-ink.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/xq-dark.css +49 -0
- data/server/assets/js/jquery.codemirror/theme/xq-light.css +43 -0
- data/server/assets/js/jquery.js +4 -0
- data/server/assets/js/jquery.nanoscroller/jquery.nanoscroller.js +2 -0
- data/server/assets/js/jquery.nanoscroller/nanoscroller.css +49 -0
- data/server/assets/js/tester.js +161 -0
- data/server/config.ru +2 -0
- data/server/server.rb +41 -0
- data/server/views/_content.erb +65 -0
- data/server/views/_sidebar.erb +32 -0
- data/server/views/index.erb +40 -0
- metadata +402 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Shell mode</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel=stylesheet href=../../lib/codemirror.css>
|
|
8
|
+
<script src=../../lib/codemirror.js></script>
|
|
9
|
+
<script src="../../addon/edit/matchbrackets.js"></script>
|
|
10
|
+
<script src=shell.js></script>
|
|
11
|
+
<style type=text/css>
|
|
12
|
+
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
|
13
|
+
</style>
|
|
14
|
+
<div id=nav>
|
|
15
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
|
16
|
+
|
|
17
|
+
<ul>
|
|
18
|
+
<li><a href="../../index.html">Home</a>
|
|
19
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
|
20
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
21
|
+
</ul>
|
|
22
|
+
<ul>
|
|
23
|
+
<li><a href="../index.html">Language modes</a>
|
|
24
|
+
<li><a class=active href="#">Shell</a>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<article>
|
|
29
|
+
<h2>Shell mode</h2>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<textarea id=code>
|
|
33
|
+
#!/bin/bash
|
|
34
|
+
|
|
35
|
+
# clone the repository
|
|
36
|
+
git clone http://github.com/garden/tree
|
|
37
|
+
|
|
38
|
+
# generate HTTPS credentials
|
|
39
|
+
cd tree
|
|
40
|
+
openssl genrsa -aes256 -out https.key 1024
|
|
41
|
+
openssl req -new -nodes -key https.key -out https.csr
|
|
42
|
+
openssl x509 -req -days 365 -in https.csr -signkey https.key -out https.crt
|
|
43
|
+
cp https.key{,.orig}
|
|
44
|
+
openssl rsa -in https.key.orig -out https.key
|
|
45
|
+
|
|
46
|
+
# start the server in HTTPS mode
|
|
47
|
+
cd web
|
|
48
|
+
sudo node ../server.js 443 'yes' >> ../node.log &
|
|
49
|
+
|
|
50
|
+
# here is how to stop the server
|
|
51
|
+
for pid in `ps aux | grep 'node ../server.js' | awk '{print $2}'` ; do
|
|
52
|
+
sudo kill -9 $pid 2> /dev/null
|
|
53
|
+
done
|
|
54
|
+
|
|
55
|
+
exit 0</textarea>
|
|
56
|
+
|
|
57
|
+
<script>
|
|
58
|
+
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
|
59
|
+
mode: 'shell',
|
|
60
|
+
lineNumbers: true,
|
|
61
|
+
matchBrackets: true
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<p><strong>MIME types defined:</strong> <code>text/x-sh</code>.</p>
|
|
66
|
+
</article>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
CodeMirror.defineMode('shell', function() {
|
|
2
|
+
|
|
3
|
+
var words = {};
|
|
4
|
+
function define(style, string) {
|
|
5
|
+
var split = string.split(' ');
|
|
6
|
+
for(var i = 0; i < split.length; i++) {
|
|
7
|
+
words[split[i]] = style;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Atoms
|
|
12
|
+
define('atom', 'true false');
|
|
13
|
+
|
|
14
|
+
// Keywords
|
|
15
|
+
define('keyword', 'if then do else elif while until for in esac fi fin ' +
|
|
16
|
+
'fil done exit set unset export function');
|
|
17
|
+
|
|
18
|
+
// Commands
|
|
19
|
+
define('builtin', 'ab awk bash beep cat cc cd chown chmod chroot clear cp ' +
|
|
20
|
+
'curl cut diff echo find gawk gcc get git grep kill killall ln ls make ' +
|
|
21
|
+
'mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh ' +
|
|
22
|
+
'shopt shred source sort sleep ssh start stop su sudo tee telnet top ' +
|
|
23
|
+
'touch vi vim wall wc wget who write yes zsh');
|
|
24
|
+
|
|
25
|
+
function tokenBase(stream, state) {
|
|
26
|
+
|
|
27
|
+
var sol = stream.sol();
|
|
28
|
+
var ch = stream.next();
|
|
29
|
+
|
|
30
|
+
if (ch === '\'' || ch === '"' || ch === '`') {
|
|
31
|
+
state.tokens.unshift(tokenString(ch));
|
|
32
|
+
return tokenize(stream, state);
|
|
33
|
+
}
|
|
34
|
+
if (ch === '#') {
|
|
35
|
+
if (sol && stream.eat('!')) {
|
|
36
|
+
stream.skipToEnd();
|
|
37
|
+
return 'meta'; // 'comment'?
|
|
38
|
+
}
|
|
39
|
+
stream.skipToEnd();
|
|
40
|
+
return 'comment';
|
|
41
|
+
}
|
|
42
|
+
if (ch === '$') {
|
|
43
|
+
state.tokens.unshift(tokenDollar);
|
|
44
|
+
return tokenize(stream, state);
|
|
45
|
+
}
|
|
46
|
+
if (ch === '+' || ch === '=') {
|
|
47
|
+
return 'operator';
|
|
48
|
+
}
|
|
49
|
+
if (ch === '-') {
|
|
50
|
+
stream.eat('-');
|
|
51
|
+
stream.eatWhile(/\w/);
|
|
52
|
+
return 'attribute';
|
|
53
|
+
}
|
|
54
|
+
if (/\d/.test(ch)) {
|
|
55
|
+
stream.eatWhile(/\d/);
|
|
56
|
+
if(!/\w/.test(stream.peek())) {
|
|
57
|
+
return 'number';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
stream.eatWhile(/[\w-]/);
|
|
61
|
+
var cur = stream.current();
|
|
62
|
+
if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
|
|
63
|
+
return words.hasOwnProperty(cur) ? words[cur] : null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function tokenString(quote) {
|
|
67
|
+
return function(stream, state) {
|
|
68
|
+
var next, end = false, escaped = false;
|
|
69
|
+
while ((next = stream.next()) != null) {
|
|
70
|
+
if (next === quote && !escaped) {
|
|
71
|
+
end = true;
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
if (next === '$' && !escaped && quote !== '\'') {
|
|
75
|
+
escaped = true;
|
|
76
|
+
stream.backUp(1);
|
|
77
|
+
state.tokens.unshift(tokenDollar);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
escaped = !escaped && next === '\\';
|
|
81
|
+
}
|
|
82
|
+
if (end || !escaped) {
|
|
83
|
+
state.tokens.shift();
|
|
84
|
+
}
|
|
85
|
+
return (quote === '`' || quote === ')' ? 'quote' : 'string');
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
var tokenDollar = function(stream, state) {
|
|
90
|
+
if (state.tokens.length > 1) stream.eat('$');
|
|
91
|
+
var ch = stream.next(), hungry = /\w/;
|
|
92
|
+
if (ch === '{') hungry = /[^}]/;
|
|
93
|
+
if (ch === '(') {
|
|
94
|
+
state.tokens[0] = tokenString(')');
|
|
95
|
+
return tokenize(stream, state);
|
|
96
|
+
}
|
|
97
|
+
if (!/\d/.test(ch)) {
|
|
98
|
+
stream.eatWhile(hungry);
|
|
99
|
+
stream.eat('}');
|
|
100
|
+
}
|
|
101
|
+
state.tokens.shift();
|
|
102
|
+
return 'def';
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
function tokenize(stream, state) {
|
|
106
|
+
return (state.tokens[0] || tokenBase) (stream, state);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
startState: function() {return {tokens:[]};},
|
|
111
|
+
token: function(stream, state) {
|
|
112
|
+
if (stream.eatSpace()) return null;
|
|
113
|
+
return tokenize(stream, state);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
CodeMirror.defineMIME('text/x-sh', 'shell');
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Sieve (RFC5228) mode</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
|
9
|
+
<script src="sieve.js"></script>
|
|
10
|
+
<style>.CodeMirror {background: #f8f8f8;}</style>
|
|
11
|
+
<div id=nav>
|
|
12
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
|
13
|
+
|
|
14
|
+
<ul>
|
|
15
|
+
<li><a href="../../index.html">Home</a>
|
|
16
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
|
17
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
18
|
+
</ul>
|
|
19
|
+
<ul>
|
|
20
|
+
<li><a href="../index.html">Language modes</a>
|
|
21
|
+
<li><a class=active href="#">Sieve (RFC5228)</a>
|
|
22
|
+
</ul>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<article>
|
|
26
|
+
<h2>Sieve (RFC5228) mode</h2>
|
|
27
|
+
<form><textarea id="code" name="code">
|
|
28
|
+
#
|
|
29
|
+
# Example Sieve Filter
|
|
30
|
+
# Declare any optional features or extension used by the script
|
|
31
|
+
#
|
|
32
|
+
|
|
33
|
+
require ["fileinto", "reject"];
|
|
34
|
+
|
|
35
|
+
#
|
|
36
|
+
# Reject any large messages (note that the four leading dots get
|
|
37
|
+
# "stuffed" to three)
|
|
38
|
+
#
|
|
39
|
+
if size :over 1M
|
|
40
|
+
{
|
|
41
|
+
reject text:
|
|
42
|
+
Please do not send me large attachments.
|
|
43
|
+
Put your file on a server and send me the URL.
|
|
44
|
+
Thank you.
|
|
45
|
+
.... Fred
|
|
46
|
+
.
|
|
47
|
+
;
|
|
48
|
+
stop;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#
|
|
52
|
+
# Handle messages from known mailing lists
|
|
53
|
+
# Move messages from IETF filter discussion list to filter folder
|
|
54
|
+
#
|
|
55
|
+
if header :is "Sender" "owner-ietf-mta-filters@imc.org"
|
|
56
|
+
{
|
|
57
|
+
fileinto "filter"; # move to "filter" folder
|
|
58
|
+
}
|
|
59
|
+
#
|
|
60
|
+
# Keep all messages to or from people in my company
|
|
61
|
+
#
|
|
62
|
+
elsif address :domain :is ["From", "To"] "example.com"
|
|
63
|
+
{
|
|
64
|
+
keep; # keep in "In" folder
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#
|
|
68
|
+
# Try and catch unsolicited email. If a message is not to me,
|
|
69
|
+
# or it contains a subject known to be spam, file it away.
|
|
70
|
+
#
|
|
71
|
+
elsif anyof (not address :all :contains
|
|
72
|
+
["To", "Cc", "Bcc"] "me@example.com",
|
|
73
|
+
header :matches "subject"
|
|
74
|
+
["*make*money*fast*", "*university*dipl*mas*"])
|
|
75
|
+
{
|
|
76
|
+
# If message header does not contain my address,
|
|
77
|
+
# it's from a list.
|
|
78
|
+
fileinto "spam"; # move to "spam" folder
|
|
79
|
+
}
|
|
80
|
+
else
|
|
81
|
+
{
|
|
82
|
+
# Move all other (non-company) mail to "personal"
|
|
83
|
+
# folder.
|
|
84
|
+
fileinto "personal";
|
|
85
|
+
}
|
|
86
|
+
</textarea></form>
|
|
87
|
+
<script>
|
|
88
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<p><strong>MIME types defined:</strong> <code>application/sieve</code>.</p>
|
|
92
|
+
|
|
93
|
+
</article>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* See LICENSE in this directory for the license under which this code
|
|
3
|
+
* is released.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
CodeMirror.defineMode("sieve", function(config) {
|
|
7
|
+
function words(str) {
|
|
8
|
+
var obj = {}, words = str.split(" ");
|
|
9
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
|
10
|
+
return obj;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var keywords = words("if elsif else stop require");
|
|
14
|
+
var atoms = words("true false not");
|
|
15
|
+
var indentUnit = config.indentUnit;
|
|
16
|
+
|
|
17
|
+
function tokenBase(stream, state) {
|
|
18
|
+
|
|
19
|
+
var ch = stream.next();
|
|
20
|
+
if (ch == "/" && stream.eat("*")) {
|
|
21
|
+
state.tokenize = tokenCComment;
|
|
22
|
+
return tokenCComment(stream, state);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (ch === '#') {
|
|
26
|
+
stream.skipToEnd();
|
|
27
|
+
return "comment";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (ch == "\"") {
|
|
31
|
+
state.tokenize = tokenString(ch);
|
|
32
|
+
return state.tokenize(stream, state);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (ch == "(") {
|
|
36
|
+
state._indent.push("(");
|
|
37
|
+
// add virtual angel wings so that editor behaves...
|
|
38
|
+
// ...more sane incase of broken brackets
|
|
39
|
+
state._indent.push("{");
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (ch === "{") {
|
|
44
|
+
state._indent.push("{");
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (ch == ")") {
|
|
49
|
+
state._indent.pop();
|
|
50
|
+
state._indent.pop();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (ch === "}") {
|
|
54
|
+
state._indent.pop();
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (ch == ",")
|
|
59
|
+
return null;
|
|
60
|
+
|
|
61
|
+
if (ch == ";")
|
|
62
|
+
return null;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if (/[{}\(\),;]/.test(ch))
|
|
66
|
+
return null;
|
|
67
|
+
|
|
68
|
+
// 1*DIGIT "K" / "M" / "G"
|
|
69
|
+
if (/\d/.test(ch)) {
|
|
70
|
+
stream.eatWhile(/[\d]/);
|
|
71
|
+
stream.eat(/[KkMmGg]/);
|
|
72
|
+
return "number";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// ":" (ALPHA / "_") *(ALPHA / DIGIT / "_")
|
|
76
|
+
if (ch == ":") {
|
|
77
|
+
stream.eatWhile(/[a-zA-Z_]/);
|
|
78
|
+
stream.eatWhile(/[a-zA-Z0-9_]/);
|
|
79
|
+
|
|
80
|
+
return "operator";
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
stream.eatWhile(/\w/);
|
|
84
|
+
var cur = stream.current();
|
|
85
|
+
|
|
86
|
+
// "text:" *(SP / HTAB) (hash-comment / CRLF)
|
|
87
|
+
// *(multiline-literal / multiline-dotstart)
|
|
88
|
+
// "." CRLF
|
|
89
|
+
if ((cur == "text") && stream.eat(":"))
|
|
90
|
+
{
|
|
91
|
+
state.tokenize = tokenMultiLineString;
|
|
92
|
+
return "string";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (keywords.propertyIsEnumerable(cur))
|
|
96
|
+
return "keyword";
|
|
97
|
+
|
|
98
|
+
if (atoms.propertyIsEnumerable(cur))
|
|
99
|
+
return "atom";
|
|
100
|
+
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function tokenMultiLineString(stream, state)
|
|
105
|
+
{
|
|
106
|
+
state._multiLineString = true;
|
|
107
|
+
// the first line is special it may contain a comment
|
|
108
|
+
if (!stream.sol()) {
|
|
109
|
+
stream.eatSpace();
|
|
110
|
+
|
|
111
|
+
if (stream.peek() == "#") {
|
|
112
|
+
stream.skipToEnd();
|
|
113
|
+
return "comment";
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
stream.skipToEnd();
|
|
117
|
+
return "string";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if ((stream.next() == ".") && (stream.eol()))
|
|
121
|
+
{
|
|
122
|
+
state._multiLineString = false;
|
|
123
|
+
state.tokenize = tokenBase;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return "string";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function tokenCComment(stream, state) {
|
|
130
|
+
var maybeEnd = false, ch;
|
|
131
|
+
while ((ch = stream.next()) != null) {
|
|
132
|
+
if (maybeEnd && ch == "/") {
|
|
133
|
+
state.tokenize = tokenBase;
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
maybeEnd = (ch == "*");
|
|
137
|
+
}
|
|
138
|
+
return "comment";
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function tokenString(quote) {
|
|
142
|
+
return function(stream, state) {
|
|
143
|
+
var escaped = false, ch;
|
|
144
|
+
while ((ch = stream.next()) != null) {
|
|
145
|
+
if (ch == quote && !escaped)
|
|
146
|
+
break;
|
|
147
|
+
escaped = !escaped && ch == "\\";
|
|
148
|
+
}
|
|
149
|
+
if (!escaped) state.tokenize = tokenBase;
|
|
150
|
+
return "string";
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
startState: function(base) {
|
|
156
|
+
return {tokenize: tokenBase,
|
|
157
|
+
baseIndent: base || 0,
|
|
158
|
+
_indent: []};
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
token: function(stream, state) {
|
|
162
|
+
if (stream.eatSpace())
|
|
163
|
+
return null;
|
|
164
|
+
|
|
165
|
+
return (state.tokenize || tokenBase)(stream, state);;
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
indent: function(state, _textAfter) {
|
|
169
|
+
var length = state._indent.length;
|
|
170
|
+
if (_textAfter && (_textAfter[0] == "}"))
|
|
171
|
+
length--;
|
|
172
|
+
|
|
173
|
+
if (length <0)
|
|
174
|
+
length = 0;
|
|
175
|
+
|
|
176
|
+
return length * indentUnit;
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
electricChars: "}"
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
CodeMirror.defineMIME("application/sieve", "sieve");
|