milksteak 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -14
- data/.rspec +2 -0
- data/Gemfile +1 -1
- data/Guardfile +8 -0
- data/Rakefile +0 -1
- data/Readme.md +37 -0
- data/lib/helpers.rb +0 -0
- data/lib/milksteak/cms.rb +17 -0
- data/lib/milksteak/version.rb +1 -1
- data/lib/milksteak.rb +52 -1
- data/lib/models/page.rb +73 -0
- data/lib/models/user.rb +5 -0
- data/lib/public/milksteak/codemirror2/keymap/emacs.js +29 -0
- data/lib/public/milksteak/codemirror2/keymap/vim.js +347 -0
- data/lib/public/milksteak/codemirror2/lib/codemirror.css +110 -0
- data/lib/public/milksteak/codemirror2/lib/codemirror.js +2887 -0
- data/lib/public/milksteak/codemirror2/lib/util/dialog.css +23 -0
- data/lib/public/milksteak/codemirror2/lib/util/dialog.js +63 -0
- data/lib/public/milksteak/codemirror2/lib/util/foldcode.js +186 -0
- data/lib/public/milksteak/codemirror2/lib/util/formatting.js +294 -0
- data/lib/public/milksteak/codemirror2/lib/util/javascript-hint.js +132 -0
- data/lib/public/milksteak/codemirror2/lib/util/match-highlighter.js +44 -0
- data/lib/public/milksteak/codemirror2/lib/util/overlay.js +51 -0
- data/lib/public/milksteak/codemirror2/lib/util/runmode.js +49 -0
- data/lib/public/milksteak/codemirror2/lib/util/search.js +114 -0
- data/lib/public/milksteak/codemirror2/lib/util/searchcursor.js +117 -0
- data/lib/public/milksteak/codemirror2/lib/util/simple-hint.css +16 -0
- data/lib/public/milksteak/codemirror2/lib/util/simple-hint.js +66 -0
- data/lib/public/milksteak/codemirror2/mode/clike/clike.js +234 -0
- data/lib/public/milksteak/codemirror2/mode/clike/index.html +101 -0
- data/lib/public/milksteak/codemirror2/mode/clojure/clojure.js +207 -0
- data/lib/public/milksteak/codemirror2/mode/clojure/index.html +66 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/LICENSE +22 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/coffeescript.js +341 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/index.html +721 -0
- data/lib/public/milksteak/codemirror2/mode/css/css.js +124 -0
- data/lib/public/milksteak/codemirror2/mode/css/index.html +55 -0
- data/lib/public/milksteak/codemirror2/mode/diff/diff.css +3 -0
- data/lib/public/milksteak/codemirror2/mode/diff/diff.js +13 -0
- data/lib/public/milksteak/codemirror2/mode/diff/index.html +99 -0
- data/lib/public/milksteak/codemirror2/mode/ecl/ecl.js +203 -0
- data/lib/public/milksteak/codemirror2/mode/ecl/index.html +42 -0
- data/lib/public/milksteak/codemirror2/mode/gfm/gfm.js +108 -0
- data/lib/public/milksteak/codemirror2/mode/gfm/index.html +47 -0
- data/lib/public/milksteak/codemirror2/mode/go/go.js +170 -0
- data/lib/public/milksteak/codemirror2/mode/go/index.html +72 -0
- data/lib/public/milksteak/codemirror2/mode/groovy/groovy.js +210 -0
- data/lib/public/milksteak/codemirror2/mode/groovy/index.html +71 -0
- data/lib/public/milksteak/codemirror2/mode/haskell/haskell.js +242 -0
- data/lib/public/milksteak/codemirror2/mode/haskell/index.html +60 -0
- data/lib/public/milksteak/codemirror2/mode/htmlembedded/htmlembedded.js +68 -0
- data/lib/public/milksteak/codemirror2/mode/htmlembedded/index.html +49 -0
- data/lib/public/milksteak/codemirror2/mode/htmlmixed/htmlmixed.js +83 -0
- data/lib/public/milksteak/codemirror2/mode/htmlmixed/index.html +51 -0
- data/lib/public/milksteak/codemirror2/mode/javascript/index.html +77 -0
- data/lib/public/milksteak/codemirror2/mode/javascript/javascript.js +360 -0
- data/lib/public/milksteak/codemirror2/mode/jinja2/index.html +37 -0
- data/lib/public/milksteak/codemirror2/mode/jinja2/jinja2.js +42 -0
- data/lib/public/milksteak/codemirror2/mode/less/index.html +577 -0
- data/lib/public/milksteak/codemirror2/mode/less/less.js +186 -0
- data/lib/public/milksteak/codemirror2/mode/lua/index.html +72 -0
- data/lib/public/milksteak/codemirror2/mode/lua/lua.js +140 -0
- data/lib/public/milksteak/codemirror2/mode/markdown/index.html +339 -0
- data/lib/public/milksteak/codemirror2/mode/markdown/markdown.js +276 -0
- data/lib/public/milksteak/codemirror2/mode/mysql/index.html +41 -0
- data/lib/public/milksteak/codemirror2/mode/mysql/mysql.js +188 -0
- data/lib/public/milksteak/codemirror2/mode/ntriples/index.html +32 -0
- data/lib/public/milksteak/codemirror2/mode/ntriples/ntriples.js +172 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/LICENSE +7 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/pascal.js +94 -0
- data/lib/public/milksteak/codemirror2/mode/perl/LICENSE +19 -0
- data/lib/public/milksteak/codemirror2/mode/perl/index.html +62 -0
- data/lib/public/milksteak/codemirror2/mode/perl/perl.js +816 -0
- data/lib/public/milksteak/codemirror2/mode/php/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/php/php.js +150 -0
- data/lib/public/milksteak/codemirror2/mode/plsql/index.html +62 -0
- data/lib/public/milksteak/codemirror2/mode/plsql/plsql.js +217 -0
- data/lib/public/milksteak/codemirror2/mode/properties/index.html +40 -0
- data/lib/public/milksteak/codemirror2/mode/properties/properties.css +3 -0
- data/lib/public/milksteak/codemirror2/mode/properties/properties.js +57 -0
- data/lib/public/milksteak/codemirror2/mode/python/LICENSE.txt +21 -0
- data/lib/public/milksteak/codemirror2/mode/python/index.html +122 -0
- data/lib/public/milksteak/codemirror2/mode/python/python.js +340 -0
- data/lib/public/milksteak/codemirror2/mode/r/LICENSE +24 -0
- data/lib/public/milksteak/codemirror2/mode/r/index.html +73 -0
- data/lib/public/milksteak/codemirror2/mode/r/r.js +141 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/changes/changes.js +19 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/changes/index.html +53 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/index.html +99 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.css +5 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.js +66 -0
- data/lib/public/milksteak/codemirror2/mode/rst/index.html +525 -0
- data/lib/public/milksteak/codemirror2/mode/rst/rst.js +326 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/LICENSE +24 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/index.html +171 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/ruby.js +200 -0
- data/lib/public/milksteak/codemirror2/mode/rust/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/rust/rust.js +432 -0
- data/lib/public/milksteak/codemirror2/mode/scheme/index.html +64 -0
- data/lib/public/milksteak/codemirror2/mode/scheme/scheme.js +202 -0
- data/lib/public/milksteak/codemirror2/mode/smalltalk/index.html +55 -0
- data/lib/public/milksteak/codemirror2/mode/smalltalk/smalltalk.js +139 -0
- data/lib/public/milksteak/codemirror2/mode/sparql/index.html +40 -0
- data/lib/public/milksteak/codemirror2/mode/sparql/sparql.js +143 -0
- data/lib/public/milksteak/codemirror2/mode/stex/index.html +95 -0
- data/lib/public/milksteak/codemirror2/mode/stex/stex.js +167 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/index.html +183 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.css +21 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.js +374 -0
- data/lib/public/milksteak/codemirror2/mode/velocity/index.html +103 -0
- data/lib/public/milksteak/codemirror2/mode/velocity/velocity.js +146 -0
- data/lib/public/milksteak/codemirror2/mode/verilog/index.html +210 -0
- data/lib/public/milksteak/codemirror2/mode/verilog/verilog.js +194 -0
- data/lib/public/milksteak/codemirror2/mode/xml/index.html +45 -0
- data/lib/public/milksteak/codemirror2/mode/xml/xml.js +267 -0
- data/lib/public/milksteak/codemirror2/mode/xmlpure/index.html +59 -0
- data/lib/public/milksteak/codemirror2/mode/xmlpure/xmlpure.js +490 -0
- data/lib/public/milksteak/codemirror2/mode/yaml/index.html +67 -0
- data/lib/public/milksteak/codemirror2/mode/yaml/yaml.js +95 -0
- data/lib/public/milksteak/codemirror2/theme/cobalt.css +18 -0
- data/lib/public/milksteak/codemirror2/theme/eclipse.css +25 -0
- data/lib/public/milksteak/codemirror2/theme/elegant.css +10 -0
- data/lib/public/milksteak/codemirror2/theme/monokai.css +28 -0
- data/lib/public/milksteak/codemirror2/theme/neat.css +9 -0
- data/lib/public/milksteak/codemirror2/theme/night.css +21 -0
- data/lib/public/milksteak/codemirror2/theme/rubyblue.css +21 -0
- data/lib/public/milksteak/css/bootstrap-responsive.css +567 -0
- data/lib/public/milksteak/css/bootstrap-responsive.min.css +3 -0
- data/lib/public/milksteak/css/bootstrap.css +3365 -0
- data/lib/public/milksteak/css/bootstrap.min.css +610 -0
- data/lib/public/milksteak/css/calendrical.css +69 -0
- data/lib/public/milksteak/css/prettify.css +52 -0
- data/lib/public/milksteak/css/style.css +8 -0
- data/lib/public/milksteak/img/glyphicons-halflings-white.png +0 -0
- data/lib/public/milksteak/img/glyphicons-halflings.png +0 -0
- data/lib/public/milksteak/img/spinner.gif +0 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.asp +44 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.aspx +31 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.cf +19 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.jsp +49 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.php +43 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.pl +102 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.py +25 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.rb +61 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_huck.lasso +36 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_sabourdin.lasso +48 -0
- data/lib/public/milksteak/jqueryFileTree/images/application.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/code.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/css.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/db.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/directory.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/doc.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/file.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/film.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/flash.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/folder_open.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/html.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/java.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/linux.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/music.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/pdf.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/php.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/picture.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/ppt.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/psd.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/ruby.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/script.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/spinner.gif +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/txt.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/xls.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/zip.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.css +91 -0
- data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.js +95 -0
- data/lib/public/milksteak/js/app.js +0 -0
- data/lib/public/milksteak/js/backbone.js +1290 -0
- data/lib/public/milksteak/js/bootstrap-alert.js +91 -0
- data/lib/public/milksteak/js/bootstrap-button.js +98 -0
- data/lib/public/milksteak/js/bootstrap-carousel.js +154 -0
- data/lib/public/milksteak/js/bootstrap-collapse.js +136 -0
- data/lib/public/milksteak/js/bootstrap-dropdown.js +92 -0
- data/lib/public/milksteak/js/bootstrap-modal.js +209 -0
- data/lib/public/milksteak/js/bootstrap-popover.js +95 -0
- data/lib/public/milksteak/js/bootstrap-scrollspy.js +125 -0
- data/lib/public/milksteak/js/bootstrap-tab.js +130 -0
- data/lib/public/milksteak/js/bootstrap-tooltip.js +270 -0
- data/lib/public/milksteak/js/bootstrap-transition.js +51 -0
- data/lib/public/milksteak/js/bootstrap-typeahead.js +271 -0
- data/lib/public/milksteak/js/bootstrap.js +1722 -0
- data/lib/public/milksteak/js/bootstrap.min.js +1 -0
- data/lib/public/milksteak/js/jquery-ui.min.js +15 -0
- data/lib/public/milksteak/js/jquery.calendrical.js +490 -0
- data/lib/public/milksteak/js/jquery.easing.js +146 -0
- data/lib/public/milksteak/js/jquery.js +9252 -0
- data/lib/public/milksteak/js/mustache.js +536 -0
- data/lib/public/milksteak/js/prettify.js +28 -0
- data/lib/public/milksteak/js/underscore.js +999 -0
- data/lib/public/milksteak/markitup/.DS_Store +0 -0
- data/lib/public/milksteak/markitup/jquery.markitup.js +593 -0
- data/lib/public/milksteak/markitup/sets/default/images/bold.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/clean.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/image.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/italic.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/link.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/list-bullet.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/list-numeric.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/picture.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/preview.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/stroke.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/set.js +30 -0
- data/lib/public/milksteak/markitup/sets/default/style.css +34 -0
- data/lib/public/milksteak/markitup/sets/textile/images/bold.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/code.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h1.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h2.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h3.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h4.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h5.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h6.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/italic.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/link.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/list-bullet.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/list-numeric.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/paragraph.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/picture.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/preview.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/quotes.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/stroke.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/set.js +33 -0
- data/lib/public/milksteak/markitup/sets/textile/style.css +60 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-container.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-html.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-json.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/handle.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/menu.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/submenu.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/style.css +147 -0
- data/lib/public/milksteak/markitup/skins/simple/images/handle.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/images/menu.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/images/submenu.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/style.css +118 -0
- data/lib/public/milksteak/markitup/templates/preview.css +5 -0
- data/lib/public/milksteak/markitup/templates/preview.html +11 -0
- data/lib/public/milksteak/uploadify-v2.1.4/cancel.png +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/check.php +35 -0
- data/lib/public/milksteak/uploadify-v2.1.4/expressInstall.swf +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery-1.4.2.min.js +154 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.js +296 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js +26 -0
- data/lib/public/milksteak/uploadify-v2.1.4/swfobject.js +4 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.allglyphs.swf +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.css +53 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.fla +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.php +46 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.swf +0 -0
- data/lib/public/milksteak/wmd/Markdown.Converter.js +1332 -0
- data/lib/public/milksteak/wmd/Markdown.Editor.js +2160 -0
- data/lib/public/milksteak/wmd/Markdown.Sanitizer.js +108 -0
- data/lib/public/milksteak/wmd/wmd-buttons.png +0 -0
- data/lib/public/milksteak/wmd/wmd.css +103 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-p.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.css +90 -0
- data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.html +26 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.js +4688 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.min.js +1 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.pack.js +1 -0
- data/lib/public/milksteak/wymeditor/lang/bg.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/ca.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/cs.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/cy.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/de.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/en.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/es.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/fa.js +46 -0
- data/lib/public/milksteak/wymeditor/lang/fi.js +44 -0
- data/lib/public/milksteak/wymeditor/lang/fr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/gl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/he.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/hr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/hu.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/it.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nb.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nn.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pt-br.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pt.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/ru.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/sv.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/tr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/zh_cn.js +47 -0
- data/lib/public/milksteak/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
- data/lib/public/milksteak/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
- data/lib/public/milksteak/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
- data/lib/public/milksteak/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
- data/lib/public/milksteak/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
- data/lib/public/milksteak/wymeditor/plugins/resizable/readme.txt +124 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/README +19 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/tidy.php +36 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/wand.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/compact/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/compact/skin.css +134 -0
- data/lib/public/milksteak/wymeditor/skins/compact/skin.js +35 -0
- data/lib/public/milksteak/wymeditor/skins/default/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/default/skin.css +133 -0
- data/lib/public/milksteak/wymeditor/skins/default/skin.js +40 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.header.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/skin.css +131 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/skin.js +30 -0
- data/lib/public/milksteak/wymeditor/skins/silver/COPYING +674 -0
- data/lib/public/milksteak/wymeditor/skins/silver/README +27 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.header.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/icons.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/skin.css +297 -0
- data/lib/public/milksteak/wymeditor/skins/silver/skin.js +61 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/skin.css +134 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/skin.js +39 -0
- data/lib/public/milksteak/wymeditor/skins/wymeditor_icon.png +0 -0
- data/lib/views/layouts/admin.erb +8 -0
- data/lib/views/login.erb +1 -0
- data/milksteak.gemspec +30 -13
- data/spec/fixtures/pages/sample_page.yml +5 -0
- data/spec/lib/milksteak/cms_spec.rb +12 -0
- data/spec/models/page_spec.rb +58 -0
- data/spec/spec_helper.rb +19 -0
- metadata +429 -10
- data/LICENSE +0 -22
- data/README.md +0 -29
@@ -0,0 +1,186 @@
|
|
1
|
+
CodeMirror.defineMode("less", function(config) {
|
2
|
+
var indentUnit = config.indentUnit, type;
|
3
|
+
function ret(style, tp) {type = tp; return style;}
|
4
|
+
//html5 tags
|
5
|
+
var tags = ["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","dir","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","legend","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr"];
|
6
|
+
|
7
|
+
function inTagsArray(val){
|
8
|
+
for(var i=0; i<tags.length; i++){
|
9
|
+
if(val === tags[i]){
|
10
|
+
return true;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
function tokenBase(stream, state) {
|
16
|
+
var ch = stream.next();
|
17
|
+
|
18
|
+
if (ch == "@") {stream.eatWhile(/[\w\-]/); return ret("meta", stream.current());}
|
19
|
+
else if (ch == "/" && stream.eat("*")) {
|
20
|
+
state.tokenize = tokenCComment;
|
21
|
+
return tokenCComment(stream, state);
|
22
|
+
}
|
23
|
+
else if (ch == "<" && stream.eat("!")) {
|
24
|
+
state.tokenize = tokenSGMLComment;
|
25
|
+
return tokenSGMLComment(stream, state);
|
26
|
+
}
|
27
|
+
else if (ch == "=") ret(null, "compare");
|
28
|
+
else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare");
|
29
|
+
else if (ch == "\"" || ch == "'") {
|
30
|
+
state.tokenize = tokenString(ch);
|
31
|
+
return state.tokenize(stream, state);
|
32
|
+
}
|
33
|
+
else if (ch == "/") { // lesscss e.g.: .png will not be parsed as a class
|
34
|
+
if(stream.eat("/")){
|
35
|
+
state.tokenize = tokenSComment
|
36
|
+
return tokenSComment(stream, state);
|
37
|
+
}else{
|
38
|
+
stream.eatWhile(/[\a-zA-Z0-9\-_.]/);
|
39
|
+
return ret("number", "unit");
|
40
|
+
}
|
41
|
+
}
|
42
|
+
else if (ch == "!") {
|
43
|
+
stream.match(/^\s*\w*/);
|
44
|
+
return ret("keyword", "important");
|
45
|
+
}
|
46
|
+
else if (/\d/.test(ch)) {
|
47
|
+
stream.eatWhile(/[\w.%]/);
|
48
|
+
return ret("number", "unit");
|
49
|
+
}
|
50
|
+
else if (/[,+>*\/]/.test(ch)) {//removed . dot character original was [,.+>*\/]
|
51
|
+
return ret(null, "select-op");
|
52
|
+
}
|
53
|
+
else if (/[;{}:\[\]()]/.test(ch)) { //added () char for lesscss original was [;{}:\[\]]
|
54
|
+
if(ch == ":"){
|
55
|
+
stream.eatWhile(/[active|hover|link|visited]/);
|
56
|
+
if( stream.current().match(/[active|hover|link|visited]/)){
|
57
|
+
return ret("tag", "tag");
|
58
|
+
}else{
|
59
|
+
return ret(null, ch);
|
60
|
+
}
|
61
|
+
}else{
|
62
|
+
return ret(null, ch);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
else if (ch == ".") { // lesscss
|
66
|
+
stream.eatWhile(/[\a-zA-Z0-9\-_]/);
|
67
|
+
return ret("tag", "tag");
|
68
|
+
}
|
69
|
+
else if (ch == "#") { // lesscss
|
70
|
+
stream.match(/([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/);
|
71
|
+
if(stream.current().length >1){
|
72
|
+
if(stream.current().match(/([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/) != null){
|
73
|
+
return ret("number", "unit");
|
74
|
+
}else{
|
75
|
+
stream.eatWhile(/[\w\-]/);
|
76
|
+
return ret("atom", "tag");
|
77
|
+
}
|
78
|
+
}else{
|
79
|
+
stream.eatWhile(/[\w\-]/);
|
80
|
+
return ret("atom", "tag");
|
81
|
+
}
|
82
|
+
}
|
83
|
+
else if (ch == "&") {
|
84
|
+
stream.eatWhile(/[\w\-]/);
|
85
|
+
return ret(null, ch);
|
86
|
+
}
|
87
|
+
else {
|
88
|
+
stream.eatWhile(/[\w\\\-_.%]/);
|
89
|
+
if( stream.eat("(") ){ // lesscss
|
90
|
+
return ret(null, ch);
|
91
|
+
}else if( stream.current().match(/\-\d|\-.\d/) ){ // lesscss match e.g.: -5px -0.4 etc...
|
92
|
+
return ret("number", "unit");
|
93
|
+
}else if( inTagsArray(stream.current()) ){ // lesscss match html tags
|
94
|
+
return ret("tag", "tag");
|
95
|
+
}else{
|
96
|
+
return ret("variable", "variable");
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
}
|
101
|
+
|
102
|
+
function tokenSComment(stream, state) {// SComment = Slash comment
|
103
|
+
stream.skipToEnd();
|
104
|
+
state.tokenize = tokenBase;
|
105
|
+
return ret("comment", "comment");
|
106
|
+
}
|
107
|
+
|
108
|
+
function tokenCComment(stream, state) {
|
109
|
+
var maybeEnd = false, ch;
|
110
|
+
while ((ch = stream.next()) != null) {
|
111
|
+
if (maybeEnd && ch == "/") {
|
112
|
+
state.tokenize = tokenBase;
|
113
|
+
break;
|
114
|
+
}
|
115
|
+
maybeEnd = (ch == "*");
|
116
|
+
}
|
117
|
+
return ret("comment", "comment");
|
118
|
+
}
|
119
|
+
|
120
|
+
function tokenSGMLComment(stream, state) {
|
121
|
+
var dashes = 0, ch;
|
122
|
+
while ((ch = stream.next()) != null) {
|
123
|
+
if (dashes >= 2 && ch == ">") {
|
124
|
+
state.tokenize = tokenBase;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
dashes = (ch == "-") ? dashes + 1 : 0;
|
128
|
+
}
|
129
|
+
return ret("comment", "comment");
|
130
|
+
}
|
131
|
+
|
132
|
+
function tokenString(quote) {
|
133
|
+
return function(stream, state) {
|
134
|
+
var escaped = false, ch;
|
135
|
+
while ((ch = stream.next()) != null) {
|
136
|
+
if (ch == quote && !escaped)
|
137
|
+
break;
|
138
|
+
escaped = !escaped && ch == "\\";
|
139
|
+
}
|
140
|
+
if (!escaped) state.tokenize = tokenBase;
|
141
|
+
return ret("string", "string");
|
142
|
+
};
|
143
|
+
}
|
144
|
+
|
145
|
+
return {
|
146
|
+
startState: function(base) {
|
147
|
+
return {tokenize: tokenBase,
|
148
|
+
baseIndent: base || 0,
|
149
|
+
stack: []};
|
150
|
+
},
|
151
|
+
|
152
|
+
token: function(stream, state) {
|
153
|
+
if (stream.eatSpace()) return null;
|
154
|
+
var style = state.tokenize(stream, state);
|
155
|
+
|
156
|
+
var context = state.stack[state.stack.length-1];
|
157
|
+
if (type == "hash" && context == "rule") style = "atom";
|
158
|
+
else if (style == "variable") {
|
159
|
+
if (context == "rule") style = null; //"tag"
|
160
|
+
else if (!context || context == "@media{") style = "tag";
|
161
|
+
}
|
162
|
+
|
163
|
+
if (context == "rule" && /^[\{\};]$/.test(type))
|
164
|
+
state.stack.pop();
|
165
|
+
if (type == "{") {
|
166
|
+
if (context == "@media") state.stack[state.stack.length-1] = "@media{";
|
167
|
+
else state.stack.push("{");
|
168
|
+
}
|
169
|
+
else if (type == "}") state.stack.pop();
|
170
|
+
else if (type == "@media") state.stack.push("@media");
|
171
|
+
else if (context == "{" && type != "comment") state.stack.push("rule");
|
172
|
+
return style;
|
173
|
+
},
|
174
|
+
|
175
|
+
indent: function(state, textAfter) {
|
176
|
+
var n = state.stack.length;
|
177
|
+
if (/^\}/.test(textAfter))
|
178
|
+
n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
|
179
|
+
return state.baseIndent + n * indentUnit;
|
180
|
+
},
|
181
|
+
|
182
|
+
electricChars: "}"
|
183
|
+
};
|
184
|
+
});
|
185
|
+
|
186
|
+
CodeMirror.defineMIME("text/less", "less");
|
@@ -0,0 +1,72 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>CodeMirror: Lua mode</title>
|
5
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
6
|
+
<script src="../../lib/codemirror.js"></script>
|
7
|
+
<script src="lua.js"></script>
|
8
|
+
<link rel="stylesheet" href="../../theme/neat.css">
|
9
|
+
<style>.CodeMirror {border: 1px solid black;}</style>
|
10
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<h1>CodeMirror: Lua mode</h1>
|
14
|
+
<form><textarea id="code" name="code">
|
15
|
+
--[[
|
16
|
+
example useless code to show lua syntax highlighting
|
17
|
+
this is multiline comment
|
18
|
+
]]
|
19
|
+
|
20
|
+
function blahblahblah(x)
|
21
|
+
|
22
|
+
local table = {
|
23
|
+
"asd" = 123,
|
24
|
+
"x" = 0.34,
|
25
|
+
}
|
26
|
+
if x ~= 3 then
|
27
|
+
print( x )
|
28
|
+
elseif x == "string"
|
29
|
+
my_custom_function( 0x34 )
|
30
|
+
else
|
31
|
+
unknown_function( "some string" )
|
32
|
+
end
|
33
|
+
|
34
|
+
--single line comment
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
function blablabla3()
|
39
|
+
|
40
|
+
for k,v in ipairs( table ) do
|
41
|
+
--abcde..
|
42
|
+
y=[=[
|
43
|
+
x=[[
|
44
|
+
x is a multi line string
|
45
|
+
]]
|
46
|
+
but its definition is iside a highest level string!
|
47
|
+
]=]
|
48
|
+
print(" \"\" ")
|
49
|
+
|
50
|
+
s = math.sin( x )
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
</textarea></form>
|
55
|
+
<script>
|
56
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
57
|
+
tabMode: "indent",
|
58
|
+
matchBrackets: true,
|
59
|
+
theme: "neat"
|
60
|
+
});
|
61
|
+
</script>
|
62
|
+
|
63
|
+
<p>Loosely based on Franciszek
|
64
|
+
Wawrzak's <a href="http://codemirror.net/1/contrib/lua">CodeMirror
|
65
|
+
1 mode</a>. One configuration parameter is
|
66
|
+
supported, <code>specials</code>, to which you can provide an
|
67
|
+
array of strings to have those identifiers highlighted with
|
68
|
+
the <code>lua-special</code> style.</p>
|
69
|
+
<p><strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>
|
70
|
+
|
71
|
+
</body>
|
72
|
+
</html>
|
@@ -0,0 +1,140 @@
|
|
1
|
+
// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's
|
2
|
+
// CodeMirror 1 mode.
|
3
|
+
// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting
|
4
|
+
|
5
|
+
CodeMirror.defineMode("lua", function(config, parserConfig) {
|
6
|
+
var indentUnit = config.indentUnit;
|
7
|
+
|
8
|
+
function prefixRE(words) {
|
9
|
+
return new RegExp("^(?:" + words.join("|") + ")", "i");
|
10
|
+
}
|
11
|
+
function wordRE(words) {
|
12
|
+
return new RegExp("^(?:" + words.join("|") + ")$", "i");
|
13
|
+
}
|
14
|
+
var specials = wordRE(parserConfig.specials || []);
|
15
|
+
|
16
|
+
// long list of standard functions from lua manual
|
17
|
+
var builtins = wordRE([
|
18
|
+
"_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load",
|
19
|
+
"loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require",
|
20
|
+
"select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",
|
21
|
+
|
22
|
+
"coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",
|
23
|
+
|
24
|
+
"debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable",
|
25
|
+
"debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable",
|
26
|
+
"debug.setupvalue","debug.traceback",
|
27
|
+
|
28
|
+
"close","flush","lines","read","seek","setvbuf","write",
|
29
|
+
|
30
|
+
"io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin",
|
31
|
+
"io.stdout","io.tmpfile","io.type","io.write",
|
32
|
+
|
33
|
+
"math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg",
|
34
|
+
"math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max",
|
35
|
+
"math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh",
|
36
|
+
"math.sqrt","math.tan","math.tanh",
|
37
|
+
|
38
|
+
"os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale",
|
39
|
+
"os.time","os.tmpname",
|
40
|
+
|
41
|
+
"package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload",
|
42
|
+
"package.seeall",
|
43
|
+
|
44
|
+
"string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub",
|
45
|
+
"string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",
|
46
|
+
|
47
|
+
"table.concat","table.insert","table.maxn","table.remove","table.sort"
|
48
|
+
]);
|
49
|
+
var keywords = wordRE(["and","break","elseif","false","nil","not","or","return",
|
50
|
+
"true","function", "end", "if", "then", "else", "do",
|
51
|
+
"while", "repeat", "until", "for", "in", "local" ]);
|
52
|
+
|
53
|
+
var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]);
|
54
|
+
var dedentTokens = wordRE(["end", "until", "\\)", "}"]);
|
55
|
+
var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]);
|
56
|
+
|
57
|
+
function readBracket(stream) {
|
58
|
+
var level = 0;
|
59
|
+
while (stream.eat("=")) ++level;
|
60
|
+
stream.eat("[");
|
61
|
+
return level;
|
62
|
+
}
|
63
|
+
|
64
|
+
function normal(stream, state) {
|
65
|
+
var ch = stream.next();
|
66
|
+
if (ch == "-" && stream.eat("-")) {
|
67
|
+
if (stream.eat("["))
|
68
|
+
return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state);
|
69
|
+
stream.skipToEnd();
|
70
|
+
return "comment";
|
71
|
+
}
|
72
|
+
if (ch == "\"" || ch == "'")
|
73
|
+
return (state.cur = string(ch))(stream, state);
|
74
|
+
if (ch == "[" && /[\[=]/.test(stream.peek()))
|
75
|
+
return (state.cur = bracketed(readBracket(stream), "string"))(stream, state);
|
76
|
+
if (/\d/.test(ch)) {
|
77
|
+
stream.eatWhile(/[\w.%]/);
|
78
|
+
return "number";
|
79
|
+
}
|
80
|
+
if (/[\w_]/.test(ch)) {
|
81
|
+
stream.eatWhile(/[\w\\\-_.]/);
|
82
|
+
return "variable";
|
83
|
+
}
|
84
|
+
return null;
|
85
|
+
}
|
86
|
+
|
87
|
+
function bracketed(level, style) {
|
88
|
+
return function(stream, state) {
|
89
|
+
var curlev = null, ch;
|
90
|
+
while ((ch = stream.next()) != null) {
|
91
|
+
if (curlev == null) {if (ch == "]") curlev = 0;}
|
92
|
+
else if (ch == "=") ++curlev;
|
93
|
+
else if (ch == "]" && curlev == level) { state.cur = normal; break; }
|
94
|
+
else curlev = null;
|
95
|
+
}
|
96
|
+
return style;
|
97
|
+
};
|
98
|
+
}
|
99
|
+
|
100
|
+
function string(quote) {
|
101
|
+
return function(stream, state) {
|
102
|
+
var escaped = false, ch;
|
103
|
+
while ((ch = stream.next()) != null) {
|
104
|
+
if (ch == quote && !escaped) break;
|
105
|
+
escaped = !escaped && ch == "\\";
|
106
|
+
}
|
107
|
+
if (!escaped) state.cur = normal;
|
108
|
+
return "string";
|
109
|
+
};
|
110
|
+
}
|
111
|
+
|
112
|
+
return {
|
113
|
+
startState: function(basecol) {
|
114
|
+
return {basecol: basecol || 0, indentDepth: 0, cur: normal};
|
115
|
+
},
|
116
|
+
|
117
|
+
token: function(stream, state) {
|
118
|
+
if (stream.eatSpace()) return null;
|
119
|
+
var style = state.cur(stream, state);
|
120
|
+
var word = stream.current();
|
121
|
+
if (style == "variable") {
|
122
|
+
if (keywords.test(word)) style = "keyword";
|
123
|
+
else if (builtins.test(word)) style = "builtin";
|
124
|
+
else if (specials.test(word)) style = "variable-2";
|
125
|
+
}
|
126
|
+
if ((style != "comment") && (style != "string")){
|
127
|
+
if (indentTokens.test(word)) ++state.indentDepth;
|
128
|
+
else if (dedentTokens.test(word)) --state.indentDepth;
|
129
|
+
}
|
130
|
+
return style;
|
131
|
+
},
|
132
|
+
|
133
|
+
indent: function(state, textAfter) {
|
134
|
+
var closing = dedentPartial.test(textAfter);
|
135
|
+
return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));
|
136
|
+
}
|
137
|
+
};
|
138
|
+
});
|
139
|
+
|
140
|
+
CodeMirror.defineMIME("text/x-lua", "lua");
|