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,178 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
/*
|
5
|
+
Gherkin mode - http://www.cukes.info/
|
6
|
+
Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
|
7
|
+
*/
|
8
|
+
|
9
|
+
// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js
|
10
|
+
//var Quotes = {
|
11
|
+
// SINGLE: 1,
|
12
|
+
// DOUBLE: 2
|
13
|
+
//};
|
14
|
+
|
15
|
+
//var regex = {
|
16
|
+
// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/
|
17
|
+
//};
|
18
|
+
|
19
|
+
(function(mod) {
|
20
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
21
|
+
mod(require("../../lib/codemirror"));
|
22
|
+
else if (typeof define == "function" && define.amd) // AMD
|
23
|
+
define(["../../lib/codemirror"], mod);
|
24
|
+
else // Plain browser env
|
25
|
+
mod(CodeMirror);
|
26
|
+
})(function(CodeMirror) {
|
27
|
+
"use strict";
|
28
|
+
|
29
|
+
CodeMirror.defineMode("gherkin", function () {
|
30
|
+
return {
|
31
|
+
startState: function () {
|
32
|
+
return {
|
33
|
+
lineNumber: 0,
|
34
|
+
tableHeaderLine: false,
|
35
|
+
allowFeature: true,
|
36
|
+
allowBackground: false,
|
37
|
+
allowScenario: false,
|
38
|
+
allowSteps: false,
|
39
|
+
allowPlaceholders: false,
|
40
|
+
allowMultilineArgument: false,
|
41
|
+
inMultilineString: false,
|
42
|
+
inMultilineTable: false,
|
43
|
+
inKeywordLine: false
|
44
|
+
};
|
45
|
+
},
|
46
|
+
token: function (stream, state) {
|
47
|
+
if (stream.sol()) {
|
48
|
+
state.lineNumber++;
|
49
|
+
state.inKeywordLine = false;
|
50
|
+
if (state.inMultilineTable) {
|
51
|
+
state.tableHeaderLine = false;
|
52
|
+
if (!stream.match(/\s*\|/, false)) {
|
53
|
+
state.allowMultilineArgument = false;
|
54
|
+
state.inMultilineTable = false;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
stream.eatSpace();
|
60
|
+
|
61
|
+
if (state.allowMultilineArgument) {
|
62
|
+
|
63
|
+
// STRING
|
64
|
+
if (state.inMultilineString) {
|
65
|
+
if (stream.match('"""')) {
|
66
|
+
state.inMultilineString = false;
|
67
|
+
state.allowMultilineArgument = false;
|
68
|
+
} else {
|
69
|
+
stream.match(/.*/);
|
70
|
+
}
|
71
|
+
return "string";
|
72
|
+
}
|
73
|
+
|
74
|
+
// TABLE
|
75
|
+
if (state.inMultilineTable) {
|
76
|
+
if (stream.match(/\|\s*/)) {
|
77
|
+
return "bracket";
|
78
|
+
} else {
|
79
|
+
stream.match(/[^\|]*/);
|
80
|
+
return state.tableHeaderLine ? "header" : "string";
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
// DETECT START
|
85
|
+
if (stream.match('"""')) {
|
86
|
+
// String
|
87
|
+
state.inMultilineString = true;
|
88
|
+
return "string";
|
89
|
+
} else if (stream.match("|")) {
|
90
|
+
// Table
|
91
|
+
state.inMultilineTable = true;
|
92
|
+
state.tableHeaderLine = true;
|
93
|
+
return "bracket";
|
94
|
+
}
|
95
|
+
|
96
|
+
}
|
97
|
+
|
98
|
+
// LINE COMMENT
|
99
|
+
if (stream.match(/#.*/)) {
|
100
|
+
return "comment";
|
101
|
+
|
102
|
+
// TAG
|
103
|
+
} else if (!state.inKeywordLine && stream.match(/@\S+/)) {
|
104
|
+
return "tag";
|
105
|
+
|
106
|
+
// FEATURE
|
107
|
+
} else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {
|
108
|
+
state.allowScenario = true;
|
109
|
+
state.allowBackground = true;
|
110
|
+
state.allowPlaceholders = false;
|
111
|
+
state.allowSteps = false;
|
112
|
+
state.allowMultilineArgument = false;
|
113
|
+
state.inKeywordLine = true;
|
114
|
+
return "keyword";
|
115
|
+
|
116
|
+
// BACKGROUND
|
117
|
+
} else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {
|
118
|
+
state.allowPlaceholders = false;
|
119
|
+
state.allowSteps = true;
|
120
|
+
state.allowBackground = false;
|
121
|
+
state.allowMultilineArgument = false;
|
122
|
+
state.inKeywordLine = true;
|
123
|
+
return "keyword";
|
124
|
+
|
125
|
+
// SCENARIO OUTLINE
|
126
|
+
} else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {
|
127
|
+
state.allowPlaceholders = true;
|
128
|
+
state.allowSteps = true;
|
129
|
+
state.allowMultilineArgument = false;
|
130
|
+
state.inKeywordLine = true;
|
131
|
+
return "keyword";
|
132
|
+
|
133
|
+
// EXAMPLES
|
134
|
+
} else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {
|
135
|
+
state.allowPlaceholders = false;
|
136
|
+
state.allowSteps = true;
|
137
|
+
state.allowBackground = false;
|
138
|
+
state.allowMultilineArgument = true;
|
139
|
+
return "keyword";
|
140
|
+
|
141
|
+
// SCENARIO
|
142
|
+
} else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {
|
143
|
+
state.allowPlaceholders = false;
|
144
|
+
state.allowSteps = true;
|
145
|
+
state.allowBackground = false;
|
146
|
+
state.allowMultilineArgument = false;
|
147
|
+
state.inKeywordLine = true;
|
148
|
+
return "keyword";
|
149
|
+
|
150
|
+
// STEPS
|
151
|
+
} else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) {
|
152
|
+
state.inStep = true;
|
153
|
+
state.allowPlaceholders = true;
|
154
|
+
state.allowMultilineArgument = true;
|
155
|
+
state.inKeywordLine = true;
|
156
|
+
return "keyword";
|
157
|
+
|
158
|
+
// INLINE STRING
|
159
|
+
} else if (stream.match(/"[^"]*"?/)) {
|
160
|
+
return "string";
|
161
|
+
|
162
|
+
// PLACEHOLDER
|
163
|
+
} else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {
|
164
|
+
return "variable";
|
165
|
+
|
166
|
+
// Fall through
|
167
|
+
} else {
|
168
|
+
stream.next();
|
169
|
+
stream.eatWhile(/[^@"<#]/);
|
170
|
+
return null;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
};
|
174
|
+
});
|
175
|
+
|
176
|
+
CodeMirror.defineMIME("text/x-feature", "gherkin");
|
177
|
+
|
178
|
+
});
|
@@ -0,0 +1,187 @@
|
|
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("go", function(config) {
|
15
|
+
var indentUnit = config.indentUnit;
|
16
|
+
|
17
|
+
var keywords = {
|
18
|
+
"break":true, "case":true, "chan":true, "const":true, "continue":true,
|
19
|
+
"default":true, "defer":true, "else":true, "fallthrough":true, "for":true,
|
20
|
+
"func":true, "go":true, "goto":true, "if":true, "import":true,
|
21
|
+
"interface":true, "map":true, "package":true, "range":true, "return":true,
|
22
|
+
"select":true, "struct":true, "switch":true, "type":true, "var":true,
|
23
|
+
"bool":true, "byte":true, "complex64":true, "complex128":true,
|
24
|
+
"float32":true, "float64":true, "int8":true, "int16":true, "int32":true,
|
25
|
+
"int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,
|
26
|
+
"uint64":true, "int":true, "uint":true, "uintptr":true, "error": true,
|
27
|
+
"rune":true
|
28
|
+
};
|
29
|
+
|
30
|
+
var atoms = {
|
31
|
+
"true":true, "false":true, "iota":true, "nil":true, "append":true,
|
32
|
+
"cap":true, "close":true, "complex":true, "copy":true, "delete":true, "imag":true,
|
33
|
+
"len":true, "make":true, "new":true, "panic":true, "print":true,
|
34
|
+
"println":true, "real":true, "recover":true
|
35
|
+
};
|
36
|
+
|
37
|
+
var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
|
38
|
+
|
39
|
+
var curPunc;
|
40
|
+
|
41
|
+
function tokenBase(stream, state) {
|
42
|
+
var ch = stream.next();
|
43
|
+
if (ch == '"' || ch == "'" || ch == "`") {
|
44
|
+
state.tokenize = tokenString(ch);
|
45
|
+
return state.tokenize(stream, state);
|
46
|
+
}
|
47
|
+
if (/[\d\.]/.test(ch)) {
|
48
|
+
if (ch == ".") {
|
49
|
+
stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
|
50
|
+
} else if (ch == "0") {
|
51
|
+
stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
|
52
|
+
} else {
|
53
|
+
stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
|
54
|
+
}
|
55
|
+
return "number";
|
56
|
+
}
|
57
|
+
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
58
|
+
curPunc = ch;
|
59
|
+
return null;
|
60
|
+
}
|
61
|
+
if (ch == "/") {
|
62
|
+
if (stream.eat("*")) {
|
63
|
+
state.tokenize = tokenComment;
|
64
|
+
return tokenComment(stream, state);
|
65
|
+
}
|
66
|
+
if (stream.eat("/")) {
|
67
|
+
stream.skipToEnd();
|
68
|
+
return "comment";
|
69
|
+
}
|
70
|
+
}
|
71
|
+
if (isOperatorChar.test(ch)) {
|
72
|
+
stream.eatWhile(isOperatorChar);
|
73
|
+
return "operator";
|
74
|
+
}
|
75
|
+
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
|
76
|
+
var cur = stream.current();
|
77
|
+
if (keywords.propertyIsEnumerable(cur)) {
|
78
|
+
if (cur == "case" || cur == "default") curPunc = "case";
|
79
|
+
return "keyword";
|
80
|
+
}
|
81
|
+
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
82
|
+
return "variable";
|
83
|
+
}
|
84
|
+
|
85
|
+
function tokenString(quote) {
|
86
|
+
return function(stream, state) {
|
87
|
+
var escaped = false, next, end = false;
|
88
|
+
while ((next = stream.next()) != null) {
|
89
|
+
if (next == quote && !escaped) {end = true; break;}
|
90
|
+
escaped = !escaped && quote != "`" && next == "\\";
|
91
|
+
}
|
92
|
+
if (end || !(escaped || quote == "`"))
|
93
|
+
state.tokenize = tokenBase;
|
94
|
+
return "string";
|
95
|
+
};
|
96
|
+
}
|
97
|
+
|
98
|
+
function tokenComment(stream, state) {
|
99
|
+
var maybeEnd = false, ch;
|
100
|
+
while (ch = stream.next()) {
|
101
|
+
if (ch == "/" && maybeEnd) {
|
102
|
+
state.tokenize = tokenBase;
|
103
|
+
break;
|
104
|
+
}
|
105
|
+
maybeEnd = (ch == "*");
|
106
|
+
}
|
107
|
+
return "comment";
|
108
|
+
}
|
109
|
+
|
110
|
+
function Context(indented, column, type, align, prev) {
|
111
|
+
this.indented = indented;
|
112
|
+
this.column = column;
|
113
|
+
this.type = type;
|
114
|
+
this.align = align;
|
115
|
+
this.prev = prev;
|
116
|
+
}
|
117
|
+
function pushContext(state, col, type) {
|
118
|
+
return state.context = new Context(state.indented, col, type, null, state.context);
|
119
|
+
}
|
120
|
+
function popContext(state) {
|
121
|
+
if (!state.context.prev) return;
|
122
|
+
var t = state.context.type;
|
123
|
+
if (t == ")" || t == "]" || t == "}")
|
124
|
+
state.indented = state.context.indented;
|
125
|
+
return state.context = state.context.prev;
|
126
|
+
}
|
127
|
+
|
128
|
+
// Interface
|
129
|
+
|
130
|
+
return {
|
131
|
+
startState: function(basecolumn) {
|
132
|
+
return {
|
133
|
+
tokenize: null,
|
134
|
+
context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
|
135
|
+
indented: 0,
|
136
|
+
startOfLine: true
|
137
|
+
};
|
138
|
+
},
|
139
|
+
|
140
|
+
token: function(stream, state) {
|
141
|
+
var ctx = state.context;
|
142
|
+
if (stream.sol()) {
|
143
|
+
if (ctx.align == null) ctx.align = false;
|
144
|
+
state.indented = stream.indentation();
|
145
|
+
state.startOfLine = true;
|
146
|
+
if (ctx.type == "case") ctx.type = "}";
|
147
|
+
}
|
148
|
+
if (stream.eatSpace()) return null;
|
149
|
+
curPunc = null;
|
150
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
151
|
+
if (style == "comment") return style;
|
152
|
+
if (ctx.align == null) ctx.align = true;
|
153
|
+
|
154
|
+
if (curPunc == "{") pushContext(state, stream.column(), "}");
|
155
|
+
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
156
|
+
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
157
|
+
else if (curPunc == "case") ctx.type = "case";
|
158
|
+
else if (curPunc == "}" && ctx.type == "}") popContext(state);
|
159
|
+
else if (curPunc == ctx.type) popContext(state);
|
160
|
+
state.startOfLine = false;
|
161
|
+
return style;
|
162
|
+
},
|
163
|
+
|
164
|
+
indent: function(state, textAfter) {
|
165
|
+
if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
|
166
|
+
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
167
|
+
if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
|
168
|
+
state.context.type = "}";
|
169
|
+
return ctx.indented;
|
170
|
+
}
|
171
|
+
var closing = firstChar == ctx.type;
|
172
|
+
if (ctx.align) return ctx.column + (closing ? 0 : 1);
|
173
|
+
else return ctx.indented + (closing ? 0 : indentUnit);
|
174
|
+
},
|
175
|
+
|
176
|
+
electricChars: "{}):",
|
177
|
+
closeBrackets: "()[]{}''\"\"``",
|
178
|
+
fold: "brace",
|
179
|
+
blockCommentStart: "/*",
|
180
|
+
blockCommentEnd: "*/",
|
181
|
+
lineComment: "//"
|
182
|
+
};
|
183
|
+
});
|
184
|
+
|
185
|
+
CodeMirror.defineMIME("text/x-go", "go");
|
186
|
+
|
187
|
+
});
|
@@ -0,0 +1,230 @@
|
|
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("groovy", function(config) {
|
15
|
+
function words(str) {
|
16
|
+
var obj = {}, words = str.split(" ");
|
17
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
18
|
+
return obj;
|
19
|
+
}
|
20
|
+
var keywords = words(
|
21
|
+
"abstract as assert boolean break byte case catch char class const continue def default " +
|
22
|
+
"do double else enum extends final finally float for goto if implements import in " +
|
23
|
+
"instanceof int interface long native new package private protected public return " +
|
24
|
+
"short static strictfp super switch synchronized threadsafe throw throws trait transient " +
|
25
|
+
"try void volatile while");
|
26
|
+
var blockKeywords = words("catch class def do else enum finally for if interface switch trait try while");
|
27
|
+
var standaloneKeywords = words("return break continue");
|
28
|
+
var atoms = words("null true false this");
|
29
|
+
|
30
|
+
var curPunc;
|
31
|
+
function tokenBase(stream, state) {
|
32
|
+
var ch = stream.next();
|
33
|
+
if (ch == '"' || ch == "'") {
|
34
|
+
return startString(ch, stream, state);
|
35
|
+
}
|
36
|
+
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
37
|
+
curPunc = ch;
|
38
|
+
return null;
|
39
|
+
}
|
40
|
+
if (/\d/.test(ch)) {
|
41
|
+
stream.eatWhile(/[\w\.]/);
|
42
|
+
if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); }
|
43
|
+
return "number";
|
44
|
+
}
|
45
|
+
if (ch == "/") {
|
46
|
+
if (stream.eat("*")) {
|
47
|
+
state.tokenize.push(tokenComment);
|
48
|
+
return tokenComment(stream, state);
|
49
|
+
}
|
50
|
+
if (stream.eat("/")) {
|
51
|
+
stream.skipToEnd();
|
52
|
+
return "comment";
|
53
|
+
}
|
54
|
+
if (expectExpression(state.lastToken, false)) {
|
55
|
+
return startString(ch, stream, state);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
if (ch == "-" && stream.eat(">")) {
|
59
|
+
curPunc = "->";
|
60
|
+
return null;
|
61
|
+
}
|
62
|
+
if (/[+\-*&%=<>!?|\/~]/.test(ch)) {
|
63
|
+
stream.eatWhile(/[+\-*&%=<>|~]/);
|
64
|
+
return "operator";
|
65
|
+
}
|
66
|
+
stream.eatWhile(/[\w\$_]/);
|
67
|
+
if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; }
|
68
|
+
if (state.lastToken == ".") return "property";
|
69
|
+
if (stream.eat(":")) { curPunc = "proplabel"; return "property"; }
|
70
|
+
var cur = stream.current();
|
71
|
+
if (atoms.propertyIsEnumerable(cur)) { return "atom"; }
|
72
|
+
if (keywords.propertyIsEnumerable(cur)) {
|
73
|
+
if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
|
74
|
+
else if (standaloneKeywords.propertyIsEnumerable(cur)) curPunc = "standalone";
|
75
|
+
return "keyword";
|
76
|
+
}
|
77
|
+
return "variable";
|
78
|
+
}
|
79
|
+
tokenBase.isBase = true;
|
80
|
+
|
81
|
+
function startString(quote, stream, state) {
|
82
|
+
var tripleQuoted = false;
|
83
|
+
if (quote != "/" && stream.eat(quote)) {
|
84
|
+
if (stream.eat(quote)) tripleQuoted = true;
|
85
|
+
else return "string";
|
86
|
+
}
|
87
|
+
function t(stream, state) {
|
88
|
+
var escaped = false, next, end = !tripleQuoted;
|
89
|
+
while ((next = stream.next()) != null) {
|
90
|
+
if (next == quote && !escaped) {
|
91
|
+
if (!tripleQuoted) { break; }
|
92
|
+
if (stream.match(quote + quote)) { end = true; break; }
|
93
|
+
}
|
94
|
+
if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
|
95
|
+
state.tokenize.push(tokenBaseUntilBrace());
|
96
|
+
return "string";
|
97
|
+
}
|
98
|
+
escaped = !escaped && next == "\\";
|
99
|
+
}
|
100
|
+
if (end) state.tokenize.pop();
|
101
|
+
return "string";
|
102
|
+
}
|
103
|
+
state.tokenize.push(t);
|
104
|
+
return t(stream, state);
|
105
|
+
}
|
106
|
+
|
107
|
+
function tokenBaseUntilBrace() {
|
108
|
+
var depth = 1;
|
109
|
+
function t(stream, state) {
|
110
|
+
if (stream.peek() == "}") {
|
111
|
+
depth--;
|
112
|
+
if (depth == 0) {
|
113
|
+
state.tokenize.pop();
|
114
|
+
return state.tokenize[state.tokenize.length-1](stream, state);
|
115
|
+
}
|
116
|
+
} else if (stream.peek() == "{") {
|
117
|
+
depth++;
|
118
|
+
}
|
119
|
+
return tokenBase(stream, state);
|
120
|
+
}
|
121
|
+
t.isBase = true;
|
122
|
+
return t;
|
123
|
+
}
|
124
|
+
|
125
|
+
function tokenComment(stream, state) {
|
126
|
+
var maybeEnd = false, ch;
|
127
|
+
while (ch = stream.next()) {
|
128
|
+
if (ch == "/" && maybeEnd) {
|
129
|
+
state.tokenize.pop();
|
130
|
+
break;
|
131
|
+
}
|
132
|
+
maybeEnd = (ch == "*");
|
133
|
+
}
|
134
|
+
return "comment";
|
135
|
+
}
|
136
|
+
|
137
|
+
function expectExpression(last, newline) {
|
138
|
+
return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
|
139
|
+
last == "newstatement" || last == "keyword" || last == "proplabel" ||
|
140
|
+
(last == "standalone" && !newline);
|
141
|
+
}
|
142
|
+
|
143
|
+
function Context(indented, column, type, align, prev) {
|
144
|
+
this.indented = indented;
|
145
|
+
this.column = column;
|
146
|
+
this.type = type;
|
147
|
+
this.align = align;
|
148
|
+
this.prev = prev;
|
149
|
+
}
|
150
|
+
function pushContext(state, col, type) {
|
151
|
+
return state.context = new Context(state.indented, col, type, null, state.context);
|
152
|
+
}
|
153
|
+
function popContext(state) {
|
154
|
+
var t = state.context.type;
|
155
|
+
if (t == ")" || t == "]" || t == "}")
|
156
|
+
state.indented = state.context.indented;
|
157
|
+
return state.context = state.context.prev;
|
158
|
+
}
|
159
|
+
|
160
|
+
// Interface
|
161
|
+
|
162
|
+
return {
|
163
|
+
startState: function(basecolumn) {
|
164
|
+
return {
|
165
|
+
tokenize: [tokenBase],
|
166
|
+
context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
|
167
|
+
indented: 0,
|
168
|
+
startOfLine: true,
|
169
|
+
lastToken: null
|
170
|
+
};
|
171
|
+
},
|
172
|
+
|
173
|
+
token: function(stream, state) {
|
174
|
+
var ctx = state.context;
|
175
|
+
if (stream.sol()) {
|
176
|
+
if (ctx.align == null) ctx.align = false;
|
177
|
+
state.indented = stream.indentation();
|
178
|
+
state.startOfLine = true;
|
179
|
+
// Automatic semicolon insertion
|
180
|
+
if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) {
|
181
|
+
popContext(state); ctx = state.context;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
if (stream.eatSpace()) return null;
|
185
|
+
curPunc = null;
|
186
|
+
var style = state.tokenize[state.tokenize.length-1](stream, state);
|
187
|
+
if (style == "comment") return style;
|
188
|
+
if (ctx.align == null) ctx.align = true;
|
189
|
+
|
190
|
+
if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
|
191
|
+
// Handle indentation for {x -> \n ... }
|
192
|
+
else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
|
193
|
+
popContext(state);
|
194
|
+
state.context.align = false;
|
195
|
+
}
|
196
|
+
else if (curPunc == "{") pushContext(state, stream.column(), "}");
|
197
|
+
else if (curPunc == "[") pushContext(state, stream.column(), "]");
|
198
|
+
else if (curPunc == "(") pushContext(state, stream.column(), ")");
|
199
|
+
else if (curPunc == "}") {
|
200
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
201
|
+
if (ctx.type == "}") ctx = popContext(state);
|
202
|
+
while (ctx.type == "statement") ctx = popContext(state);
|
203
|
+
}
|
204
|
+
else if (curPunc == ctx.type) popContext(state);
|
205
|
+
else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
|
206
|
+
pushContext(state, stream.column(), "statement");
|
207
|
+
state.startOfLine = false;
|
208
|
+
state.lastToken = curPunc || style;
|
209
|
+
return style;
|
210
|
+
},
|
211
|
+
|
212
|
+
indent: function(state, textAfter) {
|
213
|
+
if (!state.tokenize[state.tokenize.length-1].isBase) return CodeMirror.Pass;
|
214
|
+
var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
|
215
|
+
if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) ctx = ctx.prev;
|
216
|
+
var closing = firstChar == ctx.type;
|
217
|
+
if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
|
218
|
+
else if (ctx.align) return ctx.column + (closing ? 0 : 1);
|
219
|
+
else return ctx.indented + (closing ? 0 : config.indentUnit);
|
220
|
+
},
|
221
|
+
|
222
|
+
electricChars: "{}",
|
223
|
+
closeBrackets: {triples: "'\""},
|
224
|
+
fold: "brace"
|
225
|
+
};
|
226
|
+
});
|
227
|
+
|
228
|
+
CodeMirror.defineMIME("text/x-groovy", "groovy");
|
229
|
+
|
230
|
+
});
|