locomotivecms 4.1.1 → 4.2.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +4 -3
- data/Rakefile +4 -0
- data/app/api/locomotive/api.rb +1 -1
- data/app/assets/config/locomotive_manifest.js +2 -0
- data/app/assets/javascripts/locomotive.js +2 -2
- data/app/assets/stylesheets/locomotive/account.scss +0 -1
- data/app/assets/stylesheets/locomotive/application.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_error.scss +0 -1
- data/app/assets/stylesheets/locomotive/live_editing_iframe.scss +0 -1
- data/app/controllers/locomotive/base_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/authorization_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/redirect_to_main_host_controller.rb +1 -1
- data/app/controllers/locomotive/concerns/site_dispatcher_controller.rb +1 -1
- data/app/controllers/locomotive/errors_controller.rb +1 -1
- data/app/controllers/locomotive/my_account_controller.rb +1 -1
- data/app/controllers/locomotive/passwords_controller.rb +3 -1
- data/app/controllers/locomotive/registrations_controller.rb +3 -1
- data/app/controllers/locomotive/sessions_controller.rb +3 -1
- data/app/controllers/locomotive/sites_controller.rb +1 -1
- data/app/helpers/locomotive/base_helper.rb +2 -2
- data/app/helpers/locomotive/custom_fields_helper.rb +2 -2
- data/app/helpers/locomotive/shared/activities_helper.rb +1 -1
- data/app/inputs/locomotive/api_key_input.rb +1 -1
- data/app/mailers/locomotive/notifications.rb +1 -1
- data/app/models/locomotive/account.rb +1 -1
- data/app/models/locomotive/concerns/account/api_key.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/csv.rb +1 -1
- data/app/models/locomotive/concerns/content_entry/slug.rb +5 -5
- data/app/models/locomotive/concerns/content_type/entry_template.rb +3 -3
- data/app/models/locomotive/concerns/page/templatized.rb +1 -1
- data/app/models/locomotive/concerns/shared/json_attribute.rb +21 -2
- data/app/models/locomotive/concerns/site/routes.rb +1 -1
- data/app/models/locomotive/content_entry.rb +2 -2
- data/app/models/locomotive/page.rb +3 -3
- data/app/models/locomotive/section.rb +1 -1
- data/app/models/locomotive/snippet.rb +1 -1
- data/app/models/locomotive/translation.rb +1 -1
- data/app/services/locomotive/content_entry_import_service.rb +1 -1
- data/app/services/locomotive/content_entry_service.rb +2 -2
- data/app/services/locomotive/content_type_service.rb +13 -3
- data/app/services/locomotive/custom_field_service.rb +2 -2
- data/app/services/locomotive/editor_service.rb +1 -1
- data/app/uploaders/locomotive/base_uploader.rb +0 -10
- data/app/views/locomotive/dashboard/_activity.html.slim +1 -1
- data/app/views/locomotive/page_content/_edit.json.jbuilder +50 -0
- data/app/views/locomotive/page_content/edit.html.erb +1 -1
- data/app/views/locomotive/page_content/edit.json.jbuilder +52 -50
- data/config/initializers/devise.rb +5 -2
- data/lib/generators/locomotive/install/templates/locomotive.rb +0 -5
- data/lib/locomotive/action_controller/responder.rb +1 -1
- data/lib/locomotive/configuration.rb +2 -2
- data/lib/locomotive/dependencies.rb +0 -2
- data/lib/locomotive/engine.rb +14 -2
- data/lib/locomotive/mongoid/patches.rb +25 -65
- data/lib/locomotive/steam/services/api_entry_submission_service.rb +1 -0
- data/lib/locomotive/version.rb +1 -1
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/comment.js +203 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/autorefresh.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/fullscreen.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/panel.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/placeholder.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/display/rulers.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closebrackets.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchbrackets.js +120 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/javascript-hint.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/show-hint.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/coffeescript-lint.js +41 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/css-lint.js +35 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/html-lint.js +46 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/javascript-lint.js +136 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/json-lint.js +31 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/lint.js +239 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/lint/yaml-lint.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/merge/merge.js +773 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/mode/simple.js +213 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/colorize.js +40 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode-standalone.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.js +72 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/runmode/runmode.node.js +179 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/annotatescrollbar.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/scrollpastend.js +48 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/scroll/simplescrollbars.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/match-highlighter.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/search.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/tern.js +701 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/tern/worker.js +44 -0
- data/vendor/assets/javascripts/locomotive/codemirror/addons/wrap/hardwrap.js +144 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/emacs.js +412 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/sublime.js +580 -0
- data/vendor/assets/javascripts/locomotive/codemirror/keymaps/vim.js +5065 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/apl.js +174 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asciiarmor.js +73 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asn.1.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/asterisk.js +196 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/brainfuck.js +85 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clike.js +786 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/clojure.js +306 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cmake.js +97 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cobol.js +255 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/coffeescript.js +355 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/commonlisp.js +123 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/crystal.js +391 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/css.js +825 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/cypher.js +146 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/d.js +218 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dart.js +157 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/diff.js +47 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/django.js +356 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dockerfile.js +79 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dtd.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/dylan.js +344 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ebnf.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ecl.js +206 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/eiffel.js +160 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/elm.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/erlang.js +618 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/factor.js +83 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fcl.js +173 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/forth.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/fortran.js +188 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gas.js +345 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gfm.js +130 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/gherkin.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/go.js +185 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/groovy.js +230 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haml.js +161 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/handlebars.js +62 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell-literate.js +43 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haskell.js +267 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/haxe.js +515 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/http.js +113 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/idl.js +290 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jade.js +590 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/javascript.js +748 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jinja2.js +142 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/jsx.js +147 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/julia.js +392 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/livescript.js +280 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/lua.js +159 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/markdown.js +797 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mathematica.js +176 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mbox.js +129 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mirc.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mllike.js +205 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/modelica.js +245 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mscgen.js +169 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/mumps.js +148 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nginx.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/nsis.js +95 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ntriples.js +186 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/octave.js +135 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/oz.js +252 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pascal.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pegjs.js +114 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/perl.js +837 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/php.js +234 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/pig.js +178 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/powershell.js +396 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/properties.js +78 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/protobuf.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/puppet.js +220 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/python.js +340 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/q.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/r.js +164 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rpm.js +109 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rst.js +557 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ruby.js +285 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/rust.js +71 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sas.js +315 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sass.js +414 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/scheme.js +249 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/shell.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sieve.js +193 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/slim.js +575 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smalltalk.js +168 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/smarty.js +225 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/solr.js +104 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/soy.js +199 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sparql.js +180 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/spreadsheet.js +112 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/sql.js +413 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stex.js +251 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/stylus.js +769 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/swift.js +202 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tcl.js +139 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/textile.js +469 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiddlywiki.js +308 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tiki.js +312 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/toml.js +88 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/tornado.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/troff.js +84 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn-cfg.js +214 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/ttcn.js +283 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/turtle.js +162 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/twig.js +141 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vb.js +276 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vbscript.js +350 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/velocity.js +201 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/verilog.js +537 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vhdl.js +189 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/vue.js +69 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/webidl.js +195 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xml.js +394 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/xquery.js +437 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yacas.js +204 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml-frontmatter.js +68 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/yaml.js +117 -0
- data/vendor/assets/javascripts/locomotive/codemirror/modes/z80.js +116 -0
- data/vendor/assets/javascripts/locomotive/codemirror.js +8922 -0
- data/vendor/assets/javascripts/locomotive/select2.js +436 -175
- data/vendor/assets/javascripts/locomotive/wysihtml5x-toolbar.js +1346 -564
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/dialog/dialog.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/display/fullscreen.css +6 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/fold/foldgutter.css +20 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/hint/show-hint.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/lint/lint.css +73 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/merge/merge.css +113 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/scroll/simplescrollbars.css +66 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/addons/tern/tern.css +87 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiddlywiki.css +14 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/modes/tiki.css +26 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-day.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/3024-night.css +39 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/abcdef.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance-mobile.css +5 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ambiance.css +74 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/base16-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/bespin.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/blackboard.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/cobalt.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/colorforth.css +33 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/dracula.css +41 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/eclipse.css +23 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/elegant.css +13 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/erlang-dark.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/hopscotch.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/icecoder.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/isotope.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/lesser-dark.css +47 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/liquibyte.css +95 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/material.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mbo.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/mdn-like.css +46 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/midnight.css +45 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/monokai.css +36 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neat.css +12 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/neo.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/night.css +27 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-dark.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/paraiso-light.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/pastel-on-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/railscasts.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/rubyblue.css +25 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/seti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/solarized.css +169 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/the-matrix.css +30 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-bright.css +35 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/tomorrow-night-eighties.css +38 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/ttcn.css +64 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/twilight.css +32 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/vibrant-ink.css +34 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-dark.css +53 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/xq-light.css +43 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/yeti.css +44 -0
- data/vendor/assets/stylesheets/locomotive/codemirror/themes/zenburn.css +37 -0
- data/vendor/assets/stylesheets/locomotive/codemirror.css +347 -0
- data/vendor/assets/stylesheets/locomotive/select2.css +3 -6
- metadata +349 -128
@@ -0,0 +1,176 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
// Mathematica mode copyright (c) 2015 by Calin Barbat
|
5
|
+
// Based on code by Patrick Scheibe (halirutan)
|
6
|
+
// See: https://github.com/halirutan/Mathematica-Source-Highlighting/tree/master/src/lang-mma.js
|
7
|
+
|
8
|
+
(function(mod) {
|
9
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
10
|
+
mod(require("../../lib/codemirror"));
|
11
|
+
else if (typeof define == "function" && define.amd) // AMD
|
12
|
+
define(["../../lib/codemirror"], mod);
|
13
|
+
else // Plain browser env
|
14
|
+
mod(CodeMirror);
|
15
|
+
})(function(CodeMirror) {
|
16
|
+
"use strict";
|
17
|
+
|
18
|
+
CodeMirror.defineMode('mathematica', function(_config, _parserConfig) {
|
19
|
+
|
20
|
+
// used pattern building blocks
|
21
|
+
var Identifier = '[a-zA-Z\\$][a-zA-Z0-9\\$]*';
|
22
|
+
var pBase = "(?:\\d+)";
|
23
|
+
var pFloat = "(?:\\.\\d+|\\d+\\.\\d*|\\d+)";
|
24
|
+
var pFloatBase = "(?:\\.\\w+|\\w+\\.\\w*|\\w+)";
|
25
|
+
var pPrecision = "(?:`(?:`?"+pFloat+")?)";
|
26
|
+
|
27
|
+
// regular expressions
|
28
|
+
var reBaseForm = new RegExp('(?:'+pBase+'(?:\\^\\^'+pFloatBase+pPrecision+'?(?:\\*\\^[+-]?\\d+)?))');
|
29
|
+
var reFloatForm = new RegExp('(?:' + pFloat + pPrecision + '?(?:\\*\\^[+-]?\\d+)?)');
|
30
|
+
var reIdInContext = new RegExp('(?:`?)(?:' + Identifier + ')(?:`(?:' + Identifier + '))*(?:`?)');
|
31
|
+
|
32
|
+
function tokenBase(stream, state) {
|
33
|
+
var ch;
|
34
|
+
|
35
|
+
// get next character
|
36
|
+
ch = stream.next();
|
37
|
+
|
38
|
+
// string
|
39
|
+
if (ch === '"') {
|
40
|
+
state.tokenize = tokenString;
|
41
|
+
return state.tokenize(stream, state);
|
42
|
+
}
|
43
|
+
|
44
|
+
// comment
|
45
|
+
if (ch === '(') {
|
46
|
+
if (stream.eat('*')) {
|
47
|
+
state.commentLevel++;
|
48
|
+
state.tokenize = tokenComment;
|
49
|
+
return state.tokenize(stream, state);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
// go back one character
|
54
|
+
stream.backUp(1);
|
55
|
+
|
56
|
+
// look for numbers
|
57
|
+
// Numbers in a baseform
|
58
|
+
if (stream.match(reBaseForm, true, false)) {
|
59
|
+
return 'number';
|
60
|
+
}
|
61
|
+
|
62
|
+
// Mathematica numbers. Floats (1.2, .2, 1.) can have optionally a precision (`float) or an accuracy definition
|
63
|
+
// (``float). Note: while 1.2` is possible 1.2`` is not. At the end an exponent (float*^+12) can follow.
|
64
|
+
if (stream.match(reFloatForm, true, false)) {
|
65
|
+
return 'number';
|
66
|
+
}
|
67
|
+
|
68
|
+
/* In[23] and Out[34] */
|
69
|
+
if (stream.match(/(?:In|Out)\[[0-9]*\]/, true, false)) {
|
70
|
+
return 'atom';
|
71
|
+
}
|
72
|
+
|
73
|
+
// usage
|
74
|
+
if (stream.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::usage)/, true, false)) {
|
75
|
+
return 'meta';
|
76
|
+
}
|
77
|
+
|
78
|
+
// message
|
79
|
+
if (stream.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/, true, false)) {
|
80
|
+
return 'string-2';
|
81
|
+
}
|
82
|
+
|
83
|
+
// this makes a look-ahead match for something like variable:{_Integer}
|
84
|
+
// the match is then forwarded to the mma-patterns tokenizer.
|
85
|
+
if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/, true, false)) {
|
86
|
+
return 'variable-2';
|
87
|
+
}
|
88
|
+
|
89
|
+
// catch variables which are used together with Blank (_), BlankSequence (__) or BlankNullSequence (___)
|
90
|
+
// Cannot start with a number, but can have numbers at any other position. Examples
|
91
|
+
// blub__Integer, a1_, b34_Integer32
|
92
|
+
if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) {
|
93
|
+
return 'variable-2';
|
94
|
+
}
|
95
|
+
if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/, true, false)) {
|
96
|
+
return 'variable-2';
|
97
|
+
}
|
98
|
+
if (stream.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) {
|
99
|
+
return 'variable-2';
|
100
|
+
}
|
101
|
+
|
102
|
+
// Named characters in Mathematica, like \[Gamma].
|
103
|
+
if (stream.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/, true, false)) {
|
104
|
+
return 'variable-3';
|
105
|
+
}
|
106
|
+
|
107
|
+
// Match all braces separately
|
108
|
+
if (stream.match(/(?:\[|\]|{|}|\(|\))/, true, false)) {
|
109
|
+
return 'bracket';
|
110
|
+
}
|
111
|
+
|
112
|
+
// Catch Slots (#, ##, #3, ##9 and the V10 named slots #name). I have never seen someone using more than one digit after #, so we match
|
113
|
+
// only one.
|
114
|
+
if (stream.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/, true, false)) {
|
115
|
+
return 'variable-2';
|
116
|
+
}
|
117
|
+
|
118
|
+
// Literals like variables, keywords, functions
|
119
|
+
if (stream.match(reIdInContext, true, false)) {
|
120
|
+
return 'keyword';
|
121
|
+
}
|
122
|
+
|
123
|
+
// operators. Note that operators like @@ or /; are matched separately for each symbol.
|
124
|
+
if (stream.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, true, false)) {
|
125
|
+
return 'operator';
|
126
|
+
}
|
127
|
+
|
128
|
+
// everything else is an error
|
129
|
+
stream.next(); // advance the stream.
|
130
|
+
return 'error';
|
131
|
+
}
|
132
|
+
|
133
|
+
function tokenString(stream, state) {
|
134
|
+
var next, end = false, escaped = false;
|
135
|
+
while ((next = stream.next()) != null) {
|
136
|
+
if (next === '"' && !escaped) {
|
137
|
+
end = true;
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
escaped = !escaped && next === '\\';
|
141
|
+
}
|
142
|
+
if (end && !escaped) {
|
143
|
+
state.tokenize = tokenBase;
|
144
|
+
}
|
145
|
+
return 'string';
|
146
|
+
};
|
147
|
+
|
148
|
+
function tokenComment(stream, state) {
|
149
|
+
var prev, next;
|
150
|
+
while(state.commentLevel > 0 && (next = stream.next()) != null) {
|
151
|
+
if (prev === '(' && next === '*') state.commentLevel++;
|
152
|
+
if (prev === '*' && next === ')') state.commentLevel--;
|
153
|
+
prev = next;
|
154
|
+
}
|
155
|
+
if (state.commentLevel <= 0) {
|
156
|
+
state.tokenize = tokenBase;
|
157
|
+
}
|
158
|
+
return 'comment';
|
159
|
+
}
|
160
|
+
|
161
|
+
return {
|
162
|
+
startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
|
163
|
+
token: function(stream, state) {
|
164
|
+
if (stream.eatSpace()) return null;
|
165
|
+
return state.tokenize(stream, state);
|
166
|
+
},
|
167
|
+
blockCommentStart: "(*",
|
168
|
+
blockCommentEnd: "*)"
|
169
|
+
};
|
170
|
+
});
|
171
|
+
|
172
|
+
CodeMirror.defineMIME('text/x-mathematica', {
|
173
|
+
name: 'mathematica'
|
174
|
+
});
|
175
|
+
|
176
|
+
});
|
@@ -0,0 +1,129 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://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
|
+
var rfc2822 = [
|
15
|
+
"From", "Sender", "Reply-To", "To", "Cc", "Bcc", "Message-ID",
|
16
|
+
"In-Reply-To", "References", "Resent-From", "Resent-Sender", "Resent-To",
|
17
|
+
"Resent-Cc", "Resent-Bcc", "Resent-Message-ID", "Return-Path", "Received"
|
18
|
+
];
|
19
|
+
var rfc2822NoEmail = [
|
20
|
+
"Date", "Subject", "Comments", "Keywords", "Resent-Date"
|
21
|
+
];
|
22
|
+
|
23
|
+
CodeMirror.registerHelper("hintWords", "mbox", rfc2822.concat(rfc2822NoEmail));
|
24
|
+
|
25
|
+
var whitespace = /^[ \t]/;
|
26
|
+
var separator = /^From /; // See RFC 4155
|
27
|
+
var rfc2822Header = new RegExp("^(" + rfc2822.join("|") + "): ");
|
28
|
+
var rfc2822HeaderNoEmail = new RegExp("^(" + rfc2822NoEmail.join("|") + "): ");
|
29
|
+
var header = /^[^:]+:/; // Optional fields defined in RFC 2822
|
30
|
+
var email = /^[^ ]+@[^ ]+/;
|
31
|
+
var untilEmail = /^.*?(?=[^ ]+?@[^ ]+)/;
|
32
|
+
var bracketedEmail = /^<.*?>/;
|
33
|
+
var untilBracketedEmail = /^.*?(?=<.*>)/;
|
34
|
+
|
35
|
+
function styleForHeader(header) {
|
36
|
+
if (header === "Subject") return "header";
|
37
|
+
return "string";
|
38
|
+
}
|
39
|
+
|
40
|
+
function readToken(stream, state) {
|
41
|
+
if (stream.sol()) {
|
42
|
+
// From last line
|
43
|
+
state.inSeparator = false;
|
44
|
+
if (state.inHeader && stream.match(whitespace)) {
|
45
|
+
// Header folding
|
46
|
+
return null;
|
47
|
+
} else {
|
48
|
+
state.inHeader = false;
|
49
|
+
state.header = null;
|
50
|
+
}
|
51
|
+
|
52
|
+
if (stream.match(separator)) {
|
53
|
+
state.inHeaders = true;
|
54
|
+
state.inSeparator = true;
|
55
|
+
return "atom";
|
56
|
+
}
|
57
|
+
|
58
|
+
var match;
|
59
|
+
var emailPermitted = false;
|
60
|
+
if ((match = stream.match(rfc2822HeaderNoEmail)) ||
|
61
|
+
(emailPermitted = true) && (match = stream.match(rfc2822Header))) {
|
62
|
+
state.inHeaders = true;
|
63
|
+
state.inHeader = true;
|
64
|
+
state.emailPermitted = emailPermitted;
|
65
|
+
state.header = match[1];
|
66
|
+
return "atom";
|
67
|
+
}
|
68
|
+
|
69
|
+
// Use vim's heuristics: recognize custom headers only if the line is in a
|
70
|
+
// block of legitimate headers.
|
71
|
+
if (state.inHeaders && (match = stream.match(header))) {
|
72
|
+
state.inHeader = true;
|
73
|
+
state.emailPermitted = true;
|
74
|
+
state.header = match[1];
|
75
|
+
return "atom";
|
76
|
+
}
|
77
|
+
|
78
|
+
state.inHeaders = false;
|
79
|
+
stream.skipToEnd();
|
80
|
+
return null;
|
81
|
+
}
|
82
|
+
|
83
|
+
if (state.inSeparator) {
|
84
|
+
if (stream.match(email)) return "link";
|
85
|
+
if (stream.match(untilEmail)) return "atom";
|
86
|
+
stream.skipToEnd();
|
87
|
+
return "atom";
|
88
|
+
}
|
89
|
+
|
90
|
+
if (state.inHeader) {
|
91
|
+
var style = styleForHeader(state.header);
|
92
|
+
|
93
|
+
if (state.emailPermitted) {
|
94
|
+
if (stream.match(bracketedEmail)) return style + " link";
|
95
|
+
if (stream.match(untilBracketedEmail)) return style;
|
96
|
+
}
|
97
|
+
stream.skipToEnd();
|
98
|
+
return style;
|
99
|
+
}
|
100
|
+
|
101
|
+
stream.skipToEnd();
|
102
|
+
return null;
|
103
|
+
};
|
104
|
+
|
105
|
+
CodeMirror.defineMode("mbox", function() {
|
106
|
+
return {
|
107
|
+
startState: function() {
|
108
|
+
return {
|
109
|
+
// Is in a mbox separator
|
110
|
+
inSeparator: false,
|
111
|
+
// Is in a mail header
|
112
|
+
inHeader: false,
|
113
|
+
// If bracketed email is permitted. Only applicable when inHeader
|
114
|
+
emailPermitted: false,
|
115
|
+
// Name of current header
|
116
|
+
header: null,
|
117
|
+
// Is in a region of mail headers
|
118
|
+
inHeaders: false
|
119
|
+
};
|
120
|
+
},
|
121
|
+
token: readToken,
|
122
|
+
blankLine: function(state) {
|
123
|
+
state.inHeaders = state.inSeparator = state.inHeader = false;
|
124
|
+
}
|
125
|
+
};
|
126
|
+
});
|
127
|
+
|
128
|
+
CodeMirror.defineMIME("application/mbox", "mbox");
|
129
|
+
});
|
@@ -0,0 +1,193 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
|
5
|
+
|
6
|
+
(function(mod) {
|
7
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
8
|
+
mod(require("../../lib/codemirror"));
|
9
|
+
else if (typeof define == "function" && define.amd) // AMD
|
10
|
+
define(["../../lib/codemirror"], mod);
|
11
|
+
else // Plain browser env
|
12
|
+
mod(CodeMirror);
|
13
|
+
})(function(CodeMirror) {
|
14
|
+
"use strict";
|
15
|
+
|
16
|
+
CodeMirror.defineMIME("text/mirc", "mirc");
|
17
|
+
CodeMirror.defineMode("mirc", function() {
|
18
|
+
function parseWords(str) {
|
19
|
+
var obj = {}, words = str.split(" ");
|
20
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
21
|
+
return obj;
|
22
|
+
}
|
23
|
+
var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " +
|
24
|
+
"$activewid $address $addtok $agent $agentname $agentstat $agentver " +
|
25
|
+
"$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " +
|
26
|
+
"$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " +
|
27
|
+
"$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " +
|
28
|
+
"$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " +
|
29
|
+
"$com $comcall $comchan $comerr $compact $compress $comval $cos $count " +
|
30
|
+
"$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " +
|
31
|
+
"$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " +
|
32
|
+
"$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " +
|
33
|
+
"$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " +
|
34
|
+
"$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " +
|
35
|
+
"$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " +
|
36
|
+
"$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " +
|
37
|
+
"$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " +
|
38
|
+
"$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " +
|
39
|
+
"$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " +
|
40
|
+
"$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " +
|
41
|
+
"$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " +
|
42
|
+
"$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " +
|
43
|
+
"$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " +
|
44
|
+
"$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " +
|
45
|
+
"$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " +
|
46
|
+
"$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " +
|
47
|
+
"$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " +
|
48
|
+
"$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " +
|
49
|
+
"$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " +
|
50
|
+
"$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " +
|
51
|
+
"$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " +
|
52
|
+
"$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " +
|
53
|
+
"$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " +
|
54
|
+
"$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " +
|
55
|
+
"$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " +
|
56
|
+
"$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " +
|
57
|
+
"$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " +
|
58
|
+
"$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor");
|
59
|
+
var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " +
|
60
|
+
"away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " +
|
61
|
+
"channel clear clearall cline clipboard close cnick color comclose comopen " +
|
62
|
+
"comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " +
|
63
|
+
"debug dec describe dialog did didtok disable disconnect dlevel dline dll " +
|
64
|
+
"dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " +
|
65
|
+
"drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " +
|
66
|
+
"events exit fclose filter findtext finger firewall flash flist flood flush " +
|
67
|
+
"flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " +
|
68
|
+
"gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " +
|
69
|
+
"halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " +
|
70
|
+
"ialmark identd if ignore iline inc invite iuser join kick linesep links list " +
|
71
|
+
"load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " +
|
72
|
+
"notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " +
|
73
|
+
"qme qmsg query queryn quit raw reload remini remote remove rename renwin " +
|
74
|
+
"reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " +
|
75
|
+
"say scid scon server set showmirc signam sline sockaccept sockclose socklist " +
|
76
|
+
"socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " +
|
77
|
+
"sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " +
|
78
|
+
"toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " +
|
79
|
+
"var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " +
|
80
|
+
"isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " +
|
81
|
+
"isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " +
|
82
|
+
"elseif else goto menu nicklist status title icon size option text edit " +
|
83
|
+
"button check radio box scroll list combo link tab item");
|
84
|
+
var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
|
85
|
+
var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
|
86
|
+
function chain(stream, state, f) {
|
87
|
+
state.tokenize = f;
|
88
|
+
return f(stream, state);
|
89
|
+
}
|
90
|
+
function tokenBase(stream, state) {
|
91
|
+
var beforeParams = state.beforeParams;
|
92
|
+
state.beforeParams = false;
|
93
|
+
var ch = stream.next();
|
94
|
+
if (/[\[\]{}\(\),\.]/.test(ch)) {
|
95
|
+
if (ch == "(" && beforeParams) state.inParams = true;
|
96
|
+
else if (ch == ")") state.inParams = false;
|
97
|
+
return null;
|
98
|
+
}
|
99
|
+
else if (/\d/.test(ch)) {
|
100
|
+
stream.eatWhile(/[\w\.]/);
|
101
|
+
return "number";
|
102
|
+
}
|
103
|
+
else if (ch == "\\") {
|
104
|
+
stream.eat("\\");
|
105
|
+
stream.eat(/./);
|
106
|
+
return "number";
|
107
|
+
}
|
108
|
+
else if (ch == "/" && stream.eat("*")) {
|
109
|
+
return chain(stream, state, tokenComment);
|
110
|
+
}
|
111
|
+
else if (ch == ";" && stream.match(/ *\( *\(/)) {
|
112
|
+
return chain(stream, state, tokenUnparsed);
|
113
|
+
}
|
114
|
+
else if (ch == ";" && !state.inParams) {
|
115
|
+
stream.skipToEnd();
|
116
|
+
return "comment";
|
117
|
+
}
|
118
|
+
else if (ch == '"') {
|
119
|
+
stream.eat(/"/);
|
120
|
+
return "keyword";
|
121
|
+
}
|
122
|
+
else if (ch == "$") {
|
123
|
+
stream.eatWhile(/[$_a-z0-9A-Z\.:]/);
|
124
|
+
if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {
|
125
|
+
return "keyword";
|
126
|
+
}
|
127
|
+
else {
|
128
|
+
state.beforeParams = true;
|
129
|
+
return "builtin";
|
130
|
+
}
|
131
|
+
}
|
132
|
+
else if (ch == "%") {
|
133
|
+
stream.eatWhile(/[^,^\s^\(^\)]/);
|
134
|
+
state.beforeParams = true;
|
135
|
+
return "string";
|
136
|
+
}
|
137
|
+
else if (isOperatorChar.test(ch)) {
|
138
|
+
stream.eatWhile(isOperatorChar);
|
139
|
+
return "operator";
|
140
|
+
}
|
141
|
+
else {
|
142
|
+
stream.eatWhile(/[\w\$_{}]/);
|
143
|
+
var word = stream.current().toLowerCase();
|
144
|
+
if (keywords && keywords.propertyIsEnumerable(word))
|
145
|
+
return "keyword";
|
146
|
+
if (functions && functions.propertyIsEnumerable(word)) {
|
147
|
+
state.beforeParams = true;
|
148
|
+
return "keyword";
|
149
|
+
}
|
150
|
+
return null;
|
151
|
+
}
|
152
|
+
}
|
153
|
+
function tokenComment(stream, state) {
|
154
|
+
var maybeEnd = false, ch;
|
155
|
+
while (ch = stream.next()) {
|
156
|
+
if (ch == "/" && maybeEnd) {
|
157
|
+
state.tokenize = tokenBase;
|
158
|
+
break;
|
159
|
+
}
|
160
|
+
maybeEnd = (ch == "*");
|
161
|
+
}
|
162
|
+
return "comment";
|
163
|
+
}
|
164
|
+
function tokenUnparsed(stream, state) {
|
165
|
+
var maybeEnd = 0, ch;
|
166
|
+
while (ch = stream.next()) {
|
167
|
+
if (ch == ";" && maybeEnd == 2) {
|
168
|
+
state.tokenize = tokenBase;
|
169
|
+
break;
|
170
|
+
}
|
171
|
+
if (ch == ")")
|
172
|
+
maybeEnd++;
|
173
|
+
else if (ch != " ")
|
174
|
+
maybeEnd = 0;
|
175
|
+
}
|
176
|
+
return "meta";
|
177
|
+
}
|
178
|
+
return {
|
179
|
+
startState: function() {
|
180
|
+
return {
|
181
|
+
tokenize: tokenBase,
|
182
|
+
beforeParams: false,
|
183
|
+
inParams: false
|
184
|
+
};
|
185
|
+
},
|
186
|
+
token: function(stream, state) {
|
187
|
+
if (stream.eatSpace()) return null;
|
188
|
+
return state.tokenize(stream, state);
|
189
|
+
}
|
190
|
+
};
|
191
|
+
});
|
192
|
+
|
193
|
+
});
|