poly-cms 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/Gemfile +27 -0
- data/Gemfile.lock +95 -0
- data/README.md +3 -0
- data/Rakefile +45 -0
- data/bin/poly +88 -0
- data/config.ru +3 -0
- data/core/admin/assets/images/icons/cache-clear.svg +11 -0
- data/core/admin/assets/images/icons/delete-dark.svg +10 -0
- data/core/admin/assets/images/icons/delete.svg +10 -0
- data/core/admin/assets/images/icons/handle.svg +12 -0
- data/core/admin/assets/images/icons/logout.svg +13 -0
- data/core/admin/assets/images/icons/move.svg +10 -0
- data/core/admin/assets/images/icons/new.svg +9 -0
- data/core/admin/assets/images/icons/prompt.svg +11 -0
- data/core/admin/assets/images/icons/refresh.svg +40 -0
- data/core/admin/assets/images/icons/save.svg +7 -0
- data/core/admin/assets/images/poly-small-boxed.svg +51 -0
- data/core/admin/assets/images/poly-small.svg +52 -0
- data/core/admin/assets/images/poly.svg +36 -0
- data/core/admin/assets/js/app/file-ext.js +15 -0
- data/core/admin/assets/js/app/views/editor.js +300 -0
- data/core/admin/assets/js/app/views/git.js +65 -0
- data/core/admin/assets/js/app/views/main.js +59 -0
- data/core/admin/assets/js/main.js +44 -0
- data/core/admin/assets/js/routes.js +25 -0
- data/core/admin/assets/js/vendor/backbone.js +4 -0
- data/core/admin/assets/js/vendor/codemirror/.gitattributes +8 -0
- data/core/admin/assets/js/vendor/codemirror/.gitignore +6 -0
- data/core/admin/assets/js/vendor/codemirror/.travis.yml +3 -0
- data/core/admin/assets/js/vendor/codemirror/addon/comment/comment.js +145 -0
- data/core/admin/assets/js/vendor/codemirror/addon/comment/continuecomment.js +54 -0
- data/core/admin/assets/js/vendor/codemirror/addon/dialog/dialog.css +32 -0
- data/core/admin/assets/js/vendor/codemirror/addon/dialog/dialog.js +80 -0
- data/core/admin/assets/js/vendor/codemirror/addon/display/fullscreen.css +6 -0
- data/core/admin/assets/js/vendor/codemirror/addon/display/fullscreen.js +30 -0
- data/core/admin/assets/js/vendor/codemirror/addon/display/placeholder.js +54 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/closebrackets.js +82 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/closetag.js +87 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/continuelist.js +25 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/matchbrackets.js +86 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/matchtags.js +56 -0
- data/core/admin/assets/js/vendor/codemirror/addon/edit/trailingspace.js +15 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/brace-fold.js +93 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/comment-fold.js +40 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/foldcode.js +75 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/foldgutter.css +21 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/foldgutter.js +124 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/indent-fold.js +26 -0
- data/core/admin/assets/js/vendor/codemirror/addon/fold/xml-fold.js +167 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/anyword-hint.js +34 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/css-hint.js +50 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/html-hint.js +337 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/javascript-hint.js +130 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/pig-hint.js +121 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/python-hint.js +95 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/show-hint.css +38 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/show-hint.js +274 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/sql-hint.js +105 -0
- data/core/admin/assets/js/vendor/codemirror/addon/hint/xml-hint.js +69 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/coffeescript-lint.js +27 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/css-lint.js +19 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/javascript-lint.js +126 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/json-lint.js +17 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/lint.css +73 -0
- data/core/admin/assets/js/vendor/codemirror/addon/lint/lint.js +203 -0
- data/core/admin/assets/js/vendor/codemirror/addon/merge/dep/diff_match_patch.js +50 -0
- data/core/admin/assets/js/vendor/codemirror/addon/merge/merge.css +92 -0
- data/core/admin/assets/js/vendor/codemirror/addon/merge/merge.js +474 -0
- data/core/admin/assets/js/vendor/codemirror/addon/mode/loadmode.js +51 -0
- data/core/admin/assets/js/vendor/codemirror/addon/mode/multiplex.js +101 -0
- data/core/admin/assets/js/vendor/codemirror/addon/mode/multiplex_test.js +30 -0
- data/core/admin/assets/js/vendor/codemirror/addon/mode/overlay.js +59 -0
- data/core/admin/assets/js/vendor/codemirror/addon/runmode/colorize.js +29 -0
- data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode-standalone.js +136 -0
- data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode.js +56 -0
- data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode.node.js +103 -0
- data/core/admin/assets/js/vendor/codemirror/addon/scroll/scrollpastend.js +34 -0
- data/core/admin/assets/js/vendor/codemirror/addon/search/match-highlighter.js +91 -0
- data/core/admin/assets/js/vendor/codemirror/addon/search/search.js +133 -0
- data/core/admin/assets/js/vendor/codemirror/addon/search/searchcursor.js +143 -0
- data/core/admin/assets/js/vendor/codemirror/addon/selection/active-line.js +39 -0
- data/core/admin/assets/js/vendor/codemirror/addon/selection/mark-selection.js +108 -0
- data/core/admin/assets/js/vendor/codemirror/addon/tern/tern.css +85 -0
- data/core/admin/assets/js/vendor/codemirror/addon/tern/tern.js +632 -0
- data/core/admin/assets/js/vendor/codemirror/addon/tern/worker.js +41 -0
- data/core/admin/assets/js/vendor/codemirror/addon/wrap/hardwrap.js +99 -0
- data/core/admin/assets/js/vendor/codemirror/bin/authors.sh +6 -0
- data/core/admin/assets/js/vendor/codemirror/bin/compress +92 -0
- data/core/admin/assets/js/vendor/codemirror/bin/lint +16 -0
- data/core/admin/assets/js/vendor/codemirror/bin/source-highlight +61 -0
- data/core/admin/assets/js/vendor/codemirror/bower.json +15 -0
- data/core/admin/assets/js/vendor/codemirror/demo/activeline.html +78 -0
- data/core/admin/assets/js/vendor/codemirror/demo/anywordhint.html +79 -0
- data/core/admin/assets/js/vendor/codemirror/demo/bidi.html +74 -0
- data/core/admin/assets/js/vendor/codemirror/demo/btree.html +86 -0
- data/core/admin/assets/js/vendor/codemirror/demo/buffers.html +109 -0
- data/core/admin/assets/js/vendor/codemirror/demo/changemode.html +59 -0
- data/core/admin/assets/js/vendor/codemirror/demo/closebrackets.html +63 -0
- data/core/admin/assets/js/vendor/codemirror/demo/closetag.html +40 -0
- data/core/admin/assets/js/vendor/codemirror/demo/complete.html +80 -0
- data/core/admin/assets/js/vendor/codemirror/demo/emacs.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/demo/folding.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/demo/fullscreen.html +130 -0
- data/core/admin/assets/js/vendor/codemirror/demo/hardwrap.html +69 -0
- data/core/admin/assets/js/vendor/codemirror/demo/html5complete.html +54 -0
- data/core/admin/assets/js/vendor/codemirror/demo/indentwrap.html +58 -0
- data/core/admin/assets/js/vendor/codemirror/demo/lint.html +171 -0
- data/core/admin/assets/js/vendor/codemirror/demo/loadmode.html +49 -0
- data/core/admin/assets/js/vendor/codemirror/demo/marker.html +52 -0
- data/core/admin/assets/js/vendor/codemirror/demo/markselection.html +45 -0
- data/core/admin/assets/js/vendor/codemirror/demo/matchhighlighter.html +47 -0
- data/core/admin/assets/js/vendor/codemirror/demo/matchtags.html +49 -0
- data/core/admin/assets/js/vendor/codemirror/demo/merge.html +82 -0
- data/core/admin/assets/js/vendor/codemirror/demo/multiplex.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/demo/mustache.html +68 -0
- data/core/admin/assets/js/vendor/codemirror/demo/placeholder.html +45 -0
- data/core/admin/assets/js/vendor/codemirror/demo/preview.html +88 -0
- data/core/admin/assets/js/vendor/codemirror/demo/resize.html +58 -0
- data/core/admin/assets/js/vendor/codemirror/demo/runmode.html +62 -0
- data/core/admin/assets/js/vendor/codemirror/demo/search.html +94 -0
- data/core/admin/assets/js/vendor/codemirror/demo/spanaffectswrapping_shim.html +85 -0
- data/core/admin/assets/js/vendor/codemirror/demo/tern.html +128 -0
- data/core/admin/assets/js/vendor/codemirror/demo/theme.html +121 -0
- data/core/admin/assets/js/vendor/codemirror/demo/trailingspace.html +48 -0
- data/core/admin/assets/js/vendor/codemirror/demo/variableheight.html +61 -0
- data/core/admin/assets/js/vendor/codemirror/demo/vim.html +74 -0
- data/core/admin/assets/js/vendor/codemirror/demo/visibletabs.html +62 -0
- data/core/admin/assets/js/vendor/codemirror/demo/widget.html +85 -0
- data/core/admin/assets/js/vendor/codemirror/demo/xmlcomplete.html +116 -0
- data/core/admin/assets/js/vendor/codemirror/doc/activebookmark.js +42 -0
- data/core/admin/assets/js/vendor/codemirror/doc/compress.html +231 -0
- data/core/admin/assets/js/vendor/codemirror/doc/docs.css +226 -0
- data/core/admin/assets/js/vendor/codemirror/doc/internals.html +503 -0
- data/core/admin/assets/js/vendor/codemirror/doc/logo.png +0 -0
- data/core/admin/assets/js/vendor/codemirror/doc/logo.svg +147 -0
- data/core/admin/assets/js/vendor/codemirror/doc/manual.html +2512 -0
- data/core/admin/assets/js/vendor/codemirror/doc/realworld.html +134 -0
- data/core/admin/assets/js/vendor/codemirror/doc/releases.html +779 -0
- data/core/admin/assets/js/vendor/codemirror/doc/reporting.html +61 -0
- data/core/admin/assets/js/vendor/codemirror/doc/upgrade_v2.2.html +96 -0
- data/core/admin/assets/js/vendor/codemirror/doc/upgrade_v3.html +230 -0
- data/core/admin/assets/js/vendor/codemirror/index.html +192 -0
- data/core/admin/assets/js/vendor/codemirror/keymap/emacs.js +387 -0
- data/core/admin/assets/js/vendor/codemirror/keymap/extra.js +43 -0
- data/core/admin/assets/js/vendor/codemirror/keymap/vim.js +3704 -0
- data/core/admin/assets/js/vendor/codemirror/lib/codemirror.css +263 -0
- data/core/admin/assets/js/vendor/codemirror/lib/codemirror.js +5910 -0
- data/core/admin/assets/js/vendor/codemirror/mode/apl/apl.js +160 -0
- data/core/admin/assets/js/vendor/codemirror/mode/apl/index.html +72 -0
- data/core/admin/assets/js/vendor/codemirror/mode/asterisk/asterisk.js +183 -0
- data/core/admin/assets/js/vendor/codemirror/mode/asterisk/index.html +154 -0
- data/core/admin/assets/js/vendor/codemirror/mode/clike/clike.js +362 -0
- data/core/admin/assets/js/vendor/codemirror/mode/clike/index.html +195 -0
- data/core/admin/assets/js/vendor/codemirror/mode/clike/scala.html +767 -0
- data/core/admin/assets/js/vendor/codemirror/mode/clojure/clojure.js +224 -0
- data/core/admin/assets/js/vendor/codemirror/mode/clojure/index.html +88 -0
- data/core/admin/assets/js/vendor/codemirror/mode/cobol/cobol.js +240 -0
- data/core/admin/assets/js/vendor/codemirror/mode/cobol/index.html +210 -0
- data/core/admin/assets/js/vendor/codemirror/mode/coffeescript/coffeescript.js +349 -0
- data/core/admin/assets/js/vendor/codemirror/mode/coffeescript/index.html +740 -0
- data/core/admin/assets/js/vendor/codemirror/mode/commonlisp/commonlisp.js +105 -0
- data/core/admin/assets/js/vendor/codemirror/mode/commonlisp/index.html +177 -0
- data/core/admin/assets/js/vendor/codemirror/mode/css/css.js +639 -0
- data/core/admin/assets/js/vendor/codemirror/mode/css/index.html +70 -0
- data/core/admin/assets/js/vendor/codemirror/mode/css/scss.html +157 -0
- data/core/admin/assets/js/vendor/codemirror/mode/css/scss_test.js +84 -0
- data/core/admin/assets/js/vendor/codemirror/mode/css/test.js +130 -0
- data/core/admin/assets/js/vendor/codemirror/mode/d/d.js +205 -0
- data/core/admin/assets/js/vendor/codemirror/mode/d/index.html +273 -0
- data/core/admin/assets/js/vendor/codemirror/mode/diff/diff.js +32 -0
- data/core/admin/assets/js/vendor/codemirror/mode/diff/index.html +117 -0
- data/core/admin/assets/js/vendor/codemirror/mode/dtd/dtd.js +127 -0
- data/core/admin/assets/js/vendor/codemirror/mode/dtd/index.html +89 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ecl/ecl.js +192 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ecl/index.html +52 -0
- data/core/admin/assets/js/vendor/codemirror/mode/eiffel/eiffel.js +147 -0
- data/core/admin/assets/js/vendor/codemirror/mode/eiffel/index.html +430 -0
- data/core/admin/assets/js/vendor/codemirror/mode/erlang/erlang.js +484 -0
- data/core/admin/assets/js/vendor/codemirror/mode/erlang/index.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/mode/fortran/fortran.js +173 -0
- data/core/admin/assets/js/vendor/codemirror/mode/fortran/index.html +81 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gas/gas.js +330 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gas/index.html +68 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gfm/gfm.js +97 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gfm/index.html +82 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gfm/test.js +112 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gherkin/gherkin.js +168 -0
- data/core/admin/assets/js/vendor/codemirror/mode/gherkin/index.html +48 -0
- data/core/admin/assets/js/vendor/codemirror/mode/go/go.js +168 -0
- data/core/admin/assets/js/vendor/codemirror/mode/go/index.html +85 -0
- data/core/admin/assets/js/vendor/codemirror/mode/groovy/groovy.js +211 -0
- data/core/admin/assets/js/vendor/codemirror/mode/groovy/index.html +84 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haml/haml.js +153 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haml/index.html +79 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haml/test.js +94 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haskell/haskell.js +250 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haskell/index.html +73 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haxe/haxe.js +429 -0
- data/core/admin/assets/js/vendor/codemirror/mode/haxe/index.html +103 -0
- data/core/admin/assets/js/vendor/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/core/admin/assets/js/vendor/codemirror/mode/htmlembedded/index.html +60 -0
- data/core/admin/assets/js/vendor/codemirror/mode/htmlmixed/htmlmixed.js +104 -0
- data/core/admin/assets/js/vendor/codemirror/mode/htmlmixed/index.html +85 -0
- data/core/admin/assets/js/vendor/codemirror/mode/http/http.js +98 -0
- data/core/admin/assets/js/vendor/codemirror/mode/http/index.html +45 -0
- data/core/admin/assets/js/vendor/codemirror/mode/index.html +112 -0
- data/core/admin/assets/js/vendor/codemirror/mode/jade/index.html +66 -0
- data/core/admin/assets/js/vendor/codemirror/mode/jade/jade.js +90 -0
- data/core/admin/assets/js/vendor/codemirror/mode/javascript/index.html +107 -0
- data/core/admin/assets/js/vendor/codemirror/mode/javascript/javascript.js +480 -0
- data/core/admin/assets/js/vendor/codemirror/mode/javascript/test.js +10 -0
- data/core/admin/assets/js/vendor/codemirror/mode/javascript/typescript.html +61 -0
- data/core/admin/assets/js/vendor/codemirror/mode/jinja2/index.html +50 -0
- data/core/admin/assets/js/vendor/codemirror/mode/jinja2/jinja2.js +42 -0
- data/core/admin/assets/js/vendor/codemirror/mode/less/index.html +753 -0
- data/core/admin/assets/js/vendor/codemirror/mode/less/less.js +344 -0
- data/core/admin/assets/js/vendor/codemirror/mode/livescript/index.html +459 -0
- data/core/admin/assets/js/vendor/codemirror/mode/livescript/livescript.js +267 -0
- data/core/admin/assets/js/vendor/codemirror/mode/livescript/livescript.ls +266 -0
- data/core/admin/assets/js/vendor/codemirror/mode/lua/index.html +86 -0
- data/core/admin/assets/js/vendor/codemirror/mode/lua/lua.js +144 -0
- data/core/admin/assets/js/vendor/codemirror/mode/markdown/index.html +359 -0
- data/core/admin/assets/js/vendor/codemirror/mode/markdown/markdown.js +551 -0
- data/core/admin/assets/js/vendor/codemirror/mode/markdown/test.js +656 -0
- data/core/admin/assets/js/vendor/codemirror/mode/meta.js +89 -0
- data/core/admin/assets/js/vendor/codemirror/mode/mirc/index.html +161 -0
- data/core/admin/assets/js/vendor/codemirror/mode/mirc/mirc.js +177 -0
- data/core/admin/assets/js/vendor/codemirror/mode/nginx/index.html +181 -0
- data/core/admin/assets/js/vendor/codemirror/mode/nginx/nginx.js +163 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ntriples/index.html +45 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ntriples/ntriples.js +170 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ocaml/index.html +146 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ocaml/ocaml.js +116 -0
- data/core/admin/assets/js/vendor/codemirror/mode/octave/index.html +95 -0
- data/core/admin/assets/js/vendor/codemirror/mode/octave/octave.js +118 -0
- data/core/admin/assets/js/vendor/codemirror/mode/pascal/index.html +61 -0
- data/core/admin/assets/js/vendor/codemirror/mode/pascal/pascal.js +94 -0
- data/core/admin/assets/js/vendor/codemirror/mode/perl/index.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/mode/perl/perl.js +816 -0
- data/core/admin/assets/js/vendor/codemirror/mode/php/index.html +62 -0
- data/core/admin/assets/js/vendor/codemirror/mode/php/php.js +132 -0
- data/core/admin/assets/js/vendor/codemirror/mode/pig/index.html +55 -0
- data/core/admin/assets/js/vendor/codemirror/mode/pig/pig.js +171 -0
- data/core/admin/assets/js/vendor/codemirror/mode/properties/index.html +53 -0
- data/core/admin/assets/js/vendor/codemirror/mode/properties/properties.js +63 -0
- data/core/admin/assets/js/vendor/codemirror/mode/python/index.html +187 -0
- data/core/admin/assets/js/vendor/codemirror/mode/python/python.js +368 -0
- data/core/admin/assets/js/vendor/codemirror/mode/q/index.html +144 -0
- data/core/admin/assets/js/vendor/codemirror/mode/q/q.js +124 -0
- data/core/admin/assets/js/vendor/codemirror/mode/r/index.html +86 -0
- data/core/admin/assets/js/vendor/codemirror/mode/r/r.js +141 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rpm/changes/changes.js +19 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rpm/changes/index.html +67 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/index.html +114 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/spec.css +5 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/spec.js +66 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rst/index.html +534 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rst/rst.js +560 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ruby/index.html +185 -0
- data/core/admin/assets/js/vendor/codemirror/mode/ruby/ruby.js +247 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rust/index.html +61 -0
- data/core/admin/assets/js/vendor/codemirror/mode/rust/rust.js +436 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sass/index.html +66 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sass/sass.js +330 -0
- data/core/admin/assets/js/vendor/codemirror/mode/scheme/index.html +77 -0
- data/core/admin/assets/js/vendor/codemirror/mode/scheme/scheme.js +232 -0
- data/core/admin/assets/js/vendor/codemirror/mode/shell/index.html +66 -0
- data/core/admin/assets/js/vendor/codemirror/mode/shell/shell.js +118 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sieve/index.html +93 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sieve/sieve.js +183 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smalltalk/index.html +68 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smalltalk/smalltalk.js +151 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smarty/index.html +136 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smarty/smarty.js +205 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smartymixed/index.html +114 -0
- data/core/admin/assets/js/vendor/codemirror/mode/smartymixed/smartymixed.js +175 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sparql/index.html +54 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sparql/sparql.js +145 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sql/index.html +75 -0
- data/core/admin/assets/js/vendor/codemirror/mode/sql/sql.js +365 -0
- data/core/admin/assets/js/vendor/codemirror/mode/stex/index.html +110 -0
- data/core/admin/assets/js/vendor/codemirror/mode/stex/stex.js +246 -0
- data/core/admin/assets/js/vendor/codemirror/mode/stex/test.js +120 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tcl/index.html +143 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tcl/tcl.js +131 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/index.html +155 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiki/index.html +95 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiki/tiki.css +26 -0
- data/core/admin/assets/js/vendor/codemirror/mode/tiki/tiki.js +308 -0
- data/core/admin/assets/js/vendor/codemirror/mode/toml/index.html +73 -0
- data/core/admin/assets/js/vendor/codemirror/mode/toml/toml.js +71 -0
- data/core/admin/assets/js/vendor/codemirror/mode/turtle/index.html +51 -0
- data/core/admin/assets/js/vendor/codemirror/mode/turtle/turtle.js +145 -0
- data/core/admin/assets/js/vendor/codemirror/mode/vb/index.html +103 -0
- data/core/admin/assets/js/vendor/codemirror/mode/vb/vb.js +259 -0
- data/core/admin/assets/js/vendor/codemirror/mode/vbscript/index.html +55 -0
- data/core/admin/assets/js/vendor/codemirror/mode/vbscript/vbscript.js +334 -0
- data/core/admin/assets/js/vendor/codemirror/mode/velocity/index.html +119 -0
- data/core/admin/assets/js/vendor/codemirror/mode/velocity/velocity.js +186 -0
- data/core/admin/assets/js/vendor/codemirror/mode/verilog/index.html +132 -0
- data/core/admin/assets/js/vendor/codemirror/mode/verilog/verilog.js +182 -0
- data/core/admin/assets/js/vendor/codemirror/mode/xml/index.html +57 -0
- data/core/admin/assets/js/vendor/codemirror/mode/xml/xml.js +345 -0
- data/core/admin/assets/js/vendor/codemirror/mode/xquery/index.html +210 -0
- data/core/admin/assets/js/vendor/codemirror/mode/xquery/test.js +64 -0
- data/core/admin/assets/js/vendor/codemirror/mode/xquery/xquery.js +432 -0
- data/core/admin/assets/js/vendor/codemirror/mode/yaml/index.html +80 -0
- data/core/admin/assets/js/vendor/codemirror/mode/yaml/yaml.js +97 -0
- data/core/admin/assets/js/vendor/codemirror/mode/z80/index.html +52 -0
- data/core/admin/assets/js/vendor/codemirror/mode/z80/z80.js +85 -0
- data/core/admin/assets/js/vendor/codemirror/package.json +19 -0
- data/core/admin/assets/js/vendor/codemirror/test/comment_test.js +51 -0
- data/core/admin/assets/js/vendor/codemirror/test/doc_test.js +329 -0
- data/core/admin/assets/js/vendor/codemirror/test/driver.js +139 -0
- data/core/admin/assets/js/vendor/codemirror/test/emacs_test.js +135 -0
- data/core/admin/assets/js/vendor/codemirror/test/index.html +209 -0
- data/core/admin/assets/js/vendor/codemirror/test/lint/acorn.js +1593 -0
- data/core/admin/assets/js/vendor/codemirror/test/lint/lint.js +139 -0
- data/core/admin/assets/js/vendor/codemirror/test/lint/walk.js +216 -0
- data/core/admin/assets/js/vendor/codemirror/test/mode_test.css +10 -0
- data/core/admin/assets/js/vendor/codemirror/test/mode_test.js +200 -0
- data/core/admin/assets/js/vendor/codemirror/test/phantom_driver.js +31 -0
- data/core/admin/assets/js/vendor/codemirror/test/run.js +34 -0
- data/core/admin/assets/js/vendor/codemirror/test/test.js +1562 -0
- data/core/admin/assets/js/vendor/codemirror/test/vim_test.js +2391 -0
- data/core/admin/assets/js/vendor/codemirror/theme/3024-day.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/3024-night.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/ambiance-mobile.css +5 -0
- data/core/admin/assets/js/vendor/codemirror/theme/ambiance.css +75 -0
- data/core/admin/assets/js/vendor/codemirror/theme/base16-dark.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/base16-light.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/blackboard.css +28 -0
- data/core/admin/assets/js/vendor/codemirror/theme/cobalt.css +21 -0
- data/core/admin/assets/js/vendor/codemirror/theme/eclipse.css +23 -0
- data/core/admin/assets/js/vendor/codemirror/theme/elegant.css +13 -0
- data/core/admin/assets/js/vendor/codemirror/theme/erlang-dark.css +30 -0
- data/core/admin/assets/js/vendor/codemirror/theme/lesser-dark.css +47 -0
- data/core/admin/assets/js/vendor/codemirror/theme/mbo.css +35 -0
- data/core/admin/assets/js/vendor/codemirror/theme/midnight.css +43 -0
- data/core/admin/assets/js/vendor/codemirror/theme/monokai.css +29 -0
- data/core/admin/assets/js/vendor/codemirror/theme/neat.css +12 -0
- data/core/admin/assets/js/vendor/codemirror/theme/night.css +24 -0
- data/core/admin/assets/js/vendor/codemirror/theme/paraiso-dark.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/paraiso-light.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/rubyblue.css +23 -0
- data/core/admin/assets/js/vendor/codemirror/theme/solarized-mod.css +181 -0
- data/core/admin/assets/js/vendor/codemirror/theme/solarized.css +180 -0
- data/core/admin/assets/js/vendor/codemirror/theme/the-matrix.css +26 -0
- data/core/admin/assets/js/vendor/codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/core/admin/assets/js/vendor/codemirror/theme/twilight.css +28 -0
- data/core/admin/assets/js/vendor/codemirror/theme/vibrant-ink.css +30 -0
- data/core/admin/assets/js/vendor/codemirror/theme/xq-dark.css +49 -0
- data/core/admin/assets/js/vendor/codemirror/theme/xq-light.css +43 -0
- data/core/admin/assets/js/vendor/fastclick.js +777 -0
- data/core/admin/assets/js/vendor/jquery.js +6 -0
- data/core/admin/assets/js/vendor/lodash.underscore.js +38 -0
- data/core/admin/assets/js/vendor/require.js +36 -0
- data/core/admin/assets/scss/bootstrap.scss +18 -0
- data/core/admin/assets/scss/modules/_all.scss +7 -0
- data/core/admin/assets/scss/modules/_colors.scss +7 -0
- data/core/admin/assets/scss/modules/_extensions.scss +24 -0
- data/core/admin/assets/scss/modules/_mixins.scss +18 -0
- data/core/admin/assets/scss/modules/_susy.scss +7 -0
- data/core/admin/assets/scss/partials/_base.scss +33 -0
- data/core/admin/assets/scss/partials/_buttons.scss +9 -0
- data/core/admin/assets/scss/partials/_links.scss +15 -0
- data/core/admin/assets/scss/partials/_main.scss +14 -0
- data/core/admin/assets/scss/partials/_typography.scss +15 -0
- data/core/admin/assets/scss/sections/_editor.scss +274 -0
- data/core/admin/assets/scss/sections/_login.scss +34 -0
- data/core/admin/assets/scss/vendor/_normalize.scss +406 -0
- data/core/admin/layouts/admin.haml +67 -0
- data/core/admin/partials/_head.haml +23 -0
- data/core/admin/partials/_tree.haml +3 -0
- data/core/admin/partials/_treeitem.haml +4 -0
- data/core/admin/settings.yml +4 -0
- data/core/app.rb +21 -0
- data/core/classes/cached.rb +35 -0
- data/core/classes/checker.rb +37 -0
- data/core/classes/commit.rb +62 -0
- data/core/classes/error.rb +9 -0
- data/core/classes/page.rb +165 -0
- data/core/classes/partial.rb +13 -0
- data/core/classes/path.rb +30 -0
- data/core/classes/persona.rb +55 -0
- data/core/classes/sassfile.rb +95 -0
- data/core/classes/settings.rb +19 -0
- data/core/classes/theme.rb +55 -0
- data/core/helpers/base.rb +46 -0
- data/core/helpers/render.rb +26 -0
- data/core/helpers/truncate.rb +17 -0
- data/core/routes/admin.rb +139 -0
- data/core/routes/assetcompiler.rb +23 -0
- data/core/routes/base.rb +22 -0
- data/core/routes/bootstrap.rb +35 -0
- data/core/routes/cache.rb +52 -0
- data/core/routes/deploy.rb +16 -0
- data/core/routes/git.rb +23 -0
- data/poly.gemspec +29 -0
- data/sample/.cabi-data +0 -0
- data/sample/data/home/index.haml +22 -0
- data/sample/data/other/nav/links.yml +4 -0
- data/sample/data/page/about/index.haml +12 -0
- data/sample/data/page/contact-us/index.haml +11 -0
- data/sample/data/page/dynamic-page/index.haml +14 -0
- data/sample/data/page/error/index.haml +8 -0
- data/sample/data/page/html/index.html +4 -0
- data/sample/data/page/no-front-matter/index.haml +7 -0
- data/sample/data/page/not-found/index.haml +8 -0
- data/sample/data/page/static-page/index.haml +14 -0
- data/sample/data/post/about-life/index.md +12 -0
- data/sample/data/post/sample-post/index.haml +12 -0
- data/sample/data/post/technology/index.haml +12 -0
- data/sample/data/post/the-40-hour-workweek/index.haml +9 -0
- data/sample/data/post/things-are-changing/index.haml +9 -0
- data/sample/data/post/yet-another-post/index.haml +11 -0
- data/sample/plugins/my-plugin/plugin.rb +15 -0
- data/sample/settings.yml +21 -0
- data/sample/themes/base/assets/css/readme.txt +6 -0
- data/sample/themes/base/assets/images/poly.svg +36 -0
- data/sample/themes/base/assets/js/app/views/main.js +13 -0
- data/sample/themes/base/assets/js/main.js +31 -0
- data/sample/themes/base/assets/js/vendor/backbone.js +4 -0
- data/sample/themes/base/assets/js/vendor/jquery.js +6 -0
- data/sample/themes/base/assets/js/vendor/lodash.underscore.js +38 -0
- data/sample/themes/base/assets/js/vendor/require.js +36 -0
- data/sample/themes/base/assets/scss/bootstrap.scss +20 -0
- data/sample/themes/base/assets/scss/modules/_all.scss +7 -0
- data/sample/themes/base/assets/scss/modules/_colors.scss +7 -0
- data/sample/themes/base/assets/scss/modules/_extensions.scss +13 -0
- data/sample/themes/base/assets/scss/modules/_mixins.scss +11 -0
- data/sample/themes/base/assets/scss/modules/_susy.scss +7 -0
- data/sample/themes/base/assets/scss/partials/_base.scss +33 -0
- data/sample/themes/base/assets/scss/partials/_buttons.scss +0 -0
- data/sample/themes/base/assets/scss/partials/_links.scss +15 -0
- data/sample/themes/base/assets/scss/partials/_main.scss +39 -0
- data/sample/themes/base/assets/scss/partials/_typography.scss +15 -0
- data/sample/themes/base/assets/scss/sections/_footer.scss +22 -0
- data/sample/themes/base/assets/scss/sections/_header.scss +23 -0
- data/sample/themes/base/assets/scss/sections/_home.scss +13 -0
- data/sample/themes/base/assets/scss/sections/_pages.scss +11 -0
- data/sample/themes/base/assets/scss/vendor/_normalize.scss +406 -0
- data/sample/themes/base/layouts/default.haml +14 -0
- data/sample/themes/base/layouts/post.haml +15 -0
- data/sample/themes/base/partials/_footer.haml +9 -0
- data/sample/themes/base/partials/_ga.haml +10 -0
- data/sample/themes/base/partials/_head.haml +20 -0
- data/sample/themes/base/partials/_header.haml +5 -0
- data/sample/themes/base/settings.yml +4 -0
- data/test/data/post-receive-hook.json +146 -0
- data/test/test_basics.rb +50 -0
- data/test/test_data.rb +14 -0
- data/test/test_deploy.rb +23 -0
- data/test/test_includes.rb +43 -0
- data/test/test_page.rb +47 -0
- metadata +1049 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
CodeMirror.defineMode("changes", function() {
|
2
|
+
var headerSeperator = /^-+$/;
|
3
|
+
var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /;
|
4
|
+
var simpleEmail = /^[\w+.-]+@[\w.-]+/;
|
5
|
+
|
6
|
+
return {
|
7
|
+
token: function(stream) {
|
8
|
+
if (stream.sol()) {
|
9
|
+
if (stream.match(headerSeperator)) { return 'tag'; }
|
10
|
+
if (stream.match(headerLine)) { return 'tag'; }
|
11
|
+
}
|
12
|
+
if (stream.match(simpleEmail)) { return 'string'; }
|
13
|
+
stream.next();
|
14
|
+
return null;
|
15
|
+
}
|
16
|
+
};
|
17
|
+
});
|
18
|
+
|
19
|
+
CodeMirror.defineMIME("text/x-rpm-changes", "changes");
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: RPM changes mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../../lib/codemirror.css">
|
8
|
+
<script src="../../../lib/codemirror.js"></script>
|
9
|
+
<script src="changes.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
|
+
|
13
|
+
<div id=nav>
|
14
|
+
<a href="http://codemirror.net"><img id=logo src="../../../doc/logo.png"></a>
|
15
|
+
|
16
|
+
<ul>
|
17
|
+
<li><a href="../../../index.html">Home</a>
|
18
|
+
<li><a href="../../../doc/manual.html">Manual</a>
|
19
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
20
|
+
</ul>
|
21
|
+
<ul>
|
22
|
+
<li><a href="../../index.html">Language modes</a>
|
23
|
+
<li><a class=active href="#">RPM changes</a>
|
24
|
+
</ul>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<article>
|
28
|
+
<h2>RPM changes mode</h2>
|
29
|
+
|
30
|
+
<div><textarea id="code" name="code">
|
31
|
+
-------------------------------------------------------------------
|
32
|
+
Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com
|
33
|
+
|
34
|
+
- Update to r60.3
|
35
|
+
- Fixes bug in the reflect package
|
36
|
+
* disallow Interface method on Value obtained via unexported name
|
37
|
+
|
38
|
+
-------------------------------------------------------------------
|
39
|
+
Thu Oct 6 08:14:24 UTC 2011 - misterx@example.com
|
40
|
+
|
41
|
+
- Update to r60.2
|
42
|
+
- Fixes memory leak in certain map types
|
43
|
+
|
44
|
+
-------------------------------------------------------------------
|
45
|
+
Wed Oct 5 14:34:10 UTC 2011 - misterx@example.com
|
46
|
+
|
47
|
+
- Tweaks for gdb debugging
|
48
|
+
- go.spec changes:
|
49
|
+
- move %go_arch definition to %prep section
|
50
|
+
- pass correct location of go specific gdb pretty printer and
|
51
|
+
functions to cpp as HOST_EXTRA_CFLAGS macro
|
52
|
+
- install go gdb functions & printer
|
53
|
+
- gdb-printer.patch
|
54
|
+
- patch linker (src/cmd/ld/dwarf.c) to emit correct location of go
|
55
|
+
gdb functions and pretty printer
|
56
|
+
</textarea></div>
|
57
|
+
<script>
|
58
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
59
|
+
mode: {name: "changes"},
|
60
|
+
lineNumbers: true,
|
61
|
+
indentUnit: 4,
|
62
|
+
tabMode: "shift"
|
63
|
+
});
|
64
|
+
</script>
|
65
|
+
|
66
|
+
<p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>
|
67
|
+
</article>
|
@@ -0,0 +1,114 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: RPM spec mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../../lib/codemirror.css">
|
8
|
+
<script src="../../../lib/codemirror.js"></script>
|
9
|
+
<script src="spec.js"></script>
|
10
|
+
<link rel="stylesheet" href="spec.css">
|
11
|
+
<link rel="stylesheet" href="../../../doc/docs.css">
|
12
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
13
|
+
|
14
|
+
<div id=nav>
|
15
|
+
<a href="http://codemirror.net"><img id=logo src="../../../doc/logo.png"></a>
|
16
|
+
|
17
|
+
<ul>
|
18
|
+
<li><a href="../../../index.html">Home</a>
|
19
|
+
<li><a href="../../../doc/manual.html">Manual</a>
|
20
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
21
|
+
</ul>
|
22
|
+
<ul>
|
23
|
+
<li><a href="../../index.html">Language modes</a>
|
24
|
+
<li><a class=active href="#">RPM spec</a>
|
25
|
+
</ul>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<article>
|
29
|
+
<h2>RPM spec mode</h2>
|
30
|
+
|
31
|
+
<div><textarea id="code" name="code">
|
32
|
+
#
|
33
|
+
# spec file for package minidlna
|
34
|
+
#
|
35
|
+
# Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
|
36
|
+
#
|
37
|
+
# All modifications and additions to the file contributed by third parties
|
38
|
+
# remain the property of their copyright owners, unless otherwise agreed
|
39
|
+
# upon. The license for this file, and modifications and additions to the
|
40
|
+
# file, is the same license as for the pristine package itself (unless the
|
41
|
+
# license for the pristine package is not an Open Source License, in which
|
42
|
+
# case the license is the MIT License). An "Open Source License" is a
|
43
|
+
# license that conforms to the Open Source Definition (Version 1.9)
|
44
|
+
# published by the Open Source Initiative.
|
45
|
+
|
46
|
+
|
47
|
+
Name: libupnp6
|
48
|
+
Version: 1.6.13
|
49
|
+
Release: 0
|
50
|
+
Summary: Portable Universal Plug and Play (UPnP) SDK
|
51
|
+
Group: System/Libraries
|
52
|
+
License: BSD-3-Clause
|
53
|
+
Url: http://sourceforge.net/projects/pupnp/
|
54
|
+
Source0: http://downloads.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2
|
55
|
+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
56
|
+
|
57
|
+
%description
|
58
|
+
The portable Universal Plug and Play (UPnP) SDK provides support for building
|
59
|
+
UPnP-compliant control points, devices, and bridges on several operating
|
60
|
+
systems.
|
61
|
+
|
62
|
+
%package -n libupnp-devel
|
63
|
+
Summary: Portable Universal Plug and Play (UPnP) SDK
|
64
|
+
Group: Development/Libraries/C and C++
|
65
|
+
Provides: pkgconfig(libupnp)
|
66
|
+
Requires: %{name} = %{version}
|
67
|
+
|
68
|
+
%description -n libupnp-devel
|
69
|
+
The portable Universal Plug and Play (UPnP) SDK provides support for building
|
70
|
+
UPnP-compliant control points, devices, and bridges on several operating
|
71
|
+
systems.
|
72
|
+
|
73
|
+
%prep
|
74
|
+
%setup -n libupnp-%{version}
|
75
|
+
|
76
|
+
%build
|
77
|
+
%configure --disable-static
|
78
|
+
make %{?_smp_mflags}
|
79
|
+
|
80
|
+
%install
|
81
|
+
%makeinstall
|
82
|
+
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
|
83
|
+
|
84
|
+
%post -p /sbin/ldconfig
|
85
|
+
|
86
|
+
%postun -p /sbin/ldconfig
|
87
|
+
|
88
|
+
%files
|
89
|
+
%defattr(-,root,root,-)
|
90
|
+
%doc ChangeLog NEWS README TODO
|
91
|
+
%{_libdir}/libixml.so.*
|
92
|
+
%{_libdir}/libthreadutil.so.*
|
93
|
+
%{_libdir}/libupnp.so.*
|
94
|
+
|
95
|
+
%files -n libupnp-devel
|
96
|
+
%defattr(-,root,root,-)
|
97
|
+
%{_libdir}/pkgconfig/libupnp.pc
|
98
|
+
%{_libdir}/libixml.so
|
99
|
+
%{_libdir}/libthreadutil.so
|
100
|
+
%{_libdir}/libupnp.so
|
101
|
+
%{_includedir}/upnp/
|
102
|
+
|
103
|
+
%changelog</textarea></div>
|
104
|
+
<script>
|
105
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
106
|
+
mode: {name: "spec"},
|
107
|
+
lineNumbers: true,
|
108
|
+
indentUnit: 4
|
109
|
+
});
|
110
|
+
</script>
|
111
|
+
|
112
|
+
<p><strong>MIME types defined:</strong> <code>text/x-rpm-spec</code>.</p>
|
113
|
+
|
114
|
+
</article>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
.cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;}
|
2
|
+
.cm-s-default span.cm-macro {color: #b218b2;}
|
3
|
+
.cm-s-default span.cm-section {color: green; font-weight: bold;}
|
4
|
+
.cm-s-default span.cm-script {color: red;}
|
5
|
+
.cm-s-default span.cm-issue {color: yellow;}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
// Quick and dirty spec file highlighting
|
2
|
+
|
3
|
+
CodeMirror.defineMode("spec", function() {
|
4
|
+
var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;
|
5
|
+
|
6
|
+
var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/;
|
7
|
+
var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/;
|
8
|
+
var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros
|
9
|
+
var control_flow_simple = /^%(else|endif)/; // rpm control flow macros
|
10
|
+
var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros
|
11
|
+
|
12
|
+
return {
|
13
|
+
startState: function () {
|
14
|
+
return {
|
15
|
+
controlFlow: false,
|
16
|
+
macroParameters: false,
|
17
|
+
section: false
|
18
|
+
};
|
19
|
+
},
|
20
|
+
token: function (stream, state) {
|
21
|
+
var ch = stream.peek();
|
22
|
+
if (ch == "#") { stream.skipToEnd(); return "comment"; }
|
23
|
+
|
24
|
+
if (stream.sol()) {
|
25
|
+
if (stream.match(preamble)) { return "preamble"; }
|
26
|
+
if (stream.match(section)) { return "section"; }
|
27
|
+
}
|
28
|
+
|
29
|
+
if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT'
|
30
|
+
if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}'
|
31
|
+
|
32
|
+
if (stream.match(control_flow_simple)) { return "keyword"; }
|
33
|
+
if (stream.match(control_flow_complex)) {
|
34
|
+
state.controlFlow = true;
|
35
|
+
return "keyword";
|
36
|
+
}
|
37
|
+
if (state.controlFlow) {
|
38
|
+
if (stream.match(operators)) { return "operator"; }
|
39
|
+
if (stream.match(/^(\d+)/)) { return "number"; }
|
40
|
+
if (stream.eol()) { state.controlFlow = false; }
|
41
|
+
}
|
42
|
+
|
43
|
+
if (stream.match(arch)) { return "number"; }
|
44
|
+
|
45
|
+
// Macros like '%make_install' or '%attr(0775,root,root)'
|
46
|
+
if (stream.match(/^%[\w]+/)) {
|
47
|
+
if (stream.match(/^\(/)) { state.macroParameters = true; }
|
48
|
+
return "macro";
|
49
|
+
}
|
50
|
+
if (state.macroParameters) {
|
51
|
+
if (stream.match(/^\d+/)) { return "number";}
|
52
|
+
if (stream.match(/^\)/)) {
|
53
|
+
state.macroParameters = false;
|
54
|
+
return "macro";
|
55
|
+
}
|
56
|
+
}
|
57
|
+
if (stream.match(/^%\{\??[\w \-]+\}/)) { return "macro"; } // Macros like '%{defined fedora}'
|
58
|
+
|
59
|
+
//TODO: Include bash script sub-parser (CodeMirror supports that)
|
60
|
+
stream.next();
|
61
|
+
return null;
|
62
|
+
}
|
63
|
+
};
|
64
|
+
});
|
65
|
+
|
66
|
+
CodeMirror.defineMIME("text/x-rpm-spec", "spec");
|
@@ -0,0 +1,534 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: reStructuredText mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="rst.js"></script>
|
10
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
11
|
+
<div id=nav>
|
12
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
13
|
+
|
14
|
+
<ul>
|
15
|
+
<li><a href="../../index.html">Home</a>
|
16
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
17
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
18
|
+
</ul>
|
19
|
+
<ul>
|
20
|
+
<li><a href="../index.html">Language modes</a>
|
21
|
+
<li><a class=active href="#">reStructuredText</a>
|
22
|
+
</ul>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<article>
|
26
|
+
<h2>reStructuredText mode</h2>
|
27
|
+
<form><textarea id="code" name="code">
|
28
|
+
.. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt
|
29
|
+
|
30
|
+
.. highlightlang:: rest
|
31
|
+
|
32
|
+
.. _rst-primer:
|
33
|
+
|
34
|
+
reStructuredText Primer
|
35
|
+
=======================
|
36
|
+
|
37
|
+
This section is a brief introduction to reStructuredText (reST) concepts and
|
38
|
+
syntax, intended to provide authors with enough information to author documents
|
39
|
+
productively. Since reST was designed to be a simple, unobtrusive markup
|
40
|
+
language, this will not take too long.
|
41
|
+
|
42
|
+
.. seealso::
|
43
|
+
|
44
|
+
The authoritative `reStructuredText User Documentation
|
45
|
+
<http://docutils.sourceforge.net/rst.html>`_. The "ref" links in this
|
46
|
+
document link to the description of the individual constructs in the reST
|
47
|
+
reference.
|
48
|
+
|
49
|
+
|
50
|
+
Paragraphs
|
51
|
+
----------
|
52
|
+
|
53
|
+
The paragraph (:duref:`ref <paragraphs>`) is the most basic block in a reST
|
54
|
+
document. Paragraphs are simply chunks of text separated by one or more blank
|
55
|
+
lines. As in Python, indentation is significant in reST, so all lines of the
|
56
|
+
same paragraph must be left-aligned to the same level of indentation.
|
57
|
+
|
58
|
+
|
59
|
+
.. _inlinemarkup:
|
60
|
+
|
61
|
+
Inline markup
|
62
|
+
-------------
|
63
|
+
|
64
|
+
The standard reST inline markup is quite simple: use
|
65
|
+
|
66
|
+
* one asterisk: ``*text*`` for emphasis (italics),
|
67
|
+
* two asterisks: ``**text**`` for strong emphasis (boldface), and
|
68
|
+
* backquotes: ````text```` for code samples.
|
69
|
+
|
70
|
+
If asterisks or backquotes appear in running text and could be confused with
|
71
|
+
inline markup delimiters, they have to be escaped with a backslash.
|
72
|
+
|
73
|
+
Be aware of some restrictions of this markup:
|
74
|
+
|
75
|
+
* it may not be nested,
|
76
|
+
* content may not start or end with whitespace: ``* text*`` is wrong,
|
77
|
+
* it must be separated from surrounding text by non-word characters. Use a
|
78
|
+
backslash escaped space to work around that: ``thisis\ *one*\ word``.
|
79
|
+
|
80
|
+
These restrictions may be lifted in future versions of the docutils.
|
81
|
+
|
82
|
+
reST also allows for custom "interpreted text roles"', which signify that the
|
83
|
+
enclosed text should be interpreted in a specific way. Sphinx uses this to
|
84
|
+
provide semantic markup and cross-referencing of identifiers, as described in
|
85
|
+
the appropriate section. The general syntax is ``:rolename:`content```.
|
86
|
+
|
87
|
+
Standard reST provides the following roles:
|
88
|
+
|
89
|
+
* :durole:`emphasis` -- alternate spelling for ``*emphasis*``
|
90
|
+
* :durole:`strong` -- alternate spelling for ``**strong**``
|
91
|
+
* :durole:`literal` -- alternate spelling for ````literal````
|
92
|
+
* :durole:`subscript` -- subscript text
|
93
|
+
* :durole:`superscript` -- superscript text
|
94
|
+
* :durole:`title-reference` -- for titles of books, periodicals, and other
|
95
|
+
materials
|
96
|
+
|
97
|
+
See :ref:`inline-markup` for roles added by Sphinx.
|
98
|
+
|
99
|
+
|
100
|
+
Lists and Quote-like blocks
|
101
|
+
---------------------------
|
102
|
+
|
103
|
+
List markup (:duref:`ref <bullet-lists>`) is natural: just place an asterisk at
|
104
|
+
the start of a paragraph and indent properly. The same goes for numbered lists;
|
105
|
+
they can also be autonumbered using a ``#`` sign::
|
106
|
+
|
107
|
+
* This is a bulleted list.
|
108
|
+
* It has two items, the second
|
109
|
+
item uses two lines.
|
110
|
+
|
111
|
+
1. This is a numbered list.
|
112
|
+
2. It has two items too.
|
113
|
+
|
114
|
+
#. This is a numbered list.
|
115
|
+
#. It has two items too.
|
116
|
+
|
117
|
+
|
118
|
+
Nested lists are possible, but be aware that they must be separated from the
|
119
|
+
parent list items by blank lines::
|
120
|
+
|
121
|
+
* this is
|
122
|
+
* a list
|
123
|
+
|
124
|
+
* with a nested list
|
125
|
+
* and some subitems
|
126
|
+
|
127
|
+
* and here the parent list continues
|
128
|
+
|
129
|
+
Definition lists (:duref:`ref <definition-lists>`) are created as follows::
|
130
|
+
|
131
|
+
term (up to a line of text)
|
132
|
+
Definition of the term, which must be indented
|
133
|
+
|
134
|
+
and can even consist of multiple paragraphs
|
135
|
+
|
136
|
+
next term
|
137
|
+
Description.
|
138
|
+
|
139
|
+
Note that the term cannot have more than one line of text.
|
140
|
+
|
141
|
+
Quoted paragraphs (:duref:`ref <block-quotes>`) are created by just indenting
|
142
|
+
them more than the surrounding paragraphs.
|
143
|
+
|
144
|
+
Line blocks (:duref:`ref <line-blocks>`) are a way of preserving line breaks::
|
145
|
+
|
146
|
+
| These lines are
|
147
|
+
| broken exactly like in
|
148
|
+
| the source file.
|
149
|
+
|
150
|
+
There are also several more special blocks available:
|
151
|
+
|
152
|
+
* field lists (:duref:`ref <field-lists>`)
|
153
|
+
* option lists (:duref:`ref <option-lists>`)
|
154
|
+
* quoted literal blocks (:duref:`ref <quoted-literal-blocks>`)
|
155
|
+
* doctest blocks (:duref:`ref <doctest-blocks>`)
|
156
|
+
|
157
|
+
|
158
|
+
Source Code
|
159
|
+
-----------
|
160
|
+
|
161
|
+
Literal code blocks (:duref:`ref <literal-blocks>`) are introduced by ending a
|
162
|
+
paragraph with the special marker ``::``. The literal block must be indented
|
163
|
+
(and, like all paragraphs, separated from the surrounding ones by blank lines)::
|
164
|
+
|
165
|
+
This is a normal text paragraph. The next paragraph is a code sample::
|
166
|
+
|
167
|
+
It is not processed in any way, except
|
168
|
+
that the indentation is removed.
|
169
|
+
|
170
|
+
It can span multiple lines.
|
171
|
+
|
172
|
+
This is a normal text paragraph again.
|
173
|
+
|
174
|
+
The handling of the ``::`` marker is smart:
|
175
|
+
|
176
|
+
* If it occurs as a paragraph of its own, that paragraph is completely left
|
177
|
+
out of the document.
|
178
|
+
* If it is preceded by whitespace, the marker is removed.
|
179
|
+
* If it is preceded by non-whitespace, the marker is replaced by a single
|
180
|
+
colon.
|
181
|
+
|
182
|
+
That way, the second sentence in the above example's first paragraph would be
|
183
|
+
rendered as "The next paragraph is a code sample:".
|
184
|
+
|
185
|
+
|
186
|
+
.. _rst-tables:
|
187
|
+
|
188
|
+
Tables
|
189
|
+
------
|
190
|
+
|
191
|
+
Two forms of tables are supported. For *grid tables* (:duref:`ref
|
192
|
+
<grid-tables>`), you have to "paint" the cell grid yourself. They look like
|
193
|
+
this::
|
194
|
+
|
195
|
+
+------------------------+------------+----------+----------+
|
196
|
+
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
|
197
|
+
| (header rows optional) | | | |
|
198
|
+
+========================+============+==========+==========+
|
199
|
+
| body row 1, column 1 | column 2 | column 3 | column 4 |
|
200
|
+
+------------------------+------------+----------+----------+
|
201
|
+
| body row 2 | ... | ... | |
|
202
|
+
+------------------------+------------+----------+----------+
|
203
|
+
|
204
|
+
*Simple tables* (:duref:`ref <simple-tables>`) are easier to write, but
|
205
|
+
limited: they must contain more than one row, and the first column cannot
|
206
|
+
contain multiple lines. They look like this::
|
207
|
+
|
208
|
+
===== ===== =======
|
209
|
+
A B A and B
|
210
|
+
===== ===== =======
|
211
|
+
False False False
|
212
|
+
True False False
|
213
|
+
False True False
|
214
|
+
True True True
|
215
|
+
===== ===== =======
|
216
|
+
|
217
|
+
|
218
|
+
Hyperlinks
|
219
|
+
----------
|
220
|
+
|
221
|
+
External links
|
222
|
+
^^^^^^^^^^^^^^
|
223
|
+
|
224
|
+
Use ```Link text <http://example.com/>`_`` for inline web links. If the link
|
225
|
+
text should be the web address, you don't need special markup at all, the parser
|
226
|
+
finds links and mail addresses in ordinary text.
|
227
|
+
|
228
|
+
You can also separate the link and the target definition (:duref:`ref
|
229
|
+
<hyperlink-targets>`), like this::
|
230
|
+
|
231
|
+
This is a paragraph that contains `a link`_.
|
232
|
+
|
233
|
+
.. _a link: http://example.com/
|
234
|
+
|
235
|
+
|
236
|
+
Internal links
|
237
|
+
^^^^^^^^^^^^^^
|
238
|
+
|
239
|
+
Internal linking is done via a special reST role provided by Sphinx, see the
|
240
|
+
section on specific markup, :ref:`ref-role`.
|
241
|
+
|
242
|
+
|
243
|
+
Sections
|
244
|
+
--------
|
245
|
+
|
246
|
+
Section headers (:duref:`ref <sections>`) are created by underlining (and
|
247
|
+
optionally overlining) the section title with a punctuation character, at least
|
248
|
+
as long as the text::
|
249
|
+
|
250
|
+
=================
|
251
|
+
This is a heading
|
252
|
+
=================
|
253
|
+
|
254
|
+
Normally, there are no heading levels assigned to certain characters as the
|
255
|
+
structure is determined from the succession of headings. However, for the
|
256
|
+
Python documentation, this convention is used which you may follow:
|
257
|
+
|
258
|
+
* ``#`` with overline, for parts
|
259
|
+
* ``*`` with overline, for chapters
|
260
|
+
* ``=``, for sections
|
261
|
+
* ``-``, for subsections
|
262
|
+
* ``^``, for subsubsections
|
263
|
+
* ``"``, for paragraphs
|
264
|
+
|
265
|
+
Of course, you are free to use your own marker characters (see the reST
|
266
|
+
documentation), and use a deeper nesting level, but keep in mind that most
|
267
|
+
target formats (HTML, LaTeX) have a limited supported nesting depth.
|
268
|
+
|
269
|
+
|
270
|
+
Explicit Markup
|
271
|
+
---------------
|
272
|
+
|
273
|
+
"Explicit markup" (:duref:`ref <explicit-markup-blocks>`) is used in reST for
|
274
|
+
most constructs that need special handling, such as footnotes,
|
275
|
+
specially-highlighted paragraphs, comments, and generic directives.
|
276
|
+
|
277
|
+
An explicit markup block begins with a line starting with ``..`` followed by
|
278
|
+
whitespace and is terminated by the next paragraph at the same level of
|
279
|
+
indentation. (There needs to be a blank line between explicit markup and normal
|
280
|
+
paragraphs. This may all sound a bit complicated, but it is intuitive enough
|
281
|
+
when you write it.)
|
282
|
+
|
283
|
+
|
284
|
+
.. _directives:
|
285
|
+
|
286
|
+
Directives
|
287
|
+
----------
|
288
|
+
|
289
|
+
A directive (:duref:`ref <directives>`) is a generic block of explicit markup.
|
290
|
+
Besides roles, it is one of the extension mechanisms of reST, and Sphinx makes
|
291
|
+
heavy use of it.
|
292
|
+
|
293
|
+
Docutils supports the following directives:
|
294
|
+
|
295
|
+
* Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,
|
296
|
+
:dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,
|
297
|
+
:dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.
|
298
|
+
(Most themes style only "note" and "warning" specially.)
|
299
|
+
|
300
|
+
* Images:
|
301
|
+
|
302
|
+
- :dudir:`image` (see also Images_ below)
|
303
|
+
- :dudir:`figure` (an image with caption and optional legend)
|
304
|
+
|
305
|
+
* Additional body elements:
|
306
|
+
|
307
|
+
- :dudir:`contents` (a local, i.e. for the current file only, table of
|
308
|
+
contents)
|
309
|
+
- :dudir:`container` (a container with a custom class, useful to generate an
|
310
|
+
outer ``<div>`` in HTML)
|
311
|
+
- :dudir:`rubric` (a heading without relation to the document sectioning)
|
312
|
+
- :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)
|
313
|
+
- :dudir:`parsed-literal` (literal block that supports inline markup)
|
314
|
+
- :dudir:`epigraph` (a block quote with optional attribution line)
|
315
|
+
- :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own
|
316
|
+
class attribute)
|
317
|
+
- :dudir:`compound` (a compound paragraph)
|
318
|
+
|
319
|
+
* Special tables:
|
320
|
+
|
321
|
+
- :dudir:`table` (a table with title)
|
322
|
+
- :dudir:`csv-table` (a table generated from comma-separated values)
|
323
|
+
- :dudir:`list-table` (a table generated from a list of lists)
|
324
|
+
|
325
|
+
* Special directives:
|
326
|
+
|
327
|
+
- :dudir:`raw` (include raw target-format markup)
|
328
|
+
- :dudir:`include` (include reStructuredText from another file)
|
329
|
+
-- in Sphinx, when given an absolute include file path, this directive takes
|
330
|
+
it as relative to the source directory
|
331
|
+
- :dudir:`class` (assign a class attribute to the next element) [1]_
|
332
|
+
|
333
|
+
* HTML specifics:
|
334
|
+
|
335
|
+
- :dudir:`meta` (generation of HTML ``<meta>`` tags)
|
336
|
+
- :dudir:`title` (override document title)
|
337
|
+
|
338
|
+
* Influencing markup:
|
339
|
+
|
340
|
+
- :dudir:`default-role` (set a new default role)
|
341
|
+
- :dudir:`role` (create a new role)
|
342
|
+
|
343
|
+
Since these are only per-file, better use Sphinx' facilities for setting the
|
344
|
+
:confval:`default_role`.
|
345
|
+
|
346
|
+
Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
|
347
|
+
:dudir:`footer`.
|
348
|
+
|
349
|
+
Directives added by Sphinx are described in :ref:`sphinxmarkup`.
|
350
|
+
|
351
|
+
Basically, a directive consists of a name, arguments, options and content. (Keep
|
352
|
+
this terminology in mind, it is used in the next chapter describing custom
|
353
|
+
directives.) Looking at this example, ::
|
354
|
+
|
355
|
+
.. function:: foo(x)
|
356
|
+
foo(y, z)
|
357
|
+
:module: some.module.name
|
358
|
+
|
359
|
+
Return a line of text input from the user.
|
360
|
+
|
361
|
+
``function`` is the directive name. It is given two arguments here, the
|
362
|
+
remainder of the first line and the second line, as well as one option
|
363
|
+
``module`` (as you can see, options are given in the lines immediately following
|
364
|
+
the arguments and indicated by the colons). Options must be indented to the
|
365
|
+
same level as the directive content.
|
366
|
+
|
367
|
+
The directive content follows after a blank line and is indented relative to the
|
368
|
+
directive start.
|
369
|
+
|
370
|
+
|
371
|
+
Images
|
372
|
+
------
|
373
|
+
|
374
|
+
reST supports an image directive (:dudir:`ref <image>`), used like so::
|
375
|
+
|
376
|
+
.. image:: gnu.png
|
377
|
+
(options)
|
378
|
+
|
379
|
+
When used within Sphinx, the file name given (here ``gnu.png``) must either be
|
380
|
+
relative to the source file, or absolute which means that they are relative to
|
381
|
+
the top source directory. For example, the file ``sketch/spam.rst`` could refer
|
382
|
+
to the image ``images/spam.png`` as ``../images/spam.png`` or
|
383
|
+
``/images/spam.png``.
|
384
|
+
|
385
|
+
Sphinx will automatically copy image files over to a subdirectory of the output
|
386
|
+
directory on building (e.g. the ``_static`` directory for HTML output.)
|
387
|
+
|
388
|
+
Interpretation of image size options (``width`` and ``height``) is as follows:
|
389
|
+
if the size has no unit or the unit is pixels, the given size will only be
|
390
|
+
respected for output channels that support pixels (i.e. not in LaTeX output).
|
391
|
+
Other units (like ``pt`` for points) will be used for HTML and LaTeX output.
|
392
|
+
|
393
|
+
Sphinx extends the standard docutils behavior by allowing an asterisk for the
|
394
|
+
extension::
|
395
|
+
|
396
|
+
.. image:: gnu.*
|
397
|
+
|
398
|
+
Sphinx then searches for all images matching the provided pattern and determines
|
399
|
+
their type. Each builder then chooses the best image out of these candidates.
|
400
|
+
For instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf`
|
401
|
+
and :file:`gnu.png` existed in the source tree, the LaTeX builder would choose
|
402
|
+
the former, while the HTML builder would prefer the latter.
|
403
|
+
|
404
|
+
.. versionchanged:: 0.4
|
405
|
+
Added the support for file names ending in an asterisk.
|
406
|
+
|
407
|
+
.. versionchanged:: 0.6
|
408
|
+
Image paths can now be absolute.
|
409
|
+
|
410
|
+
|
411
|
+
Footnotes
|
412
|
+
---------
|
413
|
+
|
414
|
+
For footnotes (:duref:`ref <footnotes>`), use ``[#name]_`` to mark the footnote
|
415
|
+
location, and add the footnote body at the bottom of the document after a
|
416
|
+
"Footnotes" rubric heading, like so::
|
417
|
+
|
418
|
+
Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_
|
419
|
+
|
420
|
+
.. rubric:: Footnotes
|
421
|
+
|
422
|
+
.. [#f1] Text of the first footnote.
|
423
|
+
.. [#f2] Text of the second footnote.
|
424
|
+
|
425
|
+
You can also explicitly number the footnotes (``[1]_``) or use auto-numbered
|
426
|
+
footnotes without names (``[#]_``).
|
427
|
+
|
428
|
+
|
429
|
+
Citations
|
430
|
+
---------
|
431
|
+
|
432
|
+
Standard reST citations (:duref:`ref <citations>`) are supported, with the
|
433
|
+
additional feature that they are "global", i.e. all citations can be referenced
|
434
|
+
from all files. Use them like so::
|
435
|
+
|
436
|
+
Lorem ipsum [Ref]_ dolor sit amet.
|
437
|
+
|
438
|
+
.. [Ref] Book or article reference, URL or whatever.
|
439
|
+
|
440
|
+
Citation usage is similar to footnote usage, but with a label that is not
|
441
|
+
numeric or begins with ``#``.
|
442
|
+
|
443
|
+
|
444
|
+
Substitutions
|
445
|
+
-------------
|
446
|
+
|
447
|
+
reST supports "substitutions" (:duref:`ref <substitution-definitions>`), which
|
448
|
+
are pieces of text and/or markup referred to in the text by ``|name|``. They
|
449
|
+
are defined like footnotes with explicit markup blocks, like this::
|
450
|
+
|
451
|
+
.. |name| replace:: replacement *text*
|
452
|
+
|
453
|
+
or this::
|
454
|
+
|
455
|
+
.. |caution| image:: warning.png
|
456
|
+
:alt: Warning!
|
457
|
+
|
458
|
+
See the :duref:`reST reference for substitutions <substitution-definitions>`
|
459
|
+
for details.
|
460
|
+
|
461
|
+
If you want to use some substitutions for all documents, put them into
|
462
|
+
:confval:`rst_prolog` or put them into a separate file and include it into all
|
463
|
+
documents you want to use them in, using the :rst:dir:`include` directive. (Be
|
464
|
+
sure to give the include file a file name extension differing from that of other
|
465
|
+
source files, to avoid Sphinx finding it as a standalone document.)
|
466
|
+
|
467
|
+
Sphinx defines some default substitutions, see :ref:`default-substitutions`.
|
468
|
+
|
469
|
+
|
470
|
+
Comments
|
471
|
+
--------
|
472
|
+
|
473
|
+
Every explicit markup block which isn't a valid markup construct (like the
|
474
|
+
footnotes above) is regarded as a comment (:duref:`ref <comments>`). For
|
475
|
+
example::
|
476
|
+
|
477
|
+
.. This is a comment.
|
478
|
+
|
479
|
+
You can indent text after a comment start to form multiline comments::
|
480
|
+
|
481
|
+
..
|
482
|
+
This whole indented block
|
483
|
+
is a comment.
|
484
|
+
|
485
|
+
Still in the comment.
|
486
|
+
|
487
|
+
|
488
|
+
Source encoding
|
489
|
+
---------------
|
490
|
+
|
491
|
+
Since the easiest way to include special characters like em dashes or copyright
|
492
|
+
signs in reST is to directly write them as Unicode characters, one has to
|
493
|
+
specify an encoding. Sphinx assumes source files to be encoded in UTF-8 by
|
494
|
+
default; you can change this with the :confval:`source_encoding` config value.
|
495
|
+
|
496
|
+
|
497
|
+
Gotchas
|
498
|
+
-------
|
499
|
+
|
500
|
+
There are some problems one commonly runs into while authoring reST documents:
|
501
|
+
|
502
|
+
* **Separation of inline markup:** As said above, inline markup spans must be
|
503
|
+
separated from the surrounding text by non-word characters, you have to use a
|
504
|
+
backslash-escaped space to get around that. See `the reference
|
505
|
+
<http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup>`_
|
506
|
+
for the details.
|
507
|
+
|
508
|
+
* **No nested inline markup:** Something like ``*see :func:`foo`*`` is not
|
509
|
+
possible.
|
510
|
+
|
511
|
+
|
512
|
+
.. rubric:: Footnotes
|
513
|
+
|
514
|
+
.. [1] When the default domain contains a :rst:dir:`class` directive, this directive
|
515
|
+
will be shadowed. Therefore, Sphinx re-exports it as :rst:dir:`rst-class`.
|
516
|
+
</textarea></form>
|
517
|
+
|
518
|
+
<script>
|
519
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
520
|
+
lineNumbers: true,
|
521
|
+
});
|
522
|
+
</script>
|
523
|
+
<p>
|
524
|
+
The <code>python</code> mode will be used for highlighting blocks
|
525
|
+
containing Python/IPython terminal sessions: blocks starting with
|
526
|
+
<code>>>></code> (for Python) or <code>In [num]:</code> (for
|
527
|
+
IPython).
|
528
|
+
|
529
|
+
Further, the <code>stex</code> mode will be used for highlighting
|
530
|
+
blocks containing LaTex code.
|
531
|
+
</p>
|
532
|
+
|
533
|
+
<p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>
|
534
|
+
</article>
|