administrate-field-simple_mde_markdown 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +72 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +196 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +8 -0
- data/administrate-field-simple_mde_markdown.gemspec +31 -0
- data/app/assets/javascripts/administrate-field-simple_mde_markdown/application.js +6 -0
- data/app/assets/stylesheets/administrate-field-simple_mde_markdown/application.css +3 -0
- data/app/views/fields/simple_mde_markdown/_form.html.erb +6 -0
- data/app/views/fields/simple_mde_markdown/_index.html.erb +1 -0
- data/app/views/fields/simple_mde_markdown/_show.html.erb +1 -0
- data/lib/administrate/field/simple_mde_markdown.rb +31 -0
- data/node_modules/.bin/marked +1 -0
- data/node_modules/codemirror-spell-checker/.eslintrc +23 -0
- data/node_modules/codemirror-spell-checker/.npmignore +2 -0
- data/node_modules/codemirror-spell-checker/.travis.yml +18 -0
- data/node_modules/codemirror-spell-checker/CONTRIBUTING 2.md +10 -0
- data/node_modules/codemirror-spell-checker/CONTRIBUTING.md +10 -0
- data/node_modules/codemirror-spell-checker/LICENSE +22 -0
- data/node_modules/codemirror-spell-checker/README.md +50 -0
- data/node_modules/codemirror-spell-checker/bower.json +27 -0
- data/node_modules/codemirror-spell-checker/debug/.spell-checker 2.css.icloud +0 -0
- data/node_modules/codemirror-spell-checker/debug/spell-checker.css +9 -0
- data/node_modules/codemirror-spell-checker/debug/spell-checker.debug.js +2844 -0
- data/node_modules/codemirror-spell-checker/debug/spell-checker.js +2841 -0
- data/node_modules/codemirror-spell-checker/dist/.spell-checker.min 2.css.icloud +0 -0
- data/node_modules/codemirror-spell-checker/dist/en_US.aff +201 -0
- data/node_modules/codemirror-spell-checker/dist/en_US.dic +62120 -0
- data/node_modules/codemirror-spell-checker/dist/spell-checker.min 2.js +7 -0
- data/node_modules/codemirror-spell-checker/dist/spell-checker.min.css +7 -0
- data/node_modules/codemirror-spell-checker/dist/spell-checker.min.js +7 -0
- data/node_modules/codemirror-spell-checker/gulpfile.js +94 -0
- data/node_modules/codemirror-spell-checker/package.json +75 -0
- data/node_modules/codemirror-spell-checker/src/css/spell-checker.css +3 -0
- data/node_modules/codemirror-spell-checker/src/data/en_US.aff +201 -0
- data/node_modules/codemirror-spell-checker/src/data/en_US.dic +62120 -0
- data/node_modules/codemirror-spell-checker/src/js/spell-checker.js +119 -0
- data/node_modules/codemirror/.package 2.json.icloud +0 -0
- data/node_modules/codemirror/AUTHORS +773 -0
- data/node_modules/codemirror/CHANGELOG.md +1486 -0
- data/node_modules/codemirror/CONTRIBUTING.md +92 -0
- data/node_modules/codemirror/LICENSE +21 -0
- data/node_modules/codemirror/README.md +49 -0
- data/node_modules/codemirror/addon/comment/comment.js +209 -0
- data/node_modules/codemirror/addon/comment/continuecomment.js +78 -0
- data/node_modules/codemirror/addon/dialog/dialog.css +32 -0
- data/node_modules/codemirror/addon/dialog/dialog.js +161 -0
- data/node_modules/codemirror/addon/display/autorefresh.js +47 -0
- data/node_modules/codemirror/addon/display/fullscreen.css +6 -0
- data/node_modules/codemirror/addon/display/fullscreen.js +41 -0
- data/node_modules/codemirror/addon/display/panel.js +127 -0
- data/node_modules/codemirror/addon/display/placeholder.js +63 -0
- data/node_modules/codemirror/addon/display/rulers.js +51 -0
- data/node_modules/codemirror/addon/edit/closebrackets.js +187 -0
- data/node_modules/codemirror/addon/edit/closetag.js +175 -0
- data/node_modules/codemirror/addon/edit/continuelist.js +89 -0
- data/node_modules/codemirror/addon/edit/matchbrackets.js +145 -0
- data/node_modules/codemirror/addon/edit/matchtags.js +66 -0
- data/node_modules/codemirror/addon/edit/trailingspace.js +27 -0
- data/node_modules/codemirror/addon/fold/brace-fold.js +105 -0
- data/node_modules/codemirror/addon/fold/comment-fold.js +59 -0
- data/node_modules/codemirror/addon/fold/foldcode.js +152 -0
- data/node_modules/codemirror/addon/fold/foldgutter.css +20 -0
- data/node_modules/codemirror/addon/fold/foldgutter.js +146 -0
- data/node_modules/codemirror/addon/fold/indent-fold.js +48 -0
- data/node_modules/codemirror/addon/fold/markdown-fold.js +49 -0
- data/node_modules/codemirror/addon/fold/xml-fold.js +184 -0
- data/node_modules/codemirror/addon/hint/anyword-hint.js +41 -0
- data/node_modules/codemirror/addon/hint/css-hint.js +60 -0
- data/node_modules/codemirror/addon/hint/html-hint.js +348 -0
- data/node_modules/codemirror/addon/hint/javascript-hint.js +157 -0
- data/node_modules/codemirror/addon/hint/show-hint.css +36 -0
- data/node_modules/codemirror/addon/hint/show-hint.js +434 -0
- data/node_modules/codemirror/addon/hint/sql-hint.js +299 -0
- data/node_modules/codemirror/addon/hint/xml-hint.js +110 -0
- data/node_modules/codemirror/addon/lint/coffeescript-lint.js +47 -0
- data/node_modules/codemirror/addon/lint/css-lint.js +40 -0
- data/node_modules/codemirror/addon/lint/html-lint.js +53 -0
- data/node_modules/codemirror/addon/lint/javascript-lint.js +63 -0
- data/node_modules/codemirror/addon/lint/json-lint.js +40 -0
- data/node_modules/codemirror/addon/lint/lint.css +73 -0
- data/node_modules/codemirror/addon/lint/lint.js +252 -0
- data/node_modules/codemirror/addon/lint/yaml-lint.js +41 -0
- data/node_modules/codemirror/addon/merge/merge.css +119 -0
- data/node_modules/codemirror/addon/merge/merge.js +1002 -0
- data/node_modules/codemirror/addon/mode/loadmode.js +64 -0
- data/node_modules/codemirror/addon/mode/multiplex.js +131 -0
- data/node_modules/codemirror/addon/mode/multiplex_test.js +33 -0
- data/node_modules/codemirror/addon/mode/overlay.js +90 -0
- data/node_modules/codemirror/addon/mode/simple.js +216 -0
- data/node_modules/codemirror/addon/runmode/colorize.js +40 -0
- data/node_modules/codemirror/addon/runmode/runmode-standalone.js +158 -0
- data/node_modules/codemirror/addon/runmode/runmode.js +72 -0
- data/node_modules/codemirror/addon/runmode/runmode.node.js +197 -0
- data/node_modules/codemirror/addon/scroll/annotatescrollbar.js +122 -0
- data/node_modules/codemirror/addon/scroll/scrollpastend.js +48 -0
- data/node_modules/codemirror/addon/scroll/simplescrollbars.css +66 -0
- data/node_modules/codemirror/addon/scroll/simplescrollbars.js +152 -0
- data/node_modules/codemirror/addon/search/jump-to-line.js +50 -0
- data/node_modules/codemirror/addon/search/match-highlighter.js +165 -0
- data/node_modules/codemirror/addon/search/matchesonscrollbar.css +8 -0
- data/node_modules/codemirror/addon/search/matchesonscrollbar.js +97 -0
- data/node_modules/codemirror/addon/search/search.js +258 -0
- data/node_modules/codemirror/addon/search/searchcursor.js +293 -0
- data/node_modules/codemirror/addon/selection/active-line.js +72 -0
- data/node_modules/codemirror/addon/selection/mark-selection.js +119 -0
- data/node_modules/codemirror/addon/selection/selection-pointer.js +98 -0
- data/node_modules/codemirror/addon/tern/tern.css +87 -0
- data/node_modules/codemirror/addon/tern/tern.js +718 -0
- data/node_modules/codemirror/addon/tern/worker.js +44 -0
- data/node_modules/codemirror/addon/wrap/hardwrap.js +145 -0
- data/node_modules/codemirror/bin/source-highlight +48 -0
- data/node_modules/codemirror/keymap/emacs.js +417 -0
- data/node_modules/codemirror/keymap/sublime.js +691 -0
- data/node_modules/codemirror/keymap/vim.js +5467 -0
- data/node_modules/codemirror/lib/codemirror.css +346 -0
- data/node_modules/codemirror/lib/codemirror.js +9698 -0
- data/node_modules/codemirror/mode/apl/apl.js +174 -0
- data/node_modules/codemirror/mode/asciiarmor/asciiarmor.js +74 -0
- data/node_modules/codemirror/mode/asn.1/asn.1.js +204 -0
- data/node_modules/codemirror/mode/asterisk/asterisk.js +196 -0
- data/node_modules/codemirror/mode/brainfuck/brainfuck.js +85 -0
- data/node_modules/codemirror/mode/clike/clike.js +879 -0
- data/node_modules/codemirror/mode/clojure/clojure.js +292 -0
- data/node_modules/codemirror/mode/cmake/cmake.js +97 -0
- data/node_modules/codemirror/mode/cobol/cobol.js +255 -0
- data/node_modules/codemirror/mode/coffeescript/coffeescript.js +359 -0
- data/node_modules/codemirror/mode/commonlisp/commonlisp.js +124 -0
- data/node_modules/codemirror/mode/crystal/crystal.js +433 -0
- data/node_modules/codemirror/mode/css/css.js +832 -0
- data/node_modules/codemirror/mode/cypher/cypher.js +150 -0
- data/node_modules/codemirror/mode/d/d.js +223 -0
- data/node_modules/codemirror/mode/dart/dart.js +157 -0
- data/node_modules/codemirror/mode/diff/diff.js +47 -0
- data/node_modules/codemirror/mode/django/django.js +356 -0
- data/node_modules/codemirror/mode/dockerfile/dockerfile.js +211 -0
- data/node_modules/codemirror/mode/dtd/dtd.js +142 -0
- data/node_modules/codemirror/mode/dylan/dylan.js +352 -0
- data/node_modules/codemirror/mode/ebnf/ebnf.js +195 -0
- data/node_modules/codemirror/mode/ecl/ecl.js +206 -0
- data/node_modules/codemirror/mode/eiffel/eiffel.js +160 -0
- data/node_modules/codemirror/mode/elm/elm.js +205 -0
- data/node_modules/codemirror/mode/erlang/erlang.js +619 -0
- data/node_modules/codemirror/mode/factor/factor.js +85 -0
- data/node_modules/codemirror/mode/fcl/fcl.js +173 -0
- data/node_modules/codemirror/mode/forth/forth.js +180 -0
- data/node_modules/codemirror/mode/fortran/fortran.js +188 -0
- data/node_modules/codemirror/mode/gas/gas.js +345 -0
- data/node_modules/codemirror/mode/gfm/gfm.js +129 -0
- data/node_modules/codemirror/mode/gherkin/gherkin.js +178 -0
- data/node_modules/codemirror/mode/go/go.js +187 -0
- data/node_modules/codemirror/mode/groovy/groovy.js +230 -0
- data/node_modules/codemirror/mode/haml/haml.js +161 -0
- data/node_modules/codemirror/mode/handlebars/handlebars.js +66 -0
- data/node_modules/codemirror/mode/haskell-literate/haskell-literate.js +43 -0
- data/node_modules/codemirror/mode/haskell/haskell.js +268 -0
- data/node_modules/codemirror/mode/haxe/haxe.js +515 -0
- data/node_modules/codemirror/mode/htmlembedded/htmlembedded.js +37 -0
- data/node_modules/codemirror/mode/htmlmixed/htmlmixed.js +152 -0
- data/node_modules/codemirror/mode/http/http.js +113 -0
- data/node_modules/codemirror/mode/idl/idl.js +290 -0
- data/node_modules/codemirror/mode/javascript/javascript.js +899 -0
- data/node_modules/codemirror/mode/jinja2/jinja2.js +144 -0
- data/node_modules/codemirror/mode/jsx/jsx.js +148 -0
- data/node_modules/codemirror/mode/julia/julia.js +433 -0
- data/node_modules/codemirror/mode/livescript/livescript.js +280 -0
- data/node_modules/codemirror/mode/lua/lua.js +159 -0
- data/node_modules/codemirror/mode/markdown/markdown.js +884 -0
- data/node_modules/codemirror/mode/mathematica/mathematica.js +176 -0
- data/node_modules/codemirror/mode/mbox/mbox.js +129 -0
- data/node_modules/codemirror/mode/meta.js +217 -0
- data/node_modules/codemirror/mode/mirc/mirc.js +193 -0
- data/node_modules/codemirror/mode/mllike/mllike.js +359 -0
- data/node_modules/codemirror/mode/modelica/modelica.js +245 -0
- data/node_modules/codemirror/mode/mscgen/mscgen.js +175 -0
- data/node_modules/codemirror/mode/mumps/mumps.js +148 -0
- data/node_modules/codemirror/mode/nginx/nginx.js +178 -0
- data/node_modules/codemirror/mode/nsis/nsis.js +95 -0
- data/node_modules/codemirror/mode/ntriples/ntriples.js +195 -0
- data/node_modules/codemirror/mode/octave/octave.js +139 -0
- data/node_modules/codemirror/mode/oz/oz.js +252 -0
- data/node_modules/codemirror/mode/pascal/pascal.js +121 -0
- data/node_modules/codemirror/mode/pegjs/pegjs.js +114 -0
- data/node_modules/codemirror/mode/perl/perl.js +837 -0
- data/node_modules/codemirror/mode/php/php.js +234 -0
- data/node_modules/codemirror/mode/pig/pig.js +178 -0
- data/node_modules/codemirror/mode/powershell/powershell.js +398 -0
- data/node_modules/codemirror/mode/properties/properties 2.js +78 -0
- data/node_modules/codemirror/mode/properties/properties.js +78 -0
- data/node_modules/codemirror/mode/protobuf/protobuf.js +69 -0
- data/node_modules/codemirror/mode/pug/pug.js +591 -0
- data/node_modules/codemirror/mode/puppet/puppet.js +220 -0
- data/node_modules/codemirror/mode/python/python.js +409 -0
- data/node_modules/codemirror/mode/q/q.js +139 -0
- data/node_modules/codemirror/mode/r/r.js +190 -0
- data/node_modules/codemirror/mode/rpm/changes/index.html +66 -0
- data/node_modules/codemirror/mode/rpm/rpm.js +109 -0
- data/node_modules/codemirror/mode/rst/rst.js +557 -0
- data/node_modules/codemirror/mode/ruby/ruby.js +296 -0
- data/node_modules/codemirror/mode/rust/rust.js +72 -0
- data/node_modules/codemirror/mode/sas/sas.js +303 -0
- data/node_modules/codemirror/mode/sass/sass.js +454 -0
- data/node_modules/codemirror/mode/scheme/scheme.js +265 -0
- data/node_modules/codemirror/mode/shell/shell.js +152 -0
- data/node_modules/codemirror/mode/sieve/sieve.js +193 -0
- data/node_modules/codemirror/mode/slim/slim.js +575 -0
- data/node_modules/codemirror/mode/smalltalk/smalltalk.js +168 -0
- data/node_modules/codemirror/mode/smarty/smarty.js +225 -0
- data/node_modules/codemirror/mode/solr/solr.js +104 -0
- data/node_modules/codemirror/mode/soy/soy 2.js +359 -0
- data/node_modules/codemirror/mode/soy/soy.js +235 -0
- data/node_modules/codemirror/mode/sparql/sparql.js +180 -0
- data/node_modules/codemirror/mode/spreadsheet/spreadsheet.js +112 -0
- data/node_modules/codemirror/mode/sql/sql.js +499 -0
- data/node_modules/codemirror/mode/stex/stex.js +264 -0
- data/node_modules/codemirror/mode/stylus/stylus.js +771 -0
- data/node_modules/codemirror/mode/swift/swift.js +219 -0
- data/node_modules/codemirror/mode/tcl/tcl.js +139 -0
- data/node_modules/codemirror/mode/textile/textile.js +469 -0
- data/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.js +308 -0
- data/node_modules/codemirror/mode/tiki/tiki.css +26 -0
- data/node_modules/codemirror/mode/tiki/tiki.js +312 -0
- data/node_modules/codemirror/mode/toml/toml.js +88 -0
- data/node_modules/codemirror/mode/tornado/tornado.js +68 -0
- data/node_modules/codemirror/mode/troff/troff.js +84 -0
- data/node_modules/codemirror/mode/ttcn-cfg/ttcn-cfg.js +214 -0
- data/node_modules/codemirror/mode/ttcn/ttcn.js +283 -0
- data/node_modules/codemirror/mode/turtle/turtle.js +162 -0
- data/node_modules/codemirror/mode/twig/twig.js +141 -0
- data/node_modules/codemirror/mode/vb/vb.js +275 -0
- data/node_modules/codemirror/mode/vbscript/vbscript.js +350 -0
- data/node_modules/codemirror/mode/velocity/velocity.js +201 -0
- data/node_modules/codemirror/mode/verilog/verilog.js +675 -0
- data/node_modules/codemirror/mode/vhdl/vhdl.js +189 -0
- data/node_modules/codemirror/mode/vue/vue.js +77 -0
- data/node_modules/codemirror/mode/webidl/webidl.js +195 -0
- data/node_modules/codemirror/mode/xml/xml.js +402 -0
- data/node_modules/codemirror/mode/xquery/xquery.js +448 -0
- data/node_modules/codemirror/mode/yacas/yacas.js +204 -0
- data/node_modules/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +68 -0
- data/node_modules/codemirror/mode/yaml/yaml.js +120 -0
- data/node_modules/codemirror/mode/z80/z80.js +116 -0
- data/node_modules/codemirror/package.json +2395 -0
- data/node_modules/codemirror/rollup.config.js +20 -0
- data/node_modules/codemirror/src/codemirror.js +3 -0
- data/node_modules/codemirror/src/display/Display.js +106 -0
- data/node_modules/codemirror/src/display/focus.js +47 -0
- data/node_modules/codemirror/src/display/gutters.js +34 -0
- data/node_modules/codemirror/src/display/highlight_worker.js +55 -0
- data/node_modules/codemirror/src/display/line_numbers.js +48 -0
- data/node_modules/codemirror/src/display/mode_state.js +22 -0
- data/node_modules/codemirror/src/display/operations.js +205 -0
- data/node_modules/codemirror/src/display/scroll_events.js +115 -0
- data/node_modules/codemirror/src/display/scrollbars.js +193 -0
- data/node_modules/codemirror/src/display/scrolling.js +184 -0
- data/node_modules/codemirror/src/display/selection.js +158 -0
- data/node_modules/codemirror/src/display/update_display.js +260 -0
- data/node_modules/codemirror/src/display/update_line.js +188 -0
- data/node_modules/codemirror/src/display/update_lines.js +64 -0
- data/node_modules/codemirror/src/display/view_tracking.js +153 -0
- data/node_modules/codemirror/src/edit/CodeMirror.js +215 -0
- data/node_modules/codemirror/src/edit/commands.js +178 -0
- data/node_modules/codemirror/src/edit/deleteNearSelection.js +30 -0
- data/node_modules/codemirror/src/edit/drop_events.js +119 -0
- data/node_modules/codemirror/src/edit/fromTextArea.js +61 -0
- data/node_modules/codemirror/src/edit/global_events.js +42 -0
- data/node_modules/codemirror/src/edit/key_events.js +159 -0
- data/node_modules/codemirror/src/edit/legacy.js +62 -0
- data/node_modules/codemirror/src/edit/main.js +69 -0
- data/node_modules/codemirror/src/edit/methods.js +544 -0
- data/node_modules/codemirror/src/edit/mouse_events.js +407 -0
- data/node_modules/codemirror/src/edit/options.js +193 -0
- data/node_modules/codemirror/src/edit/utils.js +7 -0
- data/node_modules/codemirror/src/input/ContentEditableInput.js +527 -0
- data/node_modules/codemirror/src/input/TextareaInput.js +355 -0
- data/node_modules/codemirror/src/input/indent.js +71 -0
- data/node_modules/codemirror/src/input/input.js +135 -0
- data/node_modules/codemirror/src/input/keymap.js +148 -0
- data/node_modules/codemirror/src/input/keynames.js +17 -0
- data/node_modules/codemirror/src/input/movement.js +110 -0
- data/node_modules/codemirror/src/line/highlight.js +284 -0
- data/node_modules/codemirror/src/line/line_data.js +339 -0
- data/node_modules/codemirror/src/line/pos.js +40 -0
- data/node_modules/codemirror/src/line/saw_special_spans.js +10 -0
- data/node_modules/codemirror/src/line/spans.js +382 -0
- data/node_modules/codemirror/src/line/utils_line.js +85 -0
- data/node_modules/codemirror/src/measurement/position_measurement.js +699 -0
- data/node_modules/codemirror/src/measurement/widgets.js +26 -0
- data/node_modules/codemirror/src/model/Doc.js +432 -0
- data/node_modules/codemirror/src/model/change_measurement.js +61 -0
- data/node_modules/codemirror/src/model/changes.js +333 -0
- data/node_modules/codemirror/src/model/chunk.js +167 -0
- data/node_modules/codemirror/src/model/document_data.js +111 -0
- data/node_modules/codemirror/src/model/history.js +228 -0
- data/node_modules/codemirror/src/model/line_widget.js +78 -0
- data/node_modules/codemirror/src/model/mark_text.js +292 -0
- data/node_modules/codemirror/src/model/selection.js +84 -0
- data/node_modules/codemirror/src/model/selection_updates.js +208 -0
- data/node_modules/codemirror/src/modes.js +96 -0
- data/node_modules/codemirror/src/util/StringStream.js +90 -0
- data/node_modules/codemirror/src/util/bidi.js +214 -0
- data/node_modules/codemirror/src/util/browser.js +33 -0
- data/node_modules/codemirror/src/util/dom.js +97 -0
- data/node_modules/codemirror/src/util/event.js +103 -0
- data/node_modules/codemirror/src/util/feature_detection.js +84 -0
- data/node_modules/codemirror/src/util/misc.js +150 -0
- data/node_modules/codemirror/src/util/operation_group.js +72 -0
- data/node_modules/codemirror/theme/3024-day.css +41 -0
- data/node_modules/codemirror/theme/3024-night.css +39 -0
- data/node_modules/codemirror/theme/abcdef.css +32 -0
- data/node_modules/codemirror/theme/ambiance-mobile.css +5 -0
- data/node_modules/codemirror/theme/ambiance.css +74 -0
- data/node_modules/codemirror/theme/base16-dark.css +38 -0
- data/node_modules/codemirror/theme/base16-light.css +38 -0
- data/node_modules/codemirror/theme/bespin.css +34 -0
- data/node_modules/codemirror/theme/blackboard.css +32 -0
- data/node_modules/codemirror/theme/cobalt.css +25 -0
- data/node_modules/codemirror/theme/colorforth.css +33 -0
- data/node_modules/codemirror/theme/darcula.css +46 -0
- data/node_modules/codemirror/theme/dracula.css +40 -0
- data/node_modules/codemirror/theme/duotone-dark.css +35 -0
- data/node_modules/codemirror/theme/duotone-light.css +36 -0
- data/node_modules/codemirror/theme/eclipse.css +23 -0
- data/node_modules/codemirror/theme/elegant.css +13 -0
- data/node_modules/codemirror/theme/erlang-dark.css +34 -0
- data/node_modules/codemirror/theme/gruvbox-dark.css +37 -0
- data/node_modules/codemirror/theme/hopscotch.css +34 -0
- data/node_modules/codemirror/theme/icecoder.css +43 -0
- data/node_modules/codemirror/theme/idea.css +42 -0
- data/node_modules/codemirror/theme/isotope.css +34 -0
- data/node_modules/codemirror/theme/lesser-dark.css +47 -0
- data/node_modules/codemirror/theme/liquibyte.css +95 -0
- data/node_modules/codemirror/theme/lucario.css +37 -0
- data/node_modules/codemirror/theme/material.css +53 -0
- data/node_modules/codemirror/theme/mbo.css +37 -0
- data/node_modules/codemirror/theme/mdn-like.css +46 -0
- data/node_modules/codemirror/theme/midnight.css +43 -0
- data/node_modules/codemirror/theme/monokai.css +41 -0
- data/node_modules/codemirror/theme/neat.css +12 -0
- data/node_modules/codemirror/theme/neo.css +43 -0
- data/node_modules/codemirror/theme/night.css +27 -0
- data/node_modules/codemirror/theme/oceanic-next.css +44 -0
- data/node_modules/codemirror/theme/panda-syntax.css +85 -0
- data/node_modules/codemirror/theme/paraiso-dark.css +38 -0
- data/node_modules/codemirror/theme/paraiso-light.css +38 -0
- data/node_modules/codemirror/theme/pastel-on-dark.css +52 -0
- data/node_modules/codemirror/theme/railscasts.css +34 -0
- data/node_modules/codemirror/theme/rubyblue.css +25 -0
- data/node_modules/codemirror/theme/seti.css +44 -0
- data/node_modules/codemirror/theme/shadowfox.css +52 -0
- data/node_modules/codemirror/theme/solarized.css +168 -0
- data/node_modules/codemirror/theme/ssms.css +16 -0
- data/node_modules/codemirror/theme/the-matrix.css +30 -0
- data/node_modules/codemirror/theme/tomorrow-night-bright.css +35 -0
- data/node_modules/codemirror/theme/tomorrow-night-eighties.css +38 -0
- data/node_modules/codemirror/theme/ttcn.css +64 -0
- data/node_modules/codemirror/theme/twilight.css +32 -0
- data/node_modules/codemirror/theme/vibrant-ink.css +34 -0
- data/node_modules/codemirror/theme/xq-dark.css +53 -0
- data/node_modules/codemirror/theme/xq-light.css +43 -0
- data/node_modules/codemirror/theme/yeti.css +44 -0
- data/node_modules/codemirror/theme/zenburn.css +37 -0
- data/node_modules/marked/.editorconfig +16 -0
- data/node_modules/marked/.eslintignore +1 -0
- data/node_modules/marked/.eslintrc.json +28 -0
- data/node_modules/marked/.package 2.json.icloud +0 -0
- data/node_modules/marked/.travis.yml +47 -0
- data/node_modules/marked/Makefile +15 -0
- data/node_modules/marked/Makefile 2 +15 -0
- data/node_modules/marked/README 2.md +75 -0
- data/node_modules/marked/README.md +75 -0
- data/node_modules/marked/bin/marked +199 -0
- data/node_modules/marked/bower.json +23 -0
- data/node_modules/marked/component.json +10 -0
- data/node_modules/marked/index.js +1 -0
- data/node_modules/marked/jasmine.json +11 -0
- data/node_modules/marked/lib/marked 2.js +1604 -0
- data/node_modules/marked/lib/marked.js +1604 -0
- data/node_modules/marked/man/marked.1 +91 -0
- data/node_modules/marked/man/marked.1.txt +96 -0
- data/node_modules/marked/marked.min.js +6 -0
- data/node_modules/marked/package.json +95 -0
- data/node_modules/simplemde/.eslintrc +23 -0
- data/node_modules/simplemde/.npmignore +9 -0
- data/node_modules/simplemde/.travis.yml +18 -0
- data/node_modules/simplemde/CONTRIBUTING 2.md +10 -0
- data/node_modules/simplemde/CONTRIBUTING.md +10 -0
- data/node_modules/simplemde/LICENSE +22 -0
- data/node_modules/simplemde/README.md +331 -0
- data/node_modules/simplemde/bower.json +23 -0
- data/node_modules/simplemde/debug/.simplemde 2.css.icloud +0 -0
- data/node_modules/simplemde/debug/simplemde.css +676 -0
- data/node_modules/simplemde/debug/simplemde.debug.js +17023 -0
- data/node_modules/simplemde/debug/simplemde.js +17019 -0
- data/node_modules/simplemde/dist/simplemde.min.css +7 -0
- data/node_modules/simplemde/dist/simplemde.min.js +15 -0
- data/node_modules/simplemde/gulpfile.js +96 -0
- data/node_modules/simplemde/package.json +73 -0
- data/node_modules/simplemde/src/css/simplemde.css +328 -0
- data/node_modules/simplemde/src/js/codemirror/tablist 2.js +44 -0
- data/node_modules/simplemde/src/js/codemirror/tablist.js +44 -0
- data/node_modules/simplemde/src/js/simplemde.js +2028 -0
- data/node_modules/typo-js/README.md +45 -0
- data/node_modules/typo-js/dictionaries/en_US/.en_US 2.dic.icloud +0 -0
- data/node_modules/typo-js/dictionaries/en_US/README.md +7 -0
- data/node_modules/typo-js/dictionaries/en_US/en_US.aff +201 -0
- data/node_modules/typo-js/dictionaries/en_US/en_US.dic +62120 -0
- data/node_modules/typo-js/package.json +56 -0
- data/node_modules/typo-js/typo.js +931 -0
- data/package-lock.json +40 -0
- data/package.json +7 -0
- metadata +557 -0
@@ -0,0 +1,265 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Author: Koh Zi Han, based on implementation by Koh Zi Chun
|
6
|
+
*/
|
7
|
+
|
8
|
+
(function(mod) {
|
9
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
10
|
+
mod(require("../../lib/codemirror"));
|
11
|
+
else if (typeof define == "function" && define.amd) // AMD
|
12
|
+
define(["../../lib/codemirror"], mod);
|
13
|
+
else // Plain browser env
|
14
|
+
mod(CodeMirror);
|
15
|
+
})(function(CodeMirror) {
|
16
|
+
"use strict";
|
17
|
+
|
18
|
+
CodeMirror.defineMode("scheme", function () {
|
19
|
+
var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
|
20
|
+
ATOM = "atom", NUMBER = "number", BRACKET = "bracket";
|
21
|
+
var INDENT_WORD_SKIP = 2;
|
22
|
+
|
23
|
+
function makeKeywords(str) {
|
24
|
+
var obj = {}, words = str.split(" ");
|
25
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
26
|
+
return obj;
|
27
|
+
}
|
28
|
+
|
29
|
+
var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?");
|
30
|
+
var indentKeys = makeKeywords("define let letrec let* lambda");
|
31
|
+
|
32
|
+
function stateStack(indent, type, prev) { // represents a state stack object
|
33
|
+
this.indent = indent;
|
34
|
+
this.type = type;
|
35
|
+
this.prev = prev;
|
36
|
+
}
|
37
|
+
|
38
|
+
function pushStack(state, indent, type) {
|
39
|
+
state.indentStack = new stateStack(indent, type, state.indentStack);
|
40
|
+
}
|
41
|
+
|
42
|
+
function popStack(state) {
|
43
|
+
state.indentStack = state.indentStack.prev;
|
44
|
+
}
|
45
|
+
|
46
|
+
var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i);
|
47
|
+
var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i);
|
48
|
+
var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i);
|
49
|
+
var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);
|
50
|
+
|
51
|
+
function isBinaryNumber (stream) {
|
52
|
+
return stream.match(binaryMatcher);
|
53
|
+
}
|
54
|
+
|
55
|
+
function isOctalNumber (stream) {
|
56
|
+
return stream.match(octalMatcher);
|
57
|
+
}
|
58
|
+
|
59
|
+
function isDecimalNumber (stream, backup) {
|
60
|
+
if (backup === true) {
|
61
|
+
stream.backUp(1);
|
62
|
+
}
|
63
|
+
return stream.match(decimalMatcher);
|
64
|
+
}
|
65
|
+
|
66
|
+
function isHexNumber (stream) {
|
67
|
+
return stream.match(hexMatcher);
|
68
|
+
}
|
69
|
+
|
70
|
+
return {
|
71
|
+
startState: function () {
|
72
|
+
return {
|
73
|
+
indentStack: null,
|
74
|
+
indentation: 0,
|
75
|
+
mode: false,
|
76
|
+
sExprComment: false,
|
77
|
+
sExprQuote: false
|
78
|
+
};
|
79
|
+
},
|
80
|
+
|
81
|
+
token: function (stream, state) {
|
82
|
+
if (state.indentStack == null && stream.sol()) {
|
83
|
+
// update indentation, but only if indentStack is empty
|
84
|
+
state.indentation = stream.indentation();
|
85
|
+
}
|
86
|
+
|
87
|
+
// skip spaces
|
88
|
+
if (stream.eatSpace()) {
|
89
|
+
return null;
|
90
|
+
}
|
91
|
+
var returnType = null;
|
92
|
+
|
93
|
+
switch(state.mode){
|
94
|
+
case "string": // multi-line string parsing mode
|
95
|
+
var next, escaped = false;
|
96
|
+
while ((next = stream.next()) != null) {
|
97
|
+
if (next == "\"" && !escaped) {
|
98
|
+
|
99
|
+
state.mode = false;
|
100
|
+
break;
|
101
|
+
}
|
102
|
+
escaped = !escaped && next == "\\";
|
103
|
+
}
|
104
|
+
returnType = STRING; // continue on in scheme-string mode
|
105
|
+
break;
|
106
|
+
case "comment": // comment parsing mode
|
107
|
+
var next, maybeEnd = false;
|
108
|
+
while ((next = stream.next()) != null) {
|
109
|
+
if (next == "#" && maybeEnd) {
|
110
|
+
|
111
|
+
state.mode = false;
|
112
|
+
break;
|
113
|
+
}
|
114
|
+
maybeEnd = (next == "|");
|
115
|
+
}
|
116
|
+
returnType = COMMENT;
|
117
|
+
break;
|
118
|
+
case "s-expr-comment": // s-expr commenting mode
|
119
|
+
state.mode = false;
|
120
|
+
if(stream.peek() == "(" || stream.peek() == "["){
|
121
|
+
// actually start scheme s-expr commenting mode
|
122
|
+
state.sExprComment = 0;
|
123
|
+
}else{
|
124
|
+
// if not we just comment the entire of the next token
|
125
|
+
stream.eatWhile(/[^\s\(\)\[\]]/); // eat symbol atom
|
126
|
+
returnType = COMMENT;
|
127
|
+
break;
|
128
|
+
}
|
129
|
+
default: // default parsing mode
|
130
|
+
var ch = stream.next();
|
131
|
+
|
132
|
+
if (ch == "\"") {
|
133
|
+
state.mode = "string";
|
134
|
+
returnType = STRING;
|
135
|
+
|
136
|
+
} else if (ch == "'") {
|
137
|
+
if (stream.peek() == "(" || stream.peek() == "["){
|
138
|
+
if (typeof state.sExprQuote != "number") {
|
139
|
+
state.sExprQuote = 0;
|
140
|
+
} // else already in a quoted expression
|
141
|
+
returnType = ATOM;
|
142
|
+
} else {
|
143
|
+
stream.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/);
|
144
|
+
returnType = ATOM;
|
145
|
+
}
|
146
|
+
} else if (ch == '#') {
|
147
|
+
if (stream.eat("|")) { // Multi-line comment
|
148
|
+
state.mode = "comment"; // toggle to comment mode
|
149
|
+
returnType = COMMENT;
|
150
|
+
} else if (stream.eat(/[tf]/i)) { // #t/#f (atom)
|
151
|
+
returnType = ATOM;
|
152
|
+
} else if (stream.eat(';')) { // S-Expr comment
|
153
|
+
state.mode = "s-expr-comment";
|
154
|
+
returnType = COMMENT;
|
155
|
+
} else {
|
156
|
+
var numTest = null, hasExactness = false, hasRadix = true;
|
157
|
+
if (stream.eat(/[ei]/i)) {
|
158
|
+
hasExactness = true;
|
159
|
+
} else {
|
160
|
+
stream.backUp(1); // must be radix specifier
|
161
|
+
}
|
162
|
+
if (stream.match(/^#b/i)) {
|
163
|
+
numTest = isBinaryNumber;
|
164
|
+
} else if (stream.match(/^#o/i)) {
|
165
|
+
numTest = isOctalNumber;
|
166
|
+
} else if (stream.match(/^#x/i)) {
|
167
|
+
numTest = isHexNumber;
|
168
|
+
} else if (stream.match(/^#d/i)) {
|
169
|
+
numTest = isDecimalNumber;
|
170
|
+
} else if (stream.match(/^[-+0-9.]/, false)) {
|
171
|
+
hasRadix = false;
|
172
|
+
numTest = isDecimalNumber;
|
173
|
+
// re-consume the intial # if all matches failed
|
174
|
+
} else if (!hasExactness) {
|
175
|
+
stream.eat('#');
|
176
|
+
}
|
177
|
+
if (numTest != null) {
|
178
|
+
if (hasRadix && !hasExactness) {
|
179
|
+
// consume optional exactness after radix
|
180
|
+
stream.match(/^#[ei]/i);
|
181
|
+
}
|
182
|
+
if (numTest(stream))
|
183
|
+
returnType = NUMBER;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
} else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal
|
187
|
+
returnType = NUMBER;
|
188
|
+
} else if (ch == ";") { // comment
|
189
|
+
stream.skipToEnd(); // rest of the line is a comment
|
190
|
+
returnType = COMMENT;
|
191
|
+
} else if (ch == "(" || ch == "[") {
|
192
|
+
var keyWord = ''; var indentTemp = stream.column(), letter;
|
193
|
+
/**
|
194
|
+
Either
|
195
|
+
(indent-word ..
|
196
|
+
(non-indent-word ..
|
197
|
+
(;something else, bracket, etc.
|
198
|
+
*/
|
199
|
+
|
200
|
+
while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) {
|
201
|
+
keyWord += letter;
|
202
|
+
}
|
203
|
+
|
204
|
+
if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word
|
205
|
+
|
206
|
+
pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
|
207
|
+
} else { // non-indent word
|
208
|
+
// we continue eating the spaces
|
209
|
+
stream.eatSpace();
|
210
|
+
if (stream.eol() || stream.peek() == ";") {
|
211
|
+
// nothing significant after
|
212
|
+
// we restart indentation 1 space after
|
213
|
+
pushStack(state, indentTemp + 1, ch);
|
214
|
+
} else {
|
215
|
+
pushStack(state, indentTemp + stream.current().length, ch); // else we match
|
216
|
+
}
|
217
|
+
}
|
218
|
+
stream.backUp(stream.current().length - 1); // undo all the eating
|
219
|
+
|
220
|
+
if(typeof state.sExprComment == "number") state.sExprComment++;
|
221
|
+
if(typeof state.sExprQuote == "number") state.sExprQuote++;
|
222
|
+
|
223
|
+
returnType = BRACKET;
|
224
|
+
} else if (ch == ")" || ch == "]") {
|
225
|
+
returnType = BRACKET;
|
226
|
+
if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) {
|
227
|
+
popStack(state);
|
228
|
+
|
229
|
+
if(typeof state.sExprComment == "number"){
|
230
|
+
if(--state.sExprComment == 0){
|
231
|
+
returnType = COMMENT; // final closing bracket
|
232
|
+
state.sExprComment = false; // turn off s-expr commenting mode
|
233
|
+
}
|
234
|
+
}
|
235
|
+
if(typeof state.sExprQuote == "number"){
|
236
|
+
if(--state.sExprQuote == 0){
|
237
|
+
returnType = ATOM; // final closing bracket
|
238
|
+
state.sExprQuote = false; // turn off s-expr quote mode
|
239
|
+
}
|
240
|
+
}
|
241
|
+
}
|
242
|
+
} else {
|
243
|
+
stream.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/);
|
244
|
+
|
245
|
+
if (keywords && keywords.propertyIsEnumerable(stream.current())) {
|
246
|
+
returnType = BUILTIN;
|
247
|
+
} else returnType = "variable";
|
248
|
+
}
|
249
|
+
}
|
250
|
+
return (typeof state.sExprComment == "number") ? COMMENT : ((typeof state.sExprQuote == "number") ? ATOM : returnType);
|
251
|
+
},
|
252
|
+
|
253
|
+
indent: function (state) {
|
254
|
+
if (state.indentStack == null) return state.indentation;
|
255
|
+
return state.indentStack.indent;
|
256
|
+
},
|
257
|
+
|
258
|
+
closeBrackets: {pairs: "()[]{}\"\""},
|
259
|
+
lineComment: ";;"
|
260
|
+
};
|
261
|
+
});
|
262
|
+
|
263
|
+
CodeMirror.defineMIME("text/x-scheme", "scheme");
|
264
|
+
|
265
|
+
});
|
@@ -0,0 +1,152 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode('shell', function() {
|
15
|
+
|
16
|
+
var words = {};
|
17
|
+
function define(style, dict) {
|
18
|
+
for(var i = 0; i < dict.length; i++) {
|
19
|
+
words[dict[i]] = style;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
|
23
|
+
var commonAtoms = ["true", "false"];
|
24
|
+
var commonKeywords = ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi",
|
25
|
+
"fin", "fil", "done", "exit", "set", "unset", "export", "function"];
|
26
|
+
var commonCommands = ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear",
|
27
|
+
"cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall",
|
28
|
+
"ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "nl", "node", "npm", "ping", "ps", "restart", "rm",
|
29
|
+
"rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop",
|
30
|
+
"su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write",
|
31
|
+
"yes", "zsh"];
|
32
|
+
|
33
|
+
CodeMirror.registerHelper("hintWords", "shell", commonAtoms.concat(commonKeywords, commonCommands));
|
34
|
+
|
35
|
+
define('atom', commonAtoms);
|
36
|
+
define('keyword', commonKeywords);
|
37
|
+
define('builtin', commonCommands);
|
38
|
+
|
39
|
+
function tokenBase(stream, state) {
|
40
|
+
if (stream.eatSpace()) return null;
|
41
|
+
|
42
|
+
var sol = stream.sol();
|
43
|
+
var ch = stream.next();
|
44
|
+
|
45
|
+
if (ch === '\\') {
|
46
|
+
stream.next();
|
47
|
+
return null;
|
48
|
+
}
|
49
|
+
if (ch === '\'' || ch === '"' || ch === '`') {
|
50
|
+
state.tokens.unshift(tokenString(ch, ch === "`" ? "quote" : "string"));
|
51
|
+
return tokenize(stream, state);
|
52
|
+
}
|
53
|
+
if (ch === '#') {
|
54
|
+
if (sol && stream.eat('!')) {
|
55
|
+
stream.skipToEnd();
|
56
|
+
return 'meta'; // 'comment'?
|
57
|
+
}
|
58
|
+
stream.skipToEnd();
|
59
|
+
return 'comment';
|
60
|
+
}
|
61
|
+
if (ch === '$') {
|
62
|
+
state.tokens.unshift(tokenDollar);
|
63
|
+
return tokenize(stream, state);
|
64
|
+
}
|
65
|
+
if (ch === '+' || ch === '=') {
|
66
|
+
return 'operator';
|
67
|
+
}
|
68
|
+
if (ch === '-') {
|
69
|
+
stream.eat('-');
|
70
|
+
stream.eatWhile(/\w/);
|
71
|
+
return 'attribute';
|
72
|
+
}
|
73
|
+
if (/\d/.test(ch)) {
|
74
|
+
stream.eatWhile(/\d/);
|
75
|
+
if(stream.eol() || !/\w/.test(stream.peek())) {
|
76
|
+
return 'number';
|
77
|
+
}
|
78
|
+
}
|
79
|
+
stream.eatWhile(/[\w-]/);
|
80
|
+
var cur = stream.current();
|
81
|
+
if (stream.peek() === '=' && /\w+/.test(cur)) return 'def';
|
82
|
+
return words.hasOwnProperty(cur) ? words[cur] : null;
|
83
|
+
}
|
84
|
+
|
85
|
+
function tokenString(quote, style) {
|
86
|
+
var close = quote == "(" ? ")" : quote == "{" ? "}" : quote
|
87
|
+
return function(stream, state) {
|
88
|
+
var next, escaped = false;
|
89
|
+
while ((next = stream.next()) != null) {
|
90
|
+
if (next === close && !escaped) {
|
91
|
+
state.tokens.shift();
|
92
|
+
break;
|
93
|
+
} else if (next === '$' && !escaped && quote !== "'" && stream.peek() != close) {
|
94
|
+
escaped = true;
|
95
|
+
stream.backUp(1);
|
96
|
+
state.tokens.unshift(tokenDollar);
|
97
|
+
break;
|
98
|
+
} else if (!escaped && quote !== close && next === quote) {
|
99
|
+
state.tokens.unshift(tokenString(quote, style))
|
100
|
+
return tokenize(stream, state)
|
101
|
+
} else if (!escaped && /['"]/.test(next) && !/['"]/.test(quote)) {
|
102
|
+
state.tokens.unshift(tokenStringStart(next, "string"));
|
103
|
+
stream.backUp(1);
|
104
|
+
break;
|
105
|
+
}
|
106
|
+
escaped = !escaped && next === '\\';
|
107
|
+
}
|
108
|
+
return style;
|
109
|
+
};
|
110
|
+
};
|
111
|
+
|
112
|
+
function tokenStringStart(quote, style) {
|
113
|
+
return function(stream, state) {
|
114
|
+
state.tokens[0] = tokenString(quote, style)
|
115
|
+
stream.next()
|
116
|
+
return tokenize(stream, state)
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
var tokenDollar = function(stream, state) {
|
121
|
+
if (state.tokens.length > 1) stream.eat('$');
|
122
|
+
var ch = stream.next()
|
123
|
+
if (/['"({]/.test(ch)) {
|
124
|
+
state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string");
|
125
|
+
return tokenize(stream, state);
|
126
|
+
}
|
127
|
+
if (!/\d/.test(ch)) stream.eatWhile(/\w/);
|
128
|
+
state.tokens.shift();
|
129
|
+
return 'def';
|
130
|
+
};
|
131
|
+
|
132
|
+
function tokenize(stream, state) {
|
133
|
+
return (state.tokens[0] || tokenBase) (stream, state);
|
134
|
+
};
|
135
|
+
|
136
|
+
return {
|
137
|
+
startState: function() {return {tokens:[]};},
|
138
|
+
token: function(stream, state) {
|
139
|
+
return tokenize(stream, state);
|
140
|
+
},
|
141
|
+
closeBrackets: "()[]{}''\"\"``",
|
142
|
+
lineComment: '#',
|
143
|
+
fold: "brace"
|
144
|
+
};
|
145
|
+
});
|
146
|
+
|
147
|
+
CodeMirror.defineMIME('text/x-sh', 'shell');
|
148
|
+
// Apache uses a slightly different Media Type for Shell scripts
|
149
|
+
// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
150
|
+
CodeMirror.defineMIME('application/x-sh', 'shell');
|
151
|
+
|
152
|
+
});
|
@@ -0,0 +1,193 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode("sieve", function(config) {
|
15
|
+
function words(str) {
|
16
|
+
var obj = {}, words = str.split(" ");
|
17
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
18
|
+
return obj;
|
19
|
+
}
|
20
|
+
|
21
|
+
var keywords = words("if elsif else stop require");
|
22
|
+
var atoms = words("true false not");
|
23
|
+
var indentUnit = config.indentUnit;
|
24
|
+
|
25
|
+
function tokenBase(stream, state) {
|
26
|
+
|
27
|
+
var ch = stream.next();
|
28
|
+
if (ch == "/" && stream.eat("*")) {
|
29
|
+
state.tokenize = tokenCComment;
|
30
|
+
return tokenCComment(stream, state);
|
31
|
+
}
|
32
|
+
|
33
|
+
if (ch === '#') {
|
34
|
+
stream.skipToEnd();
|
35
|
+
return "comment";
|
36
|
+
}
|
37
|
+
|
38
|
+
if (ch == "\"") {
|
39
|
+
state.tokenize = tokenString(ch);
|
40
|
+
return state.tokenize(stream, state);
|
41
|
+
}
|
42
|
+
|
43
|
+
if (ch == "(") {
|
44
|
+
state._indent.push("(");
|
45
|
+
// add virtual angel wings so that editor behaves...
|
46
|
+
// ...more sane incase of broken brackets
|
47
|
+
state._indent.push("{");
|
48
|
+
return null;
|
49
|
+
}
|
50
|
+
|
51
|
+
if (ch === "{") {
|
52
|
+
state._indent.push("{");
|
53
|
+
return null;
|
54
|
+
}
|
55
|
+
|
56
|
+
if (ch == ")") {
|
57
|
+
state._indent.pop();
|
58
|
+
state._indent.pop();
|
59
|
+
}
|
60
|
+
|
61
|
+
if (ch === "}") {
|
62
|
+
state._indent.pop();
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
|
66
|
+
if (ch == ",")
|
67
|
+
return null;
|
68
|
+
|
69
|
+
if (ch == ";")
|
70
|
+
return null;
|
71
|
+
|
72
|
+
|
73
|
+
if (/[{}\(\),;]/.test(ch))
|
74
|
+
return null;
|
75
|
+
|
76
|
+
// 1*DIGIT "K" / "M" / "G"
|
77
|
+
if (/\d/.test(ch)) {
|
78
|
+
stream.eatWhile(/[\d]/);
|
79
|
+
stream.eat(/[KkMmGg]/);
|
80
|
+
return "number";
|
81
|
+
}
|
82
|
+
|
83
|
+
// ":" (ALPHA / "_") *(ALPHA / DIGIT / "_")
|
84
|
+
if (ch == ":") {
|
85
|
+
stream.eatWhile(/[a-zA-Z_]/);
|
86
|
+
stream.eatWhile(/[a-zA-Z0-9_]/);
|
87
|
+
|
88
|
+
return "operator";
|
89
|
+
}
|
90
|
+
|
91
|
+
stream.eatWhile(/\w/);
|
92
|
+
var cur = stream.current();
|
93
|
+
|
94
|
+
// "text:" *(SP / HTAB) (hash-comment / CRLF)
|
95
|
+
// *(multiline-literal / multiline-dotstart)
|
96
|
+
// "." CRLF
|
97
|
+
if ((cur == "text") && stream.eat(":"))
|
98
|
+
{
|
99
|
+
state.tokenize = tokenMultiLineString;
|
100
|
+
return "string";
|
101
|
+
}
|
102
|
+
|
103
|
+
if (keywords.propertyIsEnumerable(cur))
|
104
|
+
return "keyword";
|
105
|
+
|
106
|
+
if (atoms.propertyIsEnumerable(cur))
|
107
|
+
return "atom";
|
108
|
+
|
109
|
+
return null;
|
110
|
+
}
|
111
|
+
|
112
|
+
function tokenMultiLineString(stream, state)
|
113
|
+
{
|
114
|
+
state._multiLineString = true;
|
115
|
+
// the first line is special it may contain a comment
|
116
|
+
if (!stream.sol()) {
|
117
|
+
stream.eatSpace();
|
118
|
+
|
119
|
+
if (stream.peek() == "#") {
|
120
|
+
stream.skipToEnd();
|
121
|
+
return "comment";
|
122
|
+
}
|
123
|
+
|
124
|
+
stream.skipToEnd();
|
125
|
+
return "string";
|
126
|
+
}
|
127
|
+
|
128
|
+
if ((stream.next() == ".") && (stream.eol()))
|
129
|
+
{
|
130
|
+
state._multiLineString = false;
|
131
|
+
state.tokenize = tokenBase;
|
132
|
+
}
|
133
|
+
|
134
|
+
return "string";
|
135
|
+
}
|
136
|
+
|
137
|
+
function tokenCComment(stream, state) {
|
138
|
+
var maybeEnd = false, ch;
|
139
|
+
while ((ch = stream.next()) != null) {
|
140
|
+
if (maybeEnd && ch == "/") {
|
141
|
+
state.tokenize = tokenBase;
|
142
|
+
break;
|
143
|
+
}
|
144
|
+
maybeEnd = (ch == "*");
|
145
|
+
}
|
146
|
+
return "comment";
|
147
|
+
}
|
148
|
+
|
149
|
+
function tokenString(quote) {
|
150
|
+
return function(stream, state) {
|
151
|
+
var escaped = false, ch;
|
152
|
+
while ((ch = stream.next()) != null) {
|
153
|
+
if (ch == quote && !escaped)
|
154
|
+
break;
|
155
|
+
escaped = !escaped && ch == "\\";
|
156
|
+
}
|
157
|
+
if (!escaped) state.tokenize = tokenBase;
|
158
|
+
return "string";
|
159
|
+
};
|
160
|
+
}
|
161
|
+
|
162
|
+
return {
|
163
|
+
startState: function(base) {
|
164
|
+
return {tokenize: tokenBase,
|
165
|
+
baseIndent: base || 0,
|
166
|
+
_indent: []};
|
167
|
+
},
|
168
|
+
|
169
|
+
token: function(stream, state) {
|
170
|
+
if (stream.eatSpace())
|
171
|
+
return null;
|
172
|
+
|
173
|
+
return (state.tokenize || tokenBase)(stream, state);
|
174
|
+
},
|
175
|
+
|
176
|
+
indent: function(state, _textAfter) {
|
177
|
+
var length = state._indent.length;
|
178
|
+
if (_textAfter && (_textAfter[0] == "}"))
|
179
|
+
length--;
|
180
|
+
|
181
|
+
if (length <0)
|
182
|
+
length = 0;
|
183
|
+
|
184
|
+
return length * indentUnit;
|
185
|
+
},
|
186
|
+
|
187
|
+
electricChars: "}"
|
188
|
+
};
|
189
|
+
});
|
190
|
+
|
191
|
+
CodeMirror.defineMIME("application/sieve", "sieve");
|
192
|
+
|
193
|
+
});
|