swagr 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/swagr +15 -0
- data/examples/examples01/app.rb +6 -2
- data/examples/examples01/coffee/data_port.coffee +2 -0
- data/examples/examples01/static/css/codemirror.css +1247 -0
- data/examples/examples01/static/js/codemirror-compressed-3-0.js +5 -0
- data/examples/examples01/static/js/codemirror/keymap/emacs.js +30 -0
- data/examples/examples01/static/js/codemirror/keymap/vim.js +2298 -0
- data/examples/examples01/static/js/codemirror/lib/codemirror.css +239 -0
- data/examples/examples01/static/js/codemirror/lib/codemirror.js +4553 -0
- data/examples/examples01/static/js/codemirror/lib/util/closetag.js +85 -0
- data/examples/examples01/static/js/codemirror/lib/util/colorize.js +29 -0
- data/examples/examples01/static/js/codemirror/lib/util/continuecomment.js +36 -0
- data/examples/examples01/static/js/codemirror/lib/util/continuelist.js +28 -0
- data/examples/examples01/static/js/codemirror/lib/util/dialog.css +32 -0
- data/examples/examples01/static/js/codemirror/lib/util/dialog.js +75 -0
- data/examples/examples01/static/js/codemirror/lib/util/foldcode.js +182 -0
- data/examples/examples01/static/js/codemirror/lib/util/formatting.js +108 -0
- data/examples/examples01/static/js/codemirror/lib/util/javascript-hint.js +137 -0
- data/examples/examples01/static/js/codemirror/lib/util/loadmode.js +51 -0
- data/examples/examples01/static/js/codemirror/lib/util/match-highlighter.js +46 -0
- data/examples/examples01/static/js/codemirror/lib/util/matchbrackets.js +63 -0
- data/examples/examples01/static/js/codemirror/lib/util/multiplex.js +95 -0
- data/examples/examples01/static/js/codemirror/lib/util/overlay.js +59 -0
- data/examples/examples01/static/js/codemirror/lib/util/pig-hint.js +117 -0
- data/examples/examples01/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
- data/examples/examples01/static/js/codemirror/lib/util/runmode.js +52 -0
- data/examples/examples01/static/js/codemirror/lib/util/search.js +119 -0
- data/examples/examples01/static/js/codemirror/lib/util/searchcursor.js +119 -0
- data/examples/examples01/static/js/codemirror/lib/util/simple-hint.css +16 -0
- data/examples/examples01/static/js/codemirror/lib/util/simple-hint.js +102 -0
- data/examples/examples01/static/js/codemirror/lib/util/xml-hint.js +131 -0
- data/examples/examples01/static/js/codemirror/mode/clike/clike.js +300 -0
- data/examples/examples01/static/js/codemirror/mode/clike/index.html +103 -0
- data/examples/examples01/static/js/codemirror/mode/clike/scala.html +767 -0
- data/examples/examples01/static/js/codemirror/mode/clojure/clojure.js +206 -0
- data/examples/examples01/static/js/codemirror/mode/clojure/index.html +67 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/index.html +728 -0
- data/examples/examples01/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/examples/examples01/static/js/codemirror/mode/commonlisp/index.html +165 -0
- data/examples/examples01/static/js/codemirror/mode/css/css.js +465 -0
- data/examples/examples01/static/js/codemirror/mode/css/index.html +58 -0
- data/examples/examples01/static/js/codemirror/mode/css/test.js +501 -0
- data/examples/examples01/static/js/codemirror/mode/diff/diff.js +32 -0
- data/examples/examples01/static/js/codemirror/mode/diff/index.html +105 -0
- data/examples/examples01/static/js/codemirror/mode/ecl/ecl.js +192 -0
- data/examples/examples01/static/js/codemirror/mode/ecl/index.html +39 -0
- data/examples/examples01/static/js/codemirror/mode/erlang/erlang.js +463 -0
- data/examples/examples01/static/js/codemirror/mode/erlang/index.html +64 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/gfm.js +94 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/index.html +70 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/test.js +225 -0
- data/examples/examples01/static/js/codemirror/mode/go/go.js +165 -0
- data/examples/examples01/static/js/codemirror/mode/go/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/groovy/groovy.js +210 -0
- data/examples/examples01/static/js/codemirror/mode/groovy/index.html +73 -0
- data/examples/examples01/static/js/codemirror/mode/haskell/haskell.js +242 -0
- data/examples/examples01/static/js/codemirror/mode/haskell/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/haxe/haxe.js +429 -0
- data/examples/examples01/static/js/codemirror/mode/haxe/index.html +90 -0
- data/examples/examples01/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/examples/examples01/static/js/codemirror/mode/htmlembedded/index.html +49 -0
- data/examples/examples01/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
- data/examples/examples01/static/js/codemirror/mode/htmlmixed/index.html +52 -0
- data/examples/examples01/static/js/codemirror/mode/http/http.js +98 -0
- data/examples/examples01/static/js/codemirror/mode/http/index.html +32 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/index.html +88 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/javascript.js +411 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/typescript.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/jinja2/index.html +38 -0
- data/examples/examples01/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
- data/examples/examples01/static/js/codemirror/mode/less/index.html +741 -0
- data/examples/examples01/static/js/codemirror/mode/less/less.js +266 -0
- data/examples/examples01/static/js/codemirror/mode/lua/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/lua/lua.js +140 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/index.html +344 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/markdown.js +474 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/test.js +1266 -0
- data/examples/examples01/static/js/codemirror/mode/mysql/index.html +41 -0
- data/examples/examples01/static/js/codemirror/mode/mysql/mysql.js +203 -0
- data/examples/examples01/static/js/codemirror/mode/ntriples/index.html +33 -0
- data/examples/examples01/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
- data/examples/examples01/static/js/codemirror/mode/ocaml/index.html +131 -0
- data/examples/examples01/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/LICENSE +7 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/index.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/pascal.js +94 -0
- data/examples/examples01/static/js/codemirror/mode/perl/LICENSE +19 -0
- data/examples/examples01/static/js/codemirror/mode/perl/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/perl/perl.js +816 -0
- data/examples/examples01/static/js/codemirror/mode/php/index.html +51 -0
- data/examples/examples01/static/js/codemirror/mode/php/php.js +129 -0
- data/examples/examples01/static/js/codemirror/mode/pig/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/pig/pig.js +171 -0
- data/examples/examples01/static/js/codemirror/mode/plsql/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/plsql/plsql.js +216 -0
- data/examples/examples01/static/js/codemirror/mode/properties/index.html +41 -0
- data/examples/examples01/static/js/codemirror/mode/properties/properties.js +63 -0
- data/examples/examples01/static/js/codemirror/mode/python/LICENSE.txt +21 -0
- data/examples/examples01/static/js/codemirror/mode/python/index.html +124 -0
- data/examples/examples01/static/js/codemirror/mode/python/python.js +340 -0
- data/examples/examples01/static/js/codemirror/mode/r/LICENSE +24 -0
- data/examples/examples01/static/js/codemirror/mode/r/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/r/r.js +141 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/changes/index.html +53 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/index.html +99 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
- data/examples/examples01/static/js/codemirror/mode/rst/index.html +526 -0
- data/examples/examples01/static/js/codemirror/mode/rst/rst.js +314 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/LICENSE +24 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/index.html +173 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/ruby.js +195 -0
- data/examples/examples01/static/js/codemirror/mode/rust/index.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/rust/rust.js +432 -0
- data/examples/examples01/static/js/codemirror/mode/scheme/index.html +65 -0
- data/examples/examples01/static/js/codemirror/mode/scheme/scheme.js +230 -0
- data/examples/examples01/static/js/codemirror/mode/shell/index.html +51 -0
- data/examples/examples01/static/js/codemirror/mode/shell/shell.js +118 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/LICENSE +23 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/index.html +81 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/sieve.js +156 -0
- data/examples/examples01/static/js/codemirror/mode/smalltalk/index.html +57 -0
- data/examples/examples01/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
- data/examples/examples01/static/js/codemirror/mode/smarty/index.html +83 -0
- data/examples/examples01/static/js/codemirror/mode/smarty/smarty.js +148 -0
- data/examples/examples01/static/js/codemirror/mode/sparql/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/sparql/sparql.js +143 -0
- data/examples/examples01/static/js/codemirror/mode/stex/index.html +98 -0
- data/examples/examples01/static/js/codemirror/mode/stex/stex.js +175 -0
- data/examples/examples01/static/js/codemirror/mode/stex/test.js +343 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/index.html +81 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/tiki.css +26 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/tiki.js +309 -0
- data/examples/examples01/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
- data/examples/examples01/static/js/codemirror/mode/vb/index.html +88 -0
- data/examples/examples01/static/js/codemirror/mode/vb/vb.js +260 -0
- data/examples/examples01/static/js/codemirror/mode/vbscript/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
- data/examples/examples01/static/js/codemirror/mode/velocity/index.html +103 -0
- data/examples/examples01/static/js/codemirror/mode/velocity/velocity.js +144 -0
- data/examples/examples01/static/js/codemirror/mode/verilog/index.html +210 -0
- data/examples/examples01/static/js/codemirror/mode/verilog/verilog.js +182 -0
- data/examples/examples01/static/js/codemirror/mode/xml/index.html +45 -0
- data/examples/examples01/static/js/codemirror/mode/xml/xml.js +324 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/LICENSE +20 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/index.html +221 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/test.js +77 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/xquery.js +450 -0
- data/examples/examples01/static/js/codemirror/mode/yaml/index.html +68 -0
- data/examples/examples01/static/js/codemirror/mode/yaml/yaml.js +95 -0
- data/examples/examples01/static/js/codemirror/mode/z80/index.html +39 -0
- data/examples/examples01/static/js/codemirror/mode/z80/z80.js +113 -0
- data/examples/examples01/static/js/codemirror/theme/ambiance-mobile.css +6 -0
- data/examples/examples01/static/js/codemirror/theme/ambiance.css +76 -0
- data/examples/examples01/static/js/codemirror/theme/blackboard.css +25 -0
- data/examples/examples01/static/js/codemirror/theme/cobalt.css +18 -0
- data/examples/examples01/static/js/codemirror/theme/eclipse.css +25 -0
- data/examples/examples01/static/js/codemirror/theme/elegant.css +10 -0
- data/examples/examples01/static/js/codemirror/theme/erlang-dark.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/lesser-dark.css +44 -0
- data/examples/examples01/static/js/codemirror/theme/monokai.css +28 -0
- data/examples/examples01/static/js/codemirror/theme/neat.css +9 -0
- data/examples/examples01/static/js/codemirror/theme/night.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/rubyblue.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/solarized.css +207 -0
- data/examples/examples01/static/js/codemirror/theme/twilight.css +26 -0
- data/examples/examples01/static/js/codemirror/theme/vibrant-ink.css +27 -0
- data/examples/examples01/static/js/codemirror/theme/xq-dark.css +46 -0
- data/examples/examples01/static/js/d3.v3.min.js +2 -2
- data/examples/examples01/static/test/cm.html +33 -0
- data/examples/examples01/views/about.slim +15 -0
- data/examples/examples01/views/index.slim +1 -1
- data/examples/examples01/views/layout.slim +1 -0
- data/examples/examples01/views/layout_cm.slim +17 -0
- data/examples/examples01/views/navbar.slim +4 -4
- data/lib/swagr/version.rb +1 -1
- data/templates/app.rb +4 -0
- data/templates/static/js/codemirror/keymap/emacs.js +30 -0
- data/templates/static/js/codemirror/keymap/vim.js +2298 -0
- data/templates/static/js/codemirror/lib/codemirror.css +239 -0
- data/templates/static/js/codemirror/lib/codemirror.js +4553 -0
- data/templates/static/js/codemirror/lib/util/closetag.js +85 -0
- data/templates/static/js/codemirror/lib/util/colorize.js +29 -0
- data/templates/static/js/codemirror/lib/util/continuecomment.js +36 -0
- data/templates/static/js/codemirror/lib/util/continuelist.js +28 -0
- data/templates/static/js/codemirror/lib/util/dialog.css +32 -0
- data/templates/static/js/codemirror/lib/util/dialog.js +75 -0
- data/templates/static/js/codemirror/lib/util/foldcode.js +182 -0
- data/templates/static/js/codemirror/lib/util/formatting.js +108 -0
- data/templates/static/js/codemirror/lib/util/javascript-hint.js +137 -0
- data/templates/static/js/codemirror/lib/util/loadmode.js +51 -0
- data/templates/static/js/codemirror/lib/util/match-highlighter.js +46 -0
- data/templates/static/js/codemirror/lib/util/matchbrackets.js +63 -0
- data/templates/static/js/codemirror/lib/util/multiplex.js +95 -0
- data/templates/static/js/codemirror/lib/util/overlay.js +59 -0
- data/templates/static/js/codemirror/lib/util/pig-hint.js +117 -0
- data/templates/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
- data/templates/static/js/codemirror/lib/util/runmode.js +52 -0
- data/templates/static/js/codemirror/lib/util/search.js +119 -0
- data/templates/static/js/codemirror/lib/util/searchcursor.js +119 -0
- data/templates/static/js/codemirror/lib/util/simple-hint.css +16 -0
- data/templates/static/js/codemirror/lib/util/simple-hint.js +102 -0
- data/templates/static/js/codemirror/lib/util/xml-hint.js +131 -0
- data/templates/static/js/codemirror/mode/clike/clike.js +300 -0
- data/templates/static/js/codemirror/mode/clike/index.html +103 -0
- data/templates/static/js/codemirror/mode/clike/scala.html +767 -0
- data/templates/static/js/codemirror/mode/clojure/clojure.js +206 -0
- data/templates/static/js/codemirror/mode/clojure/index.html +67 -0
- data/templates/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
- data/templates/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
- data/templates/static/js/codemirror/mode/coffeescript/index.html +728 -0
- data/templates/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/templates/static/js/codemirror/mode/commonlisp/index.html +165 -0
- data/templates/static/js/codemirror/mode/css/css.js +465 -0
- data/templates/static/js/codemirror/mode/css/index.html +58 -0
- data/templates/static/js/codemirror/mode/css/test.js +501 -0
- data/templates/static/js/codemirror/mode/diff/diff.js +32 -0
- data/templates/static/js/codemirror/mode/diff/index.html +105 -0
- data/templates/static/js/codemirror/mode/ecl/ecl.js +192 -0
- data/templates/static/js/codemirror/mode/ecl/index.html +39 -0
- data/templates/static/js/codemirror/mode/erlang/erlang.js +463 -0
- data/templates/static/js/codemirror/mode/erlang/index.html +64 -0
- data/templates/static/js/codemirror/mode/gfm/gfm.js +94 -0
- data/templates/static/js/codemirror/mode/gfm/index.html +70 -0
- data/templates/static/js/codemirror/mode/gfm/test.js +225 -0
- data/templates/static/js/codemirror/mode/go/go.js +165 -0
- data/templates/static/js/codemirror/mode/go/index.html +74 -0
- data/templates/static/js/codemirror/mode/groovy/groovy.js +210 -0
- data/templates/static/js/codemirror/mode/groovy/index.html +73 -0
- data/templates/static/js/codemirror/mode/haskell/haskell.js +242 -0
- data/templates/static/js/codemirror/mode/haskell/index.html +62 -0
- data/templates/static/js/codemirror/mode/haxe/haxe.js +429 -0
- data/templates/static/js/codemirror/mode/haxe/index.html +90 -0
- data/templates/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/templates/static/js/codemirror/mode/htmlembedded/index.html +49 -0
- data/templates/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
- data/templates/static/js/codemirror/mode/htmlmixed/index.html +52 -0
- data/templates/static/js/codemirror/mode/http/http.js +98 -0
- data/templates/static/js/codemirror/mode/http/index.html +32 -0
- data/templates/static/js/codemirror/mode/javascript/index.html +88 -0
- data/templates/static/js/codemirror/mode/javascript/javascript.js +411 -0
- data/templates/static/js/codemirror/mode/javascript/typescript.html +48 -0
- data/templates/static/js/codemirror/mode/jinja2/index.html +38 -0
- data/templates/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
- data/templates/static/js/codemirror/mode/less/index.html +741 -0
- data/templates/static/js/codemirror/mode/less/less.js +266 -0
- data/templates/static/js/codemirror/mode/lua/index.html +74 -0
- data/templates/static/js/codemirror/mode/lua/lua.js +140 -0
- data/templates/static/js/codemirror/mode/markdown/index.html +344 -0
- data/templates/static/js/codemirror/mode/markdown/markdown.js +474 -0
- data/templates/static/js/codemirror/mode/markdown/test.js +1266 -0
- data/templates/static/js/codemirror/mode/mysql/index.html +41 -0
- data/templates/static/js/codemirror/mode/mysql/mysql.js +203 -0
- data/templates/static/js/codemirror/mode/ntriples/index.html +33 -0
- data/templates/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
- data/templates/static/js/codemirror/mode/ocaml/index.html +131 -0
- data/templates/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
- data/templates/static/js/codemirror/mode/pascal/LICENSE +7 -0
- data/templates/static/js/codemirror/mode/pascal/index.html +48 -0
- data/templates/static/js/codemirror/mode/pascal/pascal.js +94 -0
- data/templates/static/js/codemirror/mode/perl/LICENSE +19 -0
- data/templates/static/js/codemirror/mode/perl/index.html +62 -0
- data/templates/static/js/codemirror/mode/perl/perl.js +816 -0
- data/templates/static/js/codemirror/mode/php/index.html +51 -0
- data/templates/static/js/codemirror/mode/php/php.js +129 -0
- data/templates/static/js/codemirror/mode/pig/index.html +42 -0
- data/templates/static/js/codemirror/mode/pig/pig.js +171 -0
- data/templates/static/js/codemirror/mode/plsql/index.html +62 -0
- data/templates/static/js/codemirror/mode/plsql/plsql.js +216 -0
- data/templates/static/js/codemirror/mode/properties/index.html +41 -0
- data/templates/static/js/codemirror/mode/properties/properties.js +63 -0
- data/templates/static/js/codemirror/mode/python/LICENSE.txt +21 -0
- data/templates/static/js/codemirror/mode/python/index.html +124 -0
- data/templates/static/js/codemirror/mode/python/python.js +340 -0
- data/templates/static/js/codemirror/mode/r/LICENSE +24 -0
- data/templates/static/js/codemirror/mode/r/index.html +74 -0
- data/templates/static/js/codemirror/mode/r/r.js +141 -0
- data/templates/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
- data/templates/static/js/codemirror/mode/rpm/changes/index.html +53 -0
- data/templates/static/js/codemirror/mode/rpm/spec/index.html +99 -0
- data/templates/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
- data/templates/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
- data/templates/static/js/codemirror/mode/rst/index.html +526 -0
- data/templates/static/js/codemirror/mode/rst/rst.js +314 -0
- data/templates/static/js/codemirror/mode/ruby/LICENSE +24 -0
- data/templates/static/js/codemirror/mode/ruby/index.html +173 -0
- data/templates/static/js/codemirror/mode/ruby/ruby.js +195 -0
- data/templates/static/js/codemirror/mode/rust/index.html +48 -0
- data/templates/static/js/codemirror/mode/rust/rust.js +432 -0
- data/templates/static/js/codemirror/mode/scheme/index.html +65 -0
- data/templates/static/js/codemirror/mode/scheme/scheme.js +230 -0
- data/templates/static/js/codemirror/mode/shell/index.html +51 -0
- data/templates/static/js/codemirror/mode/shell/shell.js +118 -0
- data/templates/static/js/codemirror/mode/sieve/LICENSE +23 -0
- data/templates/static/js/codemirror/mode/sieve/index.html +81 -0
- data/templates/static/js/codemirror/mode/sieve/sieve.js +156 -0
- data/templates/static/js/codemirror/mode/smalltalk/index.html +57 -0
- data/templates/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
- data/templates/static/js/codemirror/mode/smarty/index.html +83 -0
- data/templates/static/js/codemirror/mode/smarty/smarty.js +148 -0
- data/templates/static/js/codemirror/mode/sparql/index.html +42 -0
- data/templates/static/js/codemirror/mode/sparql/sparql.js +143 -0
- data/templates/static/js/codemirror/mode/stex/index.html +98 -0
- data/templates/static/js/codemirror/mode/stex/stex.js +175 -0
- data/templates/static/js/codemirror/mode/stex/test.js +343 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/templates/static/js/codemirror/mode/tiki/index.html +81 -0
- data/templates/static/js/codemirror/mode/tiki/tiki.css +26 -0
- data/templates/static/js/codemirror/mode/tiki/tiki.js +309 -0
- data/templates/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
- data/templates/static/js/codemirror/mode/vb/index.html +88 -0
- data/templates/static/js/codemirror/mode/vb/vb.js +260 -0
- data/templates/static/js/codemirror/mode/vbscript/index.html +42 -0
- data/templates/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
- data/templates/static/js/codemirror/mode/velocity/index.html +103 -0
- data/templates/static/js/codemirror/mode/velocity/velocity.js +144 -0
- data/templates/static/js/codemirror/mode/verilog/index.html +210 -0
- data/templates/static/js/codemirror/mode/verilog/verilog.js +182 -0
- data/templates/static/js/codemirror/mode/xml/index.html +45 -0
- data/templates/static/js/codemirror/mode/xml/xml.js +324 -0
- data/templates/static/js/codemirror/mode/xquery/LICENSE +20 -0
- data/templates/static/js/codemirror/mode/xquery/index.html +221 -0
- data/templates/static/js/codemirror/mode/xquery/test.js +77 -0
- data/templates/static/js/codemirror/mode/xquery/xquery.js +450 -0
- data/templates/static/js/codemirror/mode/yaml/index.html +68 -0
- data/templates/static/js/codemirror/mode/yaml/yaml.js +95 -0
- data/templates/static/js/codemirror/mode/z80/index.html +39 -0
- data/templates/static/js/codemirror/mode/z80/z80.js +113 -0
- data/templates/static/js/codemirror/theme/ambiance-mobile.css +6 -0
- data/templates/static/js/codemirror/theme/ambiance.css +76 -0
- data/templates/static/js/codemirror/theme/blackboard.css +25 -0
- data/templates/static/js/codemirror/theme/cobalt.css +18 -0
- data/templates/static/js/codemirror/theme/eclipse.css +25 -0
- data/templates/static/js/codemirror/theme/elegant.css +10 -0
- data/templates/static/js/codemirror/theme/erlang-dark.css +21 -0
- data/templates/static/js/codemirror/theme/lesser-dark.css +44 -0
- data/templates/static/js/codemirror/theme/monokai.css +28 -0
- data/templates/static/js/codemirror/theme/neat.css +9 -0
- data/templates/static/js/codemirror/theme/night.css +21 -0
- data/templates/static/js/codemirror/theme/rubyblue.css +21 -0
- data/templates/static/js/codemirror/theme/solarized.css +207 -0
- data/templates/static/js/codemirror/theme/twilight.css +26 -0
- data/templates/static/js/codemirror/theme/vibrant-ink.css +27 -0
- data/templates/static/js/codemirror/theme/xq-dark.css +46 -0
- data/templates/static/js/d3.v3.min.js +2 -2
- data/templates/static/test/cm.html +33 -0
- data/templates/views/about.slim +15 -0
- data/templates/views/index.slim +1 -1
- data/templates/views/layout.slim +1 -0
- data/templates/views/navbar.slim +4 -4
- metadata +347 -2
@@ -0,0 +1,216 @@
|
|
1
|
+
CodeMirror.defineMode("plsql", function(_config, parserConfig) {
|
2
|
+
var keywords = parserConfig.keywords,
|
3
|
+
functions = parserConfig.functions,
|
4
|
+
types = parserConfig.types,
|
5
|
+
sqlplus = parserConfig.sqlplus,
|
6
|
+
multiLineStrings = parserConfig.multiLineStrings;
|
7
|
+
var isOperatorChar = /[+\-*&%=<>!?:\/|]/;
|
8
|
+
function chain(stream, state, f) {
|
9
|
+
state.tokenize = f;
|
10
|
+
return f(stream, state);
|
11
|
+
}
|
12
|
+
|
13
|
+
var type;
|
14
|
+
function ret(tp, style) {
|
15
|
+
type = tp;
|
16
|
+
return style;
|
17
|
+
}
|
18
|
+
|
19
|
+
function tokenBase(stream, state) {
|
20
|
+
var ch = stream.next();
|
21
|
+
// start of string?
|
22
|
+
if (ch == '"' || ch == "'")
|
23
|
+
return chain(stream, state, tokenString(ch));
|
24
|
+
// is it one of the special signs []{}().,;? Seperator?
|
25
|
+
else if (/[\[\]{}\(\),;\.]/.test(ch))
|
26
|
+
return ret(ch);
|
27
|
+
// start of a number value?
|
28
|
+
else if (/\d/.test(ch)) {
|
29
|
+
stream.eatWhile(/[\w\.]/);
|
30
|
+
return ret("number", "number");
|
31
|
+
}
|
32
|
+
// multi line comment or simple operator?
|
33
|
+
else if (ch == "/") {
|
34
|
+
if (stream.eat("*")) {
|
35
|
+
return chain(stream, state, tokenComment);
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
stream.eatWhile(isOperatorChar);
|
39
|
+
return ret("operator", "operator");
|
40
|
+
}
|
41
|
+
}
|
42
|
+
// single line comment or simple operator?
|
43
|
+
else if (ch == "-") {
|
44
|
+
if (stream.eat("-")) {
|
45
|
+
stream.skipToEnd();
|
46
|
+
return ret("comment", "comment");
|
47
|
+
}
|
48
|
+
else {
|
49
|
+
stream.eatWhile(isOperatorChar);
|
50
|
+
return ret("operator", "operator");
|
51
|
+
}
|
52
|
+
}
|
53
|
+
// pl/sql variable?
|
54
|
+
else if (ch == "@" || ch == "$") {
|
55
|
+
stream.eatWhile(/[\w\d\$_]/);
|
56
|
+
return ret("word", "variable");
|
57
|
+
}
|
58
|
+
// is it a operator?
|
59
|
+
else if (isOperatorChar.test(ch)) {
|
60
|
+
stream.eatWhile(isOperatorChar);
|
61
|
+
return ret("operator", "operator");
|
62
|
+
}
|
63
|
+
else {
|
64
|
+
// get the whole word
|
65
|
+
stream.eatWhile(/[\w\$_]/);
|
66
|
+
// is it one of the listed keywords?
|
67
|
+
if (keywords && keywords.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "keyword");
|
68
|
+
// is it one of the listed functions?
|
69
|
+
if (functions && functions.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "builtin");
|
70
|
+
// is it one of the listed types?
|
71
|
+
if (types && types.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-2");
|
72
|
+
// is it one of the listed sqlplus keywords?
|
73
|
+
if (sqlplus && sqlplus.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "variable-3");
|
74
|
+
// default: just a "variable"
|
75
|
+
return ret("word", "variable");
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
function tokenString(quote) {
|
80
|
+
return function(stream, state) {
|
81
|
+
var escaped = false, next, end = false;
|
82
|
+
while ((next = stream.next()) != null) {
|
83
|
+
if (next == quote && !escaped) {end = true; break;}
|
84
|
+
escaped = !escaped && next == "\\";
|
85
|
+
}
|
86
|
+
if (end || !(escaped || multiLineStrings))
|
87
|
+
state.tokenize = tokenBase;
|
88
|
+
return ret("string", "plsql-string");
|
89
|
+
};
|
90
|
+
}
|
91
|
+
|
92
|
+
function tokenComment(stream, state) {
|
93
|
+
var maybeEnd = false, ch;
|
94
|
+
while (ch = stream.next()) {
|
95
|
+
if (ch == "/" && maybeEnd) {
|
96
|
+
state.tokenize = tokenBase;
|
97
|
+
break;
|
98
|
+
}
|
99
|
+
maybeEnd = (ch == "*");
|
100
|
+
}
|
101
|
+
return ret("comment", "plsql-comment");
|
102
|
+
}
|
103
|
+
|
104
|
+
// Interface
|
105
|
+
|
106
|
+
return {
|
107
|
+
startState: function() {
|
108
|
+
return {
|
109
|
+
tokenize: tokenBase,
|
110
|
+
startOfLine: true
|
111
|
+
};
|
112
|
+
},
|
113
|
+
|
114
|
+
token: function(stream, state) {
|
115
|
+
if (stream.eatSpace()) return null;
|
116
|
+
var style = state.tokenize(stream, state);
|
117
|
+
return style;
|
118
|
+
}
|
119
|
+
};
|
120
|
+
});
|
121
|
+
|
122
|
+
(function() {
|
123
|
+
function keywords(str) {
|
124
|
+
var obj = {}, words = str.split(" ");
|
125
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
126
|
+
return obj;
|
127
|
+
}
|
128
|
+
var cKeywords = "abort accept access add all alter and any array arraylen as asc assert assign at attributes audit " +
|
129
|
+
"authorization avg " +
|
130
|
+
"base_table begin between binary_integer body boolean by " +
|
131
|
+
"case cast char char_base check close cluster clusters colauth column comment commit compress connect " +
|
132
|
+
"connected constant constraint crash create current currval cursor " +
|
133
|
+
"data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete " +
|
134
|
+
"desc digits dispose distinct do drop " +
|
135
|
+
"else elsif enable end entry escape exception exception_init exchange exclusive exists exit external " +
|
136
|
+
"fast fetch file for force form from function " +
|
137
|
+
"generic goto grant group " +
|
138
|
+
"having " +
|
139
|
+
"identified if immediate in increment index indexes indicator initial initrans insert interface intersect " +
|
140
|
+
"into is " +
|
141
|
+
"key " +
|
142
|
+
"level library like limited local lock log logging long loop " +
|
143
|
+
"master maxextents maxtrans member minextents minus mislabel mode modify multiset " +
|
144
|
+
"new next no noaudit nocompress nologging noparallel not nowait number_base " +
|
145
|
+
"object of off offline on online only open option or order out " +
|
146
|
+
"package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior " +
|
147
|
+
"private privileges procedure public " +
|
148
|
+
"raise range raw read rebuild record ref references refresh release rename replace resource restrict return " +
|
149
|
+
"returning reverse revoke rollback row rowid rowlabel rownum rows run " +
|
150
|
+
"savepoint schema segment select separate session set share snapshot some space split sql start statement " +
|
151
|
+
"storage subtype successful synonym " +
|
152
|
+
"tabauth table tables tablespace task terminate then to trigger truncate type " +
|
153
|
+
"union unique unlimited unrecoverable unusable update use using " +
|
154
|
+
"validate value values variable view views " +
|
155
|
+
"when whenever where while with work";
|
156
|
+
|
157
|
+
var cFunctions = "abs acos add_months ascii asin atan atan2 average " +
|
158
|
+
"bfilename " +
|
159
|
+
"ceil chartorowid chr concat convert cos cosh count " +
|
160
|
+
"decode deref dual dump dup_val_on_index " +
|
161
|
+
"empty error exp " +
|
162
|
+
"false floor found " +
|
163
|
+
"glb greatest " +
|
164
|
+
"hextoraw " +
|
165
|
+
"initcap instr instrb isopen " +
|
166
|
+
"last_day least lenght lenghtb ln lower lpad ltrim lub " +
|
167
|
+
"make_ref max min mod months_between " +
|
168
|
+
"new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower " +
|
169
|
+
"nls_sort nls_upper nlssort no_data_found notfound null nvl " +
|
170
|
+
"others " +
|
171
|
+
"power " +
|
172
|
+
"rawtohex reftohex round rowcount rowidtochar rpad rtrim " +
|
173
|
+
"sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate " +
|
174
|
+
"tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc " +
|
175
|
+
"uid upper user userenv " +
|
176
|
+
"variance vsize";
|
177
|
+
|
178
|
+
var cTypes = "bfile blob " +
|
179
|
+
"character clob " +
|
180
|
+
"dec " +
|
181
|
+
"float " +
|
182
|
+
"int integer " +
|
183
|
+
"mlslabel " +
|
184
|
+
"natural naturaln nchar nclob number numeric nvarchar2 " +
|
185
|
+
"real rowtype " +
|
186
|
+
"signtype smallint string " +
|
187
|
+
"varchar varchar2";
|
188
|
+
|
189
|
+
var cSqlplus = "appinfo arraysize autocommit autoprint autorecovery autotrace " +
|
190
|
+
"blockterminator break btitle " +
|
191
|
+
"cmdsep colsep compatibility compute concat copycommit copytypecheck " +
|
192
|
+
"define describe " +
|
193
|
+
"echo editfile embedded escape exec execute " +
|
194
|
+
"feedback flagger flush " +
|
195
|
+
"heading headsep " +
|
196
|
+
"instance " +
|
197
|
+
"linesize lno loboffset logsource long longchunksize " +
|
198
|
+
"markup " +
|
199
|
+
"native newpage numformat numwidth " +
|
200
|
+
"pagesize pause pno " +
|
201
|
+
"recsep recsepchar release repfooter repheader " +
|
202
|
+
"serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber " +
|
203
|
+
"sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix " +
|
204
|
+
"tab term termout time timing trimout trimspool ttitle " +
|
205
|
+
"underline " +
|
206
|
+
"verify version " +
|
207
|
+
"wrap";
|
208
|
+
|
209
|
+
CodeMirror.defineMIME("text/x-plsql", {
|
210
|
+
name: "plsql",
|
211
|
+
keywords: keywords(cKeywords),
|
212
|
+
functions: keywords(cFunctions),
|
213
|
+
types: keywords(cTypes),
|
214
|
+
sqlplus: keywords(cSqlplus)
|
215
|
+
});
|
216
|
+
}());
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Properties files mode</title>
|
6
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
7
|
+
<script src="../../lib/codemirror.js"></script>
|
8
|
+
<script src="properties.js"></script>
|
9
|
+
<style>.CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}</style>
|
10
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<h1>CodeMirror: Properties files mode</h1>
|
14
|
+
<form><textarea id="code" name="code">
|
15
|
+
# This is a properties file
|
16
|
+
a.key = A value
|
17
|
+
another.key = http://example.com
|
18
|
+
! Exclamation mark as comment
|
19
|
+
but.not=Within ! A value # indeed
|
20
|
+
# Spaces at the beginning of a line
|
21
|
+
spaces.before.key=value
|
22
|
+
backslash=Used for multi\
|
23
|
+
line entries,\
|
24
|
+
that's convenient.
|
25
|
+
# Unicode sequences
|
26
|
+
unicode.key=This is \u0020 Unicode
|
27
|
+
no.multiline=here
|
28
|
+
# Colons
|
29
|
+
colons : can be used too
|
30
|
+
# Spaces
|
31
|
+
spaces\ in\ keys=Not very common...
|
32
|
+
</textarea></form>
|
33
|
+
<script>
|
34
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
35
|
+
</script>
|
36
|
+
|
37
|
+
<p><strong>MIME types defined:</strong> <code>text/x-properties</code>,
|
38
|
+
<code>text/x-ini</code>.</p>
|
39
|
+
|
40
|
+
</body>
|
41
|
+
</html>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
CodeMirror.defineMode("properties", function() {
|
2
|
+
return {
|
3
|
+
token: function(stream, state) {
|
4
|
+
var sol = stream.sol() || state.afterSection;
|
5
|
+
var eol = stream.eol();
|
6
|
+
|
7
|
+
state.afterSection = false;
|
8
|
+
|
9
|
+
if (sol) {
|
10
|
+
if (state.nextMultiline) {
|
11
|
+
state.inMultiline = true;
|
12
|
+
state.nextMultiline = false;
|
13
|
+
} else {
|
14
|
+
state.position = "def";
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
if (eol && ! state.nextMultiline) {
|
19
|
+
state.inMultiline = false;
|
20
|
+
state.position = "def";
|
21
|
+
}
|
22
|
+
|
23
|
+
if (sol) {
|
24
|
+
while(stream.eatSpace());
|
25
|
+
}
|
26
|
+
|
27
|
+
var ch = stream.next();
|
28
|
+
|
29
|
+
if (sol && (ch === "#" || ch === "!" || ch === ";")) {
|
30
|
+
state.position = "comment";
|
31
|
+
stream.skipToEnd();
|
32
|
+
return "comment";
|
33
|
+
} else if (sol && ch === "[") {
|
34
|
+
state.afterSection = true;
|
35
|
+
stream.skipTo("]"); stream.eat("]");
|
36
|
+
return "header";
|
37
|
+
} else if (ch === "=" || ch === ":") {
|
38
|
+
state.position = "quote";
|
39
|
+
return null;
|
40
|
+
} else if (ch === "\\" && state.position === "quote") {
|
41
|
+
if (stream.next() !== "u") { // u = Unicode sequence \u1234
|
42
|
+
// Multiline value
|
43
|
+
state.nextMultiline = true;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
return state.position;
|
48
|
+
},
|
49
|
+
|
50
|
+
startState: function() {
|
51
|
+
return {
|
52
|
+
position : "def", // Current position, "def", "quote" or "comment"
|
53
|
+
nextMultiline : false, // Is the next line multiline value
|
54
|
+
inMultiline : false, // Is the current line a multiline value
|
55
|
+
afterSection : false // Did we just open a section
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
59
|
+
};
|
60
|
+
});
|
61
|
+
|
62
|
+
CodeMirror.defineMIME("text/x-properties", "properties");
|
63
|
+
CodeMirror.defineMIME("text/x-ini", "properties");
|
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010 Timothy Farrell
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,124 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Python mode</title>
|
6
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
7
|
+
<script src="../../lib/codemirror.js"></script>
|
8
|
+
<script src="../../lib/util/matchbrackets.js"></script>
|
9
|
+
<script src="python.js"></script>
|
10
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
11
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
<h1>CodeMirror: Python mode</h1>
|
15
|
+
|
16
|
+
<div><textarea id="code" name="code">
|
17
|
+
# Literals
|
18
|
+
1234
|
19
|
+
0.0e101
|
20
|
+
.123
|
21
|
+
0b01010011100
|
22
|
+
0o01234567
|
23
|
+
0x0987654321abcdef
|
24
|
+
7
|
25
|
+
2147483647
|
26
|
+
3L
|
27
|
+
79228162514264337593543950336L
|
28
|
+
0x100000000L
|
29
|
+
79228162514264337593543950336
|
30
|
+
0xdeadbeef
|
31
|
+
3.14j
|
32
|
+
10.j
|
33
|
+
10j
|
34
|
+
.001j
|
35
|
+
1e100j
|
36
|
+
3.14e-10j
|
37
|
+
|
38
|
+
|
39
|
+
# String Literals
|
40
|
+
'For\''
|
41
|
+
"God\""
|
42
|
+
"""so loved
|
43
|
+
the world"""
|
44
|
+
'''that he gave
|
45
|
+
his only begotten\' '''
|
46
|
+
'that whosoever believeth \
|
47
|
+
in him'
|
48
|
+
''
|
49
|
+
|
50
|
+
# Identifiers
|
51
|
+
__a__
|
52
|
+
a.b
|
53
|
+
a.b.c
|
54
|
+
|
55
|
+
# Operators
|
56
|
+
+ - * / % & | ^ ~ < >
|
57
|
+
== != <= >= <> << >> // **
|
58
|
+
and or not in is
|
59
|
+
|
60
|
+
# Delimiters
|
61
|
+
() [] {} , : ` = ; @ . # Note that @ and . require the proper context.
|
62
|
+
+= -= *= /= %= &= |= ^=
|
63
|
+
//= >>= <<= **=
|
64
|
+
|
65
|
+
# Keywords
|
66
|
+
as assert break class continue def del elif else except
|
67
|
+
finally for from global if import lambda pass raise
|
68
|
+
return try while with yield
|
69
|
+
|
70
|
+
# Python 2 Keywords (otherwise Identifiers)
|
71
|
+
exec print
|
72
|
+
|
73
|
+
# Python 3 Keywords (otherwise Identifiers)
|
74
|
+
nonlocal
|
75
|
+
|
76
|
+
# Types
|
77
|
+
bool classmethod complex dict enumerate float frozenset int list object
|
78
|
+
property reversed set slice staticmethod str super tuple type
|
79
|
+
|
80
|
+
# Python 2 Types (otherwise Identifiers)
|
81
|
+
basestring buffer file long unicode xrange
|
82
|
+
|
83
|
+
# Python 3 Types (otherwise Identifiers)
|
84
|
+
bytearray bytes filter map memoryview open range zip
|
85
|
+
|
86
|
+
# Some Example code
|
87
|
+
import os
|
88
|
+
from package import ParentClass
|
89
|
+
|
90
|
+
@nonsenseDecorator
|
91
|
+
def doesNothing():
|
92
|
+
pass
|
93
|
+
|
94
|
+
class ExampleClass(ParentClass):
|
95
|
+
@staticmethod
|
96
|
+
def example(inputStr):
|
97
|
+
a = list(inputStr)
|
98
|
+
a.reverse()
|
99
|
+
return ''.join(a)
|
100
|
+
|
101
|
+
def __init__(self, mixin = 'Hello'):
|
102
|
+
self.mixin = mixin
|
103
|
+
|
104
|
+
</textarea></div>
|
105
|
+
<script>
|
106
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
107
|
+
mode: {name: "python",
|
108
|
+
version: 2,
|
109
|
+
singleLineStringErrors: false},
|
110
|
+
lineNumbers: true,
|
111
|
+
indentUnit: 4,
|
112
|
+
tabMode: "shift",
|
113
|
+
matchBrackets: true
|
114
|
+
});
|
115
|
+
</script>
|
116
|
+
<h2>Configuration Options:</h2>
|
117
|
+
<ul>
|
118
|
+
<li>version - 2/3 - The version of Python to recognize. Default is 2.</li>
|
119
|
+
<li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li>
|
120
|
+
</ul>
|
121
|
+
|
122
|
+
<p><strong>MIME types defined:</strong> <code>text/x-python</code>.</p>
|
123
|
+
</body>
|
124
|
+
</html>
|