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,195 @@
|
|
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("ebnf", function (config) {
|
15
|
+
var commentType = {slash: 0, parenthesis: 1};
|
16
|
+
var stateType = {comment: 0, _string: 1, characterClass: 2};
|
17
|
+
var bracesMode = null;
|
18
|
+
|
19
|
+
if (config.bracesMode)
|
20
|
+
bracesMode = CodeMirror.getMode(config, config.bracesMode);
|
21
|
+
|
22
|
+
return {
|
23
|
+
startState: function () {
|
24
|
+
return {
|
25
|
+
stringType: null,
|
26
|
+
commentType: null,
|
27
|
+
braced: 0,
|
28
|
+
lhs: true,
|
29
|
+
localState: null,
|
30
|
+
stack: [],
|
31
|
+
inDefinition: false
|
32
|
+
};
|
33
|
+
},
|
34
|
+
token: function (stream, state) {
|
35
|
+
if (!stream) return;
|
36
|
+
|
37
|
+
//check for state changes
|
38
|
+
if (state.stack.length === 0) {
|
39
|
+
//strings
|
40
|
+
if ((stream.peek() == '"') || (stream.peek() == "'")) {
|
41
|
+
state.stringType = stream.peek();
|
42
|
+
stream.next(); // Skip quote
|
43
|
+
state.stack.unshift(stateType._string);
|
44
|
+
} else if (stream.match(/^\/\*/)) { //comments starting with /*
|
45
|
+
state.stack.unshift(stateType.comment);
|
46
|
+
state.commentType = commentType.slash;
|
47
|
+
} else if (stream.match(/^\(\*/)) { //comments starting with (*
|
48
|
+
state.stack.unshift(stateType.comment);
|
49
|
+
state.commentType = commentType.parenthesis;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
//return state
|
54
|
+
//stack has
|
55
|
+
switch (state.stack[0]) {
|
56
|
+
case stateType._string:
|
57
|
+
while (state.stack[0] === stateType._string && !stream.eol()) {
|
58
|
+
if (stream.peek() === state.stringType) {
|
59
|
+
stream.next(); // Skip quote
|
60
|
+
state.stack.shift(); // Clear flag
|
61
|
+
} else if (stream.peek() === "\\") {
|
62
|
+
stream.next();
|
63
|
+
stream.next();
|
64
|
+
} else {
|
65
|
+
stream.match(/^.[^\\\"\']*/);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
return state.lhs ? "property string" : "string"; // Token style
|
69
|
+
|
70
|
+
case stateType.comment:
|
71
|
+
while (state.stack[0] === stateType.comment && !stream.eol()) {
|
72
|
+
if (state.commentType === commentType.slash && stream.match(/\*\//)) {
|
73
|
+
state.stack.shift(); // Clear flag
|
74
|
+
state.commentType = null;
|
75
|
+
} else if (state.commentType === commentType.parenthesis && stream.match(/\*\)/)) {
|
76
|
+
state.stack.shift(); // Clear flag
|
77
|
+
state.commentType = null;
|
78
|
+
} else {
|
79
|
+
stream.match(/^.[^\*]*/);
|
80
|
+
}
|
81
|
+
}
|
82
|
+
return "comment";
|
83
|
+
|
84
|
+
case stateType.characterClass:
|
85
|
+
while (state.stack[0] === stateType.characterClass && !stream.eol()) {
|
86
|
+
if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
|
87
|
+
state.stack.shift();
|
88
|
+
}
|
89
|
+
}
|
90
|
+
return "operator";
|
91
|
+
}
|
92
|
+
|
93
|
+
var peek = stream.peek();
|
94
|
+
|
95
|
+
if (bracesMode !== null && (state.braced || peek === "{")) {
|
96
|
+
if (state.localState === null)
|
97
|
+
state.localState = CodeMirror.startState(bracesMode);
|
98
|
+
|
99
|
+
var token = bracesMode.token(stream, state.localState),
|
100
|
+
text = stream.current();
|
101
|
+
|
102
|
+
if (!token) {
|
103
|
+
for (var i = 0; i < text.length; i++) {
|
104
|
+
if (text[i] === "{") {
|
105
|
+
if (state.braced === 0) {
|
106
|
+
token = "matchingbracket";
|
107
|
+
}
|
108
|
+
state.braced++;
|
109
|
+
} else if (text[i] === "}") {
|
110
|
+
state.braced--;
|
111
|
+
if (state.braced === 0) {
|
112
|
+
token = "matchingbracket";
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
return token;
|
118
|
+
}
|
119
|
+
|
120
|
+
//no stack
|
121
|
+
switch (peek) {
|
122
|
+
case "[":
|
123
|
+
stream.next();
|
124
|
+
state.stack.unshift(stateType.characterClass);
|
125
|
+
return "bracket";
|
126
|
+
case ":":
|
127
|
+
case "|":
|
128
|
+
case ";":
|
129
|
+
stream.next();
|
130
|
+
return "operator";
|
131
|
+
case "%":
|
132
|
+
if (stream.match("%%")) {
|
133
|
+
return "header";
|
134
|
+
} else if (stream.match(/[%][A-Za-z]+/)) {
|
135
|
+
return "keyword";
|
136
|
+
} else if (stream.match(/[%][}]/)) {
|
137
|
+
return "matchingbracket";
|
138
|
+
}
|
139
|
+
break;
|
140
|
+
case "/":
|
141
|
+
if (stream.match(/[\/][A-Za-z]+/)) {
|
142
|
+
return "keyword";
|
143
|
+
}
|
144
|
+
case "\\":
|
145
|
+
if (stream.match(/[\][a-z]+/)) {
|
146
|
+
return "string-2";
|
147
|
+
}
|
148
|
+
case ".":
|
149
|
+
if (stream.match(".")) {
|
150
|
+
return "atom";
|
151
|
+
}
|
152
|
+
case "*":
|
153
|
+
case "-":
|
154
|
+
case "+":
|
155
|
+
case "^":
|
156
|
+
if (stream.match(peek)) {
|
157
|
+
return "atom";
|
158
|
+
}
|
159
|
+
case "$":
|
160
|
+
if (stream.match("$$")) {
|
161
|
+
return "builtin";
|
162
|
+
} else if (stream.match(/[$][0-9]+/)) {
|
163
|
+
return "variable-3";
|
164
|
+
}
|
165
|
+
case "<":
|
166
|
+
if (stream.match(/<<[a-zA-Z_]+>>/)) {
|
167
|
+
return "builtin";
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
171
|
+
if (stream.match(/^\/\//)) {
|
172
|
+
stream.skipToEnd();
|
173
|
+
return "comment";
|
174
|
+
} else if (stream.match(/return/)) {
|
175
|
+
return "operator";
|
176
|
+
} else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {
|
177
|
+
if (stream.match(/(?=[\(.])/)) {
|
178
|
+
return "variable";
|
179
|
+
} else if (stream.match(/(?=[\s\n]*[:=])/)) {
|
180
|
+
return "def";
|
181
|
+
}
|
182
|
+
return "variable-2";
|
183
|
+
} else if (["[", "]", "(", ")"].indexOf(stream.peek()) != -1) {
|
184
|
+
stream.next();
|
185
|
+
return "bracket";
|
186
|
+
} else if (!stream.eatSpace()) {
|
187
|
+
stream.next();
|
188
|
+
}
|
189
|
+
return null;
|
190
|
+
}
|
191
|
+
};
|
192
|
+
});
|
193
|
+
|
194
|
+
CodeMirror.defineMIME("text/x-ebnf", "ebnf");
|
195
|
+
});
|
@@ -0,0 +1,206 @@
|
|
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("ecl", function(config) {
|
15
|
+
|
16
|
+
function words(str) {
|
17
|
+
var obj = {}, words = str.split(" ");
|
18
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
19
|
+
return obj;
|
20
|
+
}
|
21
|
+
|
22
|
+
function metaHook(stream, state) {
|
23
|
+
if (!state.startOfLine) return false;
|
24
|
+
stream.skipToEnd();
|
25
|
+
return "meta";
|
26
|
+
}
|
27
|
+
|
28
|
+
var indentUnit = config.indentUnit;
|
29
|
+
var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode");
|
30
|
+
var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait");
|
31
|
+
var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath");
|
32
|
+
var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode");
|
33
|
+
var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when");
|
34
|
+
var blockKeywords = words("catch class do else finally for if switch try while");
|
35
|
+
var atoms = words("true false null");
|
36
|
+
var hooks = {"#": metaHook};
|
37
|
+
var isOperatorChar = /[+\-*&%=<>!?|\/]/;
|
38
|
+
|
39
|
+
var curPunc;
|
40
|
+
|
41
|
+
function tokenBase(stream, state) {
|
42
|
+
var ch = stream.next();
|
43
|
+
if (hooks[ch]) {
|
44
|
+
var result = hooks[ch](stream, state);
|
45
|
+
if (result !== false) return result;
|
46
|
+
}
|
47
|
+
if (ch == '"' || ch == "'") {
|
48
|
+
state.tokenize = tokenString(ch);
|
49
|
+
return state.tokenize(stream, state);
|
50
|
+
}
|
51
|
+
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
52
|
+
curPunc = ch;
|
53
|
+
return null;
|
54
|
+
}
|
55
|
+
if (/\d/.test(ch)) {
|
56
|
+
stream.eatWhile(/[\w\.]/);
|
57
|
+
return "number";
|
58
|
+
}
|
59
|
+
if (ch == "/") {
|
60
|
+
if (stream.eat("*")) {
|
61
|
+
state.tokenize = tokenComment;
|
62
|
+
return tokenComment(stream, state);
|
63
|
+
}
|
64
|
+
if (stream.eat("/")) {
|
65
|
+
stream.skipToEnd();
|
66
|
+
return "comment";
|
67
|
+
}
|
68
|
+
}
|
69
|
+
if (isOperatorChar.test(ch)) {
|
70
|
+
stream.eatWhile(isOperatorChar);
|
71
|
+
return "operator";
|
72
|
+
}
|
73
|
+
stream.eatWhile(/[\w\$_]/);
|
74
|
+
var cur = stream.current().toLowerCase();
|
75
|
+
if (keyword.propertyIsEnumerable(cur)) {
|
76
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
77
|
+
return "keyword";
|
78
|
+
} else if (variable.propertyIsEnumerable(cur)) {
|
79
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
80
|
+
return "variable";
|
81
|
+
} else if (variable_2.propertyIsEnumerable(cur)) {
|
82
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
83
|
+
return "variable-2";
|
84
|
+
} else if (variable_3.propertyIsEnumerable(cur)) {
|
85
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
86
|
+
return "variable-3";
|
87
|
+
} else if (builtin.propertyIsEnumerable(cur)) {
|
88
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
89
|
+
return "builtin";
|
90
|
+
} else { //Data types are of from KEYWORD##
|
91
|
+
var i = cur.length - 1;
|
92
|
+
while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))
|
93
|
+
--i;
|
94
|
+
|
95
|
+
if (i > 0) {
|
96
|
+
var cur2 = cur.substr(0, i + 1);
|
97
|
+
if (variable_3.propertyIsEnumerable(cur2)) {
|
98
|
+
if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement";
|
99
|
+
return "variable-3";
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
104
|
+
return null;
|
105
|
+
}
|
106
|
+
|
107
|
+
function tokenString(quote) {
|
108
|
+
return function(stream, state) {
|
109
|
+
var escaped = false, next, end = false;
|
110
|
+
while ((next = stream.next()) != null) {
|
111
|
+
if (next == quote && !escaped) {end = true; break;}
|
112
|
+
escaped = !escaped && next == "\\";
|
113
|
+
}
|
114
|
+
if (end || !escaped)
|
115
|
+
state.tokenize = tokenBase;
|
116
|
+
return "string";
|
117
|
+
};
|
118
|
+
}
|
119
|
+
|
120
|
+
function tokenComment(stream, state) {
|
121
|
+
var maybeEnd = false, ch;
|
122
|
+
while (ch = stream.next()) {
|
123
|
+
if (ch == "/" && maybeEnd) {
|
124
|
+
state.tokenize = tokenBase;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
maybeEnd = (ch == "*");
|
128
|
+
}
|
129
|
+
return "comment";
|
130
|
+
}
|
131
|
+
|
132
|
+
function Context(indented, column, type, align, prev) {
|
133
|
+
this.indented = indented;
|
134
|
+
this.column = column;
|
135
|
+
this.type = type;
|
136
|
+
this.align = align;
|
137
|
+
this.prev = prev;
|
138
|
+
}
|
139
|
+
function pushContext(state, col, type) {
|
140
|
+
return state.context = new Context(state.indented, col, type, null, state.context);
|
141
|
+
}
|
142
|
+
function popContext(state) {
|
143
|
+
var t = state.context.type;
|
144
|
+
if (t == ")" || t == "]" || t == "}")
|
145
|
+
state.indented = state.context.indented;
|
146
|
+
return state.context = state.context.prev;
|
147
|
+
}
|
148
|
+
|
149
|
+
// Interface
|
150
|
+
|
151
|
+
return {
|
152
|
+
startState: function(basecolumn) {
|
153
|
+
return {
|
154
|
+
tokenize: null,
|
155
|
+
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
|
156
|
+
indented: 0,
|
157
|
+
startOfLine: true
|
158
|
+
};
|
159
|
+
},
|
160
|
+
|
161
|
+
token: function(stream, state) {
|
162
|
+
var ctx = state.context;
|
163
|
+
if (stream.sol()) {
|
164
|
+
if (ctx.align == null) ctx.align = false;
|
165
|
+
state.indented = stream.indentation();
|
166
|
+
state.startOfLine = true;
|
167
|
+
}
|
168
|
+
if (stream.eatSpace()) return null;
|
169
|
+
curPunc = null;
|
170
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
171
|
+
if (style == "comment" || style == "meta") return style;
|
172
|
+
if (ctx.align == null) ctx.align = true;
|
173
|
+
|
174
|
+
if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
|
175
|
+
else if (curPunc == "{") pushContext(state, stream.column(), "}");
|
176
|
+
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
177
|
+
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
178
|
+
else if (curPunc == "}") {
|
179
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
180
|
+
if (ctx.type == "}") ctx = popContext(state);
|
181
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
182
|
+
}
|
183
|
+
else if (curPunc == ctx.type) popContext(state);
|
184
|
+
else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
|
185
|
+
pushContext(state, stream.column(), "statement");
|
186
|
+
state.startOfLine = false;
|
187
|
+
return style;
|
188
|
+
},
|
189
|
+
|
190
|
+
indent: function(state, textAfter) {
|
191
|
+
if (state.tokenize != tokenBase && state.tokenize != null) return 0;
|
192
|
+
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
193
|
+
if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
|
194
|
+
var closing = firstChar == ctx.type;
|
195
|
+
if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
|
196
|
+
else if (ctx.align) return ctx.column + (closing ? 0 : 1);
|
197
|
+
else return ctx.indented + (closing ? 0 : indentUnit);
|
198
|
+
},
|
199
|
+
|
200
|
+
electricChars: "{}"
|
201
|
+
};
|
202
|
+
});
|
203
|
+
|
204
|
+
CodeMirror.defineMIME("text/x-ecl", "ecl");
|
205
|
+
|
206
|
+
});
|
@@ -0,0 +1,160 @@
|
|
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("eiffel", function() {
|
15
|
+
function wordObj(words) {
|
16
|
+
var o = {};
|
17
|
+
for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
|
18
|
+
return o;
|
19
|
+
}
|
20
|
+
var keywords = wordObj([
|
21
|
+
'note',
|
22
|
+
'across',
|
23
|
+
'when',
|
24
|
+
'variant',
|
25
|
+
'until',
|
26
|
+
'unique',
|
27
|
+
'undefine',
|
28
|
+
'then',
|
29
|
+
'strip',
|
30
|
+
'select',
|
31
|
+
'retry',
|
32
|
+
'rescue',
|
33
|
+
'require',
|
34
|
+
'rename',
|
35
|
+
'reference',
|
36
|
+
'redefine',
|
37
|
+
'prefix',
|
38
|
+
'once',
|
39
|
+
'old',
|
40
|
+
'obsolete',
|
41
|
+
'loop',
|
42
|
+
'local',
|
43
|
+
'like',
|
44
|
+
'is',
|
45
|
+
'inspect',
|
46
|
+
'infix',
|
47
|
+
'include',
|
48
|
+
'if',
|
49
|
+
'frozen',
|
50
|
+
'from',
|
51
|
+
'external',
|
52
|
+
'export',
|
53
|
+
'ensure',
|
54
|
+
'end',
|
55
|
+
'elseif',
|
56
|
+
'else',
|
57
|
+
'do',
|
58
|
+
'creation',
|
59
|
+
'create',
|
60
|
+
'check',
|
61
|
+
'alias',
|
62
|
+
'agent',
|
63
|
+
'separate',
|
64
|
+
'invariant',
|
65
|
+
'inherit',
|
66
|
+
'indexing',
|
67
|
+
'feature',
|
68
|
+
'expanded',
|
69
|
+
'deferred',
|
70
|
+
'class',
|
71
|
+
'Void',
|
72
|
+
'True',
|
73
|
+
'Result',
|
74
|
+
'Precursor',
|
75
|
+
'False',
|
76
|
+
'Current',
|
77
|
+
'create',
|
78
|
+
'attached',
|
79
|
+
'detachable',
|
80
|
+
'as',
|
81
|
+
'and',
|
82
|
+
'implies',
|
83
|
+
'not',
|
84
|
+
'or'
|
85
|
+
]);
|
86
|
+
var operators = wordObj([":=", "and then","and", "or","<<",">>"]);
|
87
|
+
|
88
|
+
function chain(newtok, stream, state) {
|
89
|
+
state.tokenize.push(newtok);
|
90
|
+
return newtok(stream, state);
|
91
|
+
}
|
92
|
+
|
93
|
+
function tokenBase(stream, state) {
|
94
|
+
if (stream.eatSpace()) return null;
|
95
|
+
var ch = stream.next();
|
96
|
+
if (ch == '"'||ch == "'") {
|
97
|
+
return chain(readQuoted(ch, "string"), stream, state);
|
98
|
+
} else if (ch == "-"&&stream.eat("-")) {
|
99
|
+
stream.skipToEnd();
|
100
|
+
return "comment";
|
101
|
+
} else if (ch == ":"&&stream.eat("=")) {
|
102
|
+
return "operator";
|
103
|
+
} else if (/[0-9]/.test(ch)) {
|
104
|
+
stream.eatWhile(/[xXbBCc0-9\.]/);
|
105
|
+
stream.eat(/[\?\!]/);
|
106
|
+
return "ident";
|
107
|
+
} else if (/[a-zA-Z_0-9]/.test(ch)) {
|
108
|
+
stream.eatWhile(/[a-zA-Z_0-9]/);
|
109
|
+
stream.eat(/[\?\!]/);
|
110
|
+
return "ident";
|
111
|
+
} else if (/[=+\-\/*^%<>~]/.test(ch)) {
|
112
|
+
stream.eatWhile(/[=+\-\/*^%<>~]/);
|
113
|
+
return "operator";
|
114
|
+
} else {
|
115
|
+
return null;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
function readQuoted(quote, style, unescaped) {
|
120
|
+
return function(stream, state) {
|
121
|
+
var escaped = false, ch;
|
122
|
+
while ((ch = stream.next()) != null) {
|
123
|
+
if (ch == quote && (unescaped || !escaped)) {
|
124
|
+
state.tokenize.pop();
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
escaped = !escaped && ch == "%";
|
128
|
+
}
|
129
|
+
return style;
|
130
|
+
};
|
131
|
+
}
|
132
|
+
|
133
|
+
return {
|
134
|
+
startState: function() {
|
135
|
+
return {tokenize: [tokenBase]};
|
136
|
+
},
|
137
|
+
|
138
|
+
token: function(stream, state) {
|
139
|
+
var style = state.tokenize[state.tokenize.length-1](stream, state);
|
140
|
+
if (style == "ident") {
|
141
|
+
var word = stream.current();
|
142
|
+
style = keywords.propertyIsEnumerable(stream.current()) ? "keyword"
|
143
|
+
: operators.propertyIsEnumerable(stream.current()) ? "operator"
|
144
|
+
: /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag"
|
145
|
+
: /^0[bB][0-1]+$/g.test(word) ? "number"
|
146
|
+
: /^0[cC][0-7]+$/g.test(word) ? "number"
|
147
|
+
: /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number"
|
148
|
+
: /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number"
|
149
|
+
: /^[0-9]+$/g.test(word) ? "number"
|
150
|
+
: "variable";
|
151
|
+
}
|
152
|
+
return style;
|
153
|
+
},
|
154
|
+
lineComment: "--"
|
155
|
+
};
|
156
|
+
});
|
157
|
+
|
158
|
+
CodeMirror.defineMIME("text/x-eiffel", "eiffel");
|
159
|
+
|
160
|
+
});
|