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,245 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
// Modelica support for CodeMirror, copyright (c) by Lennart Ochel
|
5
|
+
|
6
|
+
(function(mod) {
|
7
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
8
|
+
mod(require("../../lib/codemirror"));
|
9
|
+
else if (typeof define == "function" && define.amd) // AMD
|
10
|
+
define(["../../lib/codemirror"], mod);
|
11
|
+
else // Plain browser env
|
12
|
+
mod(CodeMirror);
|
13
|
+
})
|
14
|
+
|
15
|
+
(function(CodeMirror) {
|
16
|
+
"use strict";
|
17
|
+
|
18
|
+
CodeMirror.defineMode("modelica", function(config, parserConfig) {
|
19
|
+
|
20
|
+
var indentUnit = config.indentUnit;
|
21
|
+
var keywords = parserConfig.keywords || {};
|
22
|
+
var builtin = parserConfig.builtin || {};
|
23
|
+
var atoms = parserConfig.atoms || {};
|
24
|
+
|
25
|
+
var isSingleOperatorChar = /[;=\(:\),{}.*<>+\-\/^\[\]]/;
|
26
|
+
var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/;
|
27
|
+
var isDigit = /[0-9]/;
|
28
|
+
var isNonDigit = /[_a-zA-Z]/;
|
29
|
+
|
30
|
+
function tokenLineComment(stream, state) {
|
31
|
+
stream.skipToEnd();
|
32
|
+
state.tokenize = null;
|
33
|
+
return "comment";
|
34
|
+
}
|
35
|
+
|
36
|
+
function tokenBlockComment(stream, state) {
|
37
|
+
var maybeEnd = false, ch;
|
38
|
+
while (ch = stream.next()) {
|
39
|
+
if (maybeEnd && ch == "/") {
|
40
|
+
state.tokenize = null;
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
maybeEnd = (ch == "*");
|
44
|
+
}
|
45
|
+
return "comment";
|
46
|
+
}
|
47
|
+
|
48
|
+
function tokenString(stream, state) {
|
49
|
+
var escaped = false, ch;
|
50
|
+
while ((ch = stream.next()) != null) {
|
51
|
+
if (ch == '"' && !escaped) {
|
52
|
+
state.tokenize = null;
|
53
|
+
state.sol = false;
|
54
|
+
break;
|
55
|
+
}
|
56
|
+
escaped = !escaped && ch == "\\";
|
57
|
+
}
|
58
|
+
|
59
|
+
return "string";
|
60
|
+
}
|
61
|
+
|
62
|
+
function tokenIdent(stream, state) {
|
63
|
+
stream.eatWhile(isDigit);
|
64
|
+
while (stream.eat(isDigit) || stream.eat(isNonDigit)) { }
|
65
|
+
|
66
|
+
|
67
|
+
var cur = stream.current();
|
68
|
+
|
69
|
+
if(state.sol && (cur == "package" || cur == "model" || cur == "when" || cur == "connector")) state.level++;
|
70
|
+
else if(state.sol && cur == "end" && state.level > 0) state.level--;
|
71
|
+
|
72
|
+
state.tokenize = null;
|
73
|
+
state.sol = false;
|
74
|
+
|
75
|
+
if (keywords.propertyIsEnumerable(cur)) return "keyword";
|
76
|
+
else if (builtin.propertyIsEnumerable(cur)) return "builtin";
|
77
|
+
else if (atoms.propertyIsEnumerable(cur)) return "atom";
|
78
|
+
else return "variable";
|
79
|
+
}
|
80
|
+
|
81
|
+
function tokenQIdent(stream, state) {
|
82
|
+
while (stream.eat(/[^']/)) { }
|
83
|
+
|
84
|
+
state.tokenize = null;
|
85
|
+
state.sol = false;
|
86
|
+
|
87
|
+
if(stream.eat("'"))
|
88
|
+
return "variable";
|
89
|
+
else
|
90
|
+
return "error";
|
91
|
+
}
|
92
|
+
|
93
|
+
function tokenUnsignedNuber(stream, state) {
|
94
|
+
stream.eatWhile(isDigit);
|
95
|
+
if (stream.eat('.')) {
|
96
|
+
stream.eatWhile(isDigit);
|
97
|
+
}
|
98
|
+
if (stream.eat('e') || stream.eat('E')) {
|
99
|
+
if (!stream.eat('-'))
|
100
|
+
stream.eat('+');
|
101
|
+
stream.eatWhile(isDigit);
|
102
|
+
}
|
103
|
+
|
104
|
+
state.tokenize = null;
|
105
|
+
state.sol = false;
|
106
|
+
return "number";
|
107
|
+
}
|
108
|
+
|
109
|
+
// Interface
|
110
|
+
return {
|
111
|
+
startState: function() {
|
112
|
+
return {
|
113
|
+
tokenize: null,
|
114
|
+
level: 0,
|
115
|
+
sol: true
|
116
|
+
};
|
117
|
+
},
|
118
|
+
|
119
|
+
token: function(stream, state) {
|
120
|
+
if(state.tokenize != null) {
|
121
|
+
return state.tokenize(stream, state);
|
122
|
+
}
|
123
|
+
|
124
|
+
if(stream.sol()) {
|
125
|
+
state.sol = true;
|
126
|
+
}
|
127
|
+
|
128
|
+
// WHITESPACE
|
129
|
+
if(stream.eatSpace()) {
|
130
|
+
state.tokenize = null;
|
131
|
+
return null;
|
132
|
+
}
|
133
|
+
|
134
|
+
var ch = stream.next();
|
135
|
+
|
136
|
+
// LINECOMMENT
|
137
|
+
if(ch == '/' && stream.eat('/')) {
|
138
|
+
state.tokenize = tokenLineComment;
|
139
|
+
}
|
140
|
+
// BLOCKCOMMENT
|
141
|
+
else if(ch == '/' && stream.eat('*')) {
|
142
|
+
state.tokenize = tokenBlockComment;
|
143
|
+
}
|
144
|
+
// TWO SYMBOL TOKENS
|
145
|
+
else if(isDoubleOperatorChar.test(ch+stream.peek())) {
|
146
|
+
stream.next();
|
147
|
+
state.tokenize = null;
|
148
|
+
return "operator";
|
149
|
+
}
|
150
|
+
// SINGLE SYMBOL TOKENS
|
151
|
+
else if(isSingleOperatorChar.test(ch)) {
|
152
|
+
state.tokenize = null;
|
153
|
+
return "operator";
|
154
|
+
}
|
155
|
+
// IDENT
|
156
|
+
else if(isNonDigit.test(ch)) {
|
157
|
+
state.tokenize = tokenIdent;
|
158
|
+
}
|
159
|
+
// Q-IDENT
|
160
|
+
else if(ch == "'" && stream.peek() && stream.peek() != "'") {
|
161
|
+
state.tokenize = tokenQIdent;
|
162
|
+
}
|
163
|
+
// STRING
|
164
|
+
else if(ch == '"') {
|
165
|
+
state.tokenize = tokenString;
|
166
|
+
}
|
167
|
+
// UNSIGNED_NUBER
|
168
|
+
else if(isDigit.test(ch)) {
|
169
|
+
state.tokenize = tokenUnsignedNuber;
|
170
|
+
}
|
171
|
+
// ERROR
|
172
|
+
else {
|
173
|
+
state.tokenize = null;
|
174
|
+
return "error";
|
175
|
+
}
|
176
|
+
|
177
|
+
return state.tokenize(stream, state);
|
178
|
+
},
|
179
|
+
|
180
|
+
indent: function(state, textAfter) {
|
181
|
+
if (state.tokenize != null) return CodeMirror.Pass;
|
182
|
+
|
183
|
+
var level = state.level;
|
184
|
+
if(/(algorithm)/.test(textAfter)) level--;
|
185
|
+
if(/(equation)/.test(textAfter)) level--;
|
186
|
+
if(/(initial algorithm)/.test(textAfter)) level--;
|
187
|
+
if(/(initial equation)/.test(textAfter)) level--;
|
188
|
+
if(/(end)/.test(textAfter)) level--;
|
189
|
+
|
190
|
+
if(level > 0)
|
191
|
+
return indentUnit*level;
|
192
|
+
else
|
193
|
+
return 0;
|
194
|
+
},
|
195
|
+
|
196
|
+
blockCommentStart: "/*",
|
197
|
+
blockCommentEnd: "*/",
|
198
|
+
lineComment: "//"
|
199
|
+
};
|
200
|
+
});
|
201
|
+
|
202
|
+
function words(str) {
|
203
|
+
var obj = {}, words = str.split(" ");
|
204
|
+
for (var i=0; i<words.length; ++i)
|
205
|
+
obj[words[i]] = true;
|
206
|
+
return obj;
|
207
|
+
}
|
208
|
+
|
209
|
+
var modelicaKeywords = "algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within";
|
210
|
+
var modelicaBuiltin = "abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh";
|
211
|
+
var modelicaAtoms = "Real Boolean Integer String";
|
212
|
+
|
213
|
+
function def(mimes, mode) {
|
214
|
+
if (typeof mimes == "string")
|
215
|
+
mimes = [mimes];
|
216
|
+
|
217
|
+
var words = [];
|
218
|
+
|
219
|
+
function add(obj) {
|
220
|
+
if (obj)
|
221
|
+
for (var prop in obj)
|
222
|
+
if (obj.hasOwnProperty(prop))
|
223
|
+
words.push(prop);
|
224
|
+
}
|
225
|
+
|
226
|
+
add(mode.keywords);
|
227
|
+
add(mode.builtin);
|
228
|
+
add(mode.atoms);
|
229
|
+
|
230
|
+
if (words.length) {
|
231
|
+
mode.helperType = mimes[0];
|
232
|
+
CodeMirror.registerHelper("hintWords", mimes[0], words);
|
233
|
+
}
|
234
|
+
|
235
|
+
for (var i=0; i<mimes.length; ++i)
|
236
|
+
CodeMirror.defineMIME(mimes[i], mode);
|
237
|
+
}
|
238
|
+
|
239
|
+
def(["text/x-modelica"], {
|
240
|
+
name: "modelica",
|
241
|
+
keywords: words(modelicaKeywords),
|
242
|
+
builtin: words(modelicaBuiltin),
|
243
|
+
atoms: words(modelicaAtoms)
|
244
|
+
});
|
245
|
+
});
|
@@ -0,0 +1,175 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
// mode(s) for the sequence chart dsl's mscgen, xù and msgenny
|
5
|
+
// For more information on mscgen, see the site of the original author:
|
6
|
+
// http://www.mcternan.me.uk/mscgen
|
7
|
+
//
|
8
|
+
// This mode for mscgen and the two derivative languages were
|
9
|
+
// originally made for use in the mscgen_js interpreter
|
10
|
+
// (https://sverweij.github.io/mscgen_js)
|
11
|
+
|
12
|
+
(function(mod) {
|
13
|
+
if ( typeof exports == "object" && typeof module == "object")// CommonJS
|
14
|
+
mod(require("../../lib/codemirror"));
|
15
|
+
else if ( typeof define == "function" && define.amd)// AMD
|
16
|
+
define(["../../lib/codemirror"], mod);
|
17
|
+
else// Plain browser env
|
18
|
+
mod(CodeMirror);
|
19
|
+
})(function(CodeMirror) {
|
20
|
+
"use strict";
|
21
|
+
|
22
|
+
var languages = {
|
23
|
+
mscgen: {
|
24
|
+
"keywords" : ["msc"],
|
25
|
+
"options" : ["hscale", "width", "arcgradient", "wordwraparcs"],
|
26
|
+
"constants" : ["true", "false", "on", "off"],
|
27
|
+
"attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip"],
|
28
|
+
"brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists
|
29
|
+
"arcsWords" : ["note", "abox", "rbox", "box"],
|
30
|
+
"arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"],
|
31
|
+
"singlecomment" : ["//", "#"],
|
32
|
+
"operators" : ["="]
|
33
|
+
},
|
34
|
+
xu: {
|
35
|
+
"keywords" : ["msc", "xu"],
|
36
|
+
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"],
|
37
|
+
"constants" : ["true", "false", "on", "off", "auto"],
|
38
|
+
"attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip", "title", "deactivate", "activate", "activation"],
|
39
|
+
"brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists
|
40
|
+
"arcsWords" : ["note", "abox", "rbox", "box", "alt", "else", "opt", "break", "par", "seq", "strict", "neg", "critical", "ignore", "consider", "assert", "loop", "ref", "exc"],
|
41
|
+
"arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"],
|
42
|
+
"singlecomment" : ["//", "#"],
|
43
|
+
"operators" : ["="]
|
44
|
+
},
|
45
|
+
msgenny: {
|
46
|
+
"keywords" : null,
|
47
|
+
"options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"],
|
48
|
+
"constants" : ["true", "false", "on", "off", "auto"],
|
49
|
+
"attributes" : null,
|
50
|
+
"brackets" : ["\\{", "\\}"],
|
51
|
+
"arcsWords" : ["note", "abox", "rbox", "box", "alt", "else", "opt", "break", "par", "seq", "strict", "neg", "critical", "ignore", "consider", "assert", "loop", "ref", "exc"],
|
52
|
+
"arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"],
|
53
|
+
"singlecomment" : ["//", "#"],
|
54
|
+
"operators" : ["="]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
CodeMirror.defineMode("mscgen", function(_, modeConfig) {
|
59
|
+
var language = languages[modeConfig && modeConfig.language || "mscgen"]
|
60
|
+
return {
|
61
|
+
startState: startStateFn,
|
62
|
+
copyState: copyStateFn,
|
63
|
+
token: produceTokenFunction(language),
|
64
|
+
lineComment : "#",
|
65
|
+
blockCommentStart : "/*",
|
66
|
+
blockCommentEnd : "*/"
|
67
|
+
};
|
68
|
+
});
|
69
|
+
|
70
|
+
CodeMirror.defineMIME("text/x-mscgen", "mscgen");
|
71
|
+
CodeMirror.defineMIME("text/x-xu", {name: "mscgen", language: "xu"});
|
72
|
+
CodeMirror.defineMIME("text/x-msgenny", {name: "mscgen", language: "msgenny"});
|
73
|
+
|
74
|
+
function wordRegexpBoundary(pWords) {
|
75
|
+
return new RegExp("\\b(" + pWords.join("|") + ")\\b", "i");
|
76
|
+
}
|
77
|
+
|
78
|
+
function wordRegexp(pWords) {
|
79
|
+
return new RegExp("(" + pWords.join("|") + ")", "i");
|
80
|
+
}
|
81
|
+
|
82
|
+
function startStateFn() {
|
83
|
+
return {
|
84
|
+
inComment : false,
|
85
|
+
inString : false,
|
86
|
+
inAttributeList : false,
|
87
|
+
inScript : false
|
88
|
+
};
|
89
|
+
}
|
90
|
+
|
91
|
+
function copyStateFn(pState) {
|
92
|
+
return {
|
93
|
+
inComment : pState.inComment,
|
94
|
+
inString : pState.inString,
|
95
|
+
inAttributeList : pState.inAttributeList,
|
96
|
+
inScript : pState.inScript
|
97
|
+
};
|
98
|
+
}
|
99
|
+
|
100
|
+
function produceTokenFunction(pConfig) {
|
101
|
+
|
102
|
+
return function(pStream, pState) {
|
103
|
+
if (pStream.match(wordRegexp(pConfig.brackets), true, true)) {
|
104
|
+
return "bracket";
|
105
|
+
}
|
106
|
+
/* comments */
|
107
|
+
if (!pState.inComment) {
|
108
|
+
if (pStream.match(/\/\*[^\*\/]*/, true, true)) {
|
109
|
+
pState.inComment = true;
|
110
|
+
return "comment";
|
111
|
+
}
|
112
|
+
if (pStream.match(wordRegexp(pConfig.singlecomment), true, true)) {
|
113
|
+
pStream.skipToEnd();
|
114
|
+
return "comment";
|
115
|
+
}
|
116
|
+
}
|
117
|
+
if (pState.inComment) {
|
118
|
+
if (pStream.match(/[^\*\/]*\*\//, true, true))
|
119
|
+
pState.inComment = false;
|
120
|
+
else
|
121
|
+
pStream.skipToEnd();
|
122
|
+
return "comment";
|
123
|
+
}
|
124
|
+
/* strings */
|
125
|
+
if (!pState.inString && pStream.match(/\"(\\\"|[^\"])*/, true, true)) {
|
126
|
+
pState.inString = true;
|
127
|
+
return "string";
|
128
|
+
}
|
129
|
+
if (pState.inString) {
|
130
|
+
if (pStream.match(/[^\"]*\"/, true, true))
|
131
|
+
pState.inString = false;
|
132
|
+
else
|
133
|
+
pStream.skipToEnd();
|
134
|
+
return "string";
|
135
|
+
}
|
136
|
+
/* keywords & operators */
|
137
|
+
if (!!pConfig.keywords && pStream.match(wordRegexpBoundary(pConfig.keywords), true, true))
|
138
|
+
return "keyword";
|
139
|
+
|
140
|
+
if (pStream.match(wordRegexpBoundary(pConfig.options), true, true))
|
141
|
+
return "keyword";
|
142
|
+
|
143
|
+
if (pStream.match(wordRegexpBoundary(pConfig.arcsWords), true, true))
|
144
|
+
return "keyword";
|
145
|
+
|
146
|
+
if (pStream.match(wordRegexp(pConfig.arcsOthers), true, true))
|
147
|
+
return "keyword";
|
148
|
+
|
149
|
+
if (!!pConfig.operators && pStream.match(wordRegexp(pConfig.operators), true, true))
|
150
|
+
return "operator";
|
151
|
+
|
152
|
+
if (!!pConfig.constants && pStream.match(wordRegexp(pConfig.constants), true, true))
|
153
|
+
return "variable";
|
154
|
+
|
155
|
+
/* attribute lists */
|
156
|
+
if (!pConfig.inAttributeList && !!pConfig.attributes && pStream.match(/\[/, true, true)) {
|
157
|
+
pConfig.inAttributeList = true;
|
158
|
+
return "bracket";
|
159
|
+
}
|
160
|
+
if (pConfig.inAttributeList) {
|
161
|
+
if (pConfig.attributes !== null && pStream.match(wordRegexpBoundary(pConfig.attributes), true, true)) {
|
162
|
+
return "attribute";
|
163
|
+
}
|
164
|
+
if (pStream.match(/]/, true, true)) {
|
165
|
+
pConfig.inAttributeList = false;
|
166
|
+
return "bracket";
|
167
|
+
}
|
168
|
+
}
|
169
|
+
|
170
|
+
pStream.next();
|
171
|
+
return "base";
|
172
|
+
};
|
173
|
+
}
|
174
|
+
|
175
|
+
});
|
@@ -0,0 +1,148 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
/*
|
5
|
+
This MUMPS Language script was constructed using vbscript.js as a template.
|
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("mumps", function() {
|
19
|
+
function wordRegexp(words) {
|
20
|
+
return new RegExp("^((" + words.join(")|(") + "))\\b", "i");
|
21
|
+
}
|
22
|
+
|
23
|
+
var singleOperators = new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]");
|
24
|
+
var doubleOperators = new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))");
|
25
|
+
var singleDelimiters = new RegExp("^[\\.,:]");
|
26
|
+
var brackets = new RegExp("[()]");
|
27
|
+
var identifiers = new RegExp("^[%A-Za-z][A-Za-z0-9]*");
|
28
|
+
var commandKeywords = ["break","close","do","else","for","goto", "halt", "hang", "if", "job","kill","lock","merge","new","open", "quit", "read", "set", "tcommit", "trollback", "tstart", "use", "view", "write", "xecute", "b","c","d","e","f","g", "h", "i", "j","k","l","m","n","o", "q", "r", "s", "tc", "tro", "ts", "u", "v", "w", "x"];
|
29
|
+
// The following list includes instrinsic functions _and_ special variables
|
30
|
+
var intrinsicFuncsWords = ["\\$ascii", "\\$char", "\\$data", "\\$ecode", "\\$estack", "\\$etrap", "\\$extract", "\\$find", "\\$fnumber", "\\$get", "\\$horolog", "\\$io", "\\$increment", "\\$job", "\\$justify", "\\$length", "\\$name", "\\$next", "\\$order", "\\$piece", "\\$qlength", "\\$qsubscript", "\\$query", "\\$quit", "\\$random", "\\$reverse", "\\$select", "\\$stack", "\\$test", "\\$text", "\\$translate", "\\$view", "\\$x", "\\$y", "\\$a", "\\$c", "\\$d", "\\$e", "\\$ec", "\\$es", "\\$et", "\\$f", "\\$fn", "\\$g", "\\$h", "\\$i", "\\$j", "\\$l", "\\$n", "\\$na", "\\$o", "\\$p", "\\$q", "\\$ql", "\\$qs", "\\$r", "\\$re", "\\$s", "\\$st", "\\$t", "\\$tr", "\\$v", "\\$z"];
|
31
|
+
var intrinsicFuncs = wordRegexp(intrinsicFuncsWords);
|
32
|
+
var command = wordRegexp(commandKeywords);
|
33
|
+
|
34
|
+
function tokenBase(stream, state) {
|
35
|
+
if (stream.sol()) {
|
36
|
+
state.label = true;
|
37
|
+
state.commandMode = 0;
|
38
|
+
}
|
39
|
+
|
40
|
+
// The <space> character has meaning in MUMPS. Ignoring consecutive
|
41
|
+
// spaces would interfere with interpreting whether the next non-space
|
42
|
+
// character belongs to the command or argument context.
|
43
|
+
|
44
|
+
// Examine each character and update a mode variable whose interpretation is:
|
45
|
+
// >0 => command 0 => argument <0 => command post-conditional
|
46
|
+
var ch = stream.peek();
|
47
|
+
|
48
|
+
if (ch == " " || ch == "\t") { // Pre-process <space>
|
49
|
+
state.label = false;
|
50
|
+
if (state.commandMode == 0)
|
51
|
+
state.commandMode = 1;
|
52
|
+
else if ((state.commandMode < 0) || (state.commandMode == 2))
|
53
|
+
state.commandMode = 0;
|
54
|
+
} else if ((ch != ".") && (state.commandMode > 0)) {
|
55
|
+
if (ch == ":")
|
56
|
+
state.commandMode = -1; // SIS - Command post-conditional
|
57
|
+
else
|
58
|
+
state.commandMode = 2;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Do not color parameter list as line tag
|
62
|
+
if ((ch === "(") || (ch === "\u0009"))
|
63
|
+
state.label = false;
|
64
|
+
|
65
|
+
// MUMPS comment starts with ";"
|
66
|
+
if (ch === ";") {
|
67
|
+
stream.skipToEnd();
|
68
|
+
return "comment";
|
69
|
+
}
|
70
|
+
|
71
|
+
// Number Literals // SIS/RLM - MUMPS permits canonic number followed by concatenate operator
|
72
|
+
if (stream.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/))
|
73
|
+
return "number";
|
74
|
+
|
75
|
+
// Handle Strings
|
76
|
+
if (ch == '"') {
|
77
|
+
if (stream.skipTo('"')) {
|
78
|
+
stream.next();
|
79
|
+
return "string";
|
80
|
+
} else {
|
81
|
+
stream.skipToEnd();
|
82
|
+
return "error";
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
// Handle operators and Delimiters
|
87
|
+
if (stream.match(doubleOperators) || stream.match(singleOperators))
|
88
|
+
return "operator";
|
89
|
+
|
90
|
+
// Prevents leading "." in DO block from falling through to error
|
91
|
+
if (stream.match(singleDelimiters))
|
92
|
+
return null;
|
93
|
+
|
94
|
+
if (brackets.test(ch)) {
|
95
|
+
stream.next();
|
96
|
+
return "bracket";
|
97
|
+
}
|
98
|
+
|
99
|
+
if (state.commandMode > 0 && stream.match(command))
|
100
|
+
return "variable-2";
|
101
|
+
|
102
|
+
if (stream.match(intrinsicFuncs))
|
103
|
+
return "builtin";
|
104
|
+
|
105
|
+
if (stream.match(identifiers))
|
106
|
+
return "variable";
|
107
|
+
|
108
|
+
// Detect dollar-sign when not a documented intrinsic function
|
109
|
+
// "^" may introduce a GVN or SSVN - Color same as function
|
110
|
+
if (ch === "$" || ch === "^") {
|
111
|
+
stream.next();
|
112
|
+
return "builtin";
|
113
|
+
}
|
114
|
+
|
115
|
+
// MUMPS Indirection
|
116
|
+
if (ch === "@") {
|
117
|
+
stream.next();
|
118
|
+
return "string-2";
|
119
|
+
}
|
120
|
+
|
121
|
+
if (/[\w%]/.test(ch)) {
|
122
|
+
stream.eatWhile(/[\w%]/);
|
123
|
+
return "variable";
|
124
|
+
}
|
125
|
+
|
126
|
+
// Handle non-detected items
|
127
|
+
stream.next();
|
128
|
+
return "error";
|
129
|
+
}
|
130
|
+
|
131
|
+
return {
|
132
|
+
startState: function() {
|
133
|
+
return {
|
134
|
+
label: false,
|
135
|
+
commandMode: 0
|
136
|
+
};
|
137
|
+
},
|
138
|
+
|
139
|
+
token: function(stream, state) {
|
140
|
+
var style = tokenBase(stream, state);
|
141
|
+
if (state.label) return "tag";
|
142
|
+
return style;
|
143
|
+
}
|
144
|
+
};
|
145
|
+
});
|
146
|
+
|
147
|
+
CodeMirror.defineMIME("text/x-mumps", "mumps");
|
148
|
+
});
|