gump 0.1.6

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.
Files changed (359) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +71 -0
  6. data/Rakefile +2 -0
  7. data/bin/gump +37 -0
  8. data/gump.gemspec +17 -0
  9. data/lib/gump.rb +50 -0
  10. data/lib/version.rb +3 -0
  11. data/server/assets/css/style.css +6949 -0
  12. data/server/assets/images/arrow.png +0 -0
  13. data/server/assets/images/logo.png +0 -0
  14. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css +347 -0
  15. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
  16. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.min.css +7 -0
  17. data/server/assets/js/bootstrap/dist/css/bootstrap.css +5785 -0
  18. data/server/assets/js/bootstrap/dist/css/bootstrap.css.map +1 -0
  19. data/server/assets/js/bootstrap/dist/css/bootstrap.min.css +7 -0
  20. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  21. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  22. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  23. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  24. data/server/assets/js/bootstrap/dist/js/bootstrap.js +1951 -0
  25. data/server/assets/js/bootstrap/dist/js/bootstrap.min.js +6 -0
  26. data/server/assets/js/jquery.codemirror/.gitattributes +8 -0
  27. data/server/assets/js/jquery.codemirror/.gitignore +6 -0
  28. data/server/assets/js/jquery.codemirror/.travis.yml +3 -0
  29. data/server/assets/js/jquery.codemirror/AUTHORS +255 -0
  30. data/server/assets/js/jquery.codemirror/CONTRIBUTING.md +72 -0
  31. data/server/assets/js/jquery.codemirror/LICENSE +19 -0
  32. data/server/assets/js/jquery.codemirror/README.md +11 -0
  33. data/server/assets/js/jquery.codemirror/addon/comment/comment.js +145 -0
  34. data/server/assets/js/jquery.codemirror/addon/comment/continuecomment.js +54 -0
  35. data/server/assets/js/jquery.codemirror/addon/dialog/dialog.css +32 -0
  36. data/server/assets/js/jquery.codemirror/addon/dialog/dialog.js +121 -0
  37. data/server/assets/js/jquery.codemirror/addon/display/fullscreen.css +6 -0
  38. data/server/assets/js/jquery.codemirror/addon/display/fullscreen.js +31 -0
  39. data/server/assets/js/jquery.codemirror/addon/display/placeholder.js +48 -0
  40. data/server/assets/js/jquery.codemirror/addon/edit/closebrackets.js +82 -0
  41. data/server/assets/js/jquery.codemirror/addon/edit/closetag.js +89 -0
  42. data/server/assets/js/jquery.codemirror/addon/edit/continuelist.js +25 -0
  43. data/server/assets/js/jquery.codemirror/addon/edit/matchbrackets.js +87 -0
  44. data/server/assets/js/jquery.codemirror/addon/edit/matchtags.js +56 -0
  45. data/server/assets/js/jquery.codemirror/addon/edit/trailingspace.js +15 -0
  46. data/server/assets/js/jquery.codemirror/addon/fold/brace-fold.js +93 -0
  47. data/server/assets/js/jquery.codemirror/addon/fold/comment-fold.js +40 -0
  48. data/server/assets/js/jquery.codemirror/addon/fold/foldcode.js +75 -0
  49. data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.css +21 -0
  50. data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.js +124 -0
  51. data/server/assets/js/jquery.codemirror/addon/fold/indent-fold.js +30 -0
  52. data/server/assets/js/jquery.codemirror/addon/fold/xml-fold.js +167 -0
  53. data/server/assets/js/jquery.codemirror/addon/hint/anyword-hint.js +34 -0
  54. data/server/assets/js/jquery.codemirror/addon/hint/css-hint.js +50 -0
  55. data/server/assets/js/jquery.codemirror/addon/hint/html-hint.js +337 -0
  56. data/server/assets/js/jquery.codemirror/addon/hint/javascript-hint.js +131 -0
  57. data/server/assets/js/jquery.codemirror/addon/hint/pig-hint.js +121 -0
  58. data/server/assets/js/jquery.codemirror/addon/hint/python-hint.js +95 -0
  59. data/server/assets/js/jquery.codemirror/addon/hint/show-hint.css +38 -0
  60. data/server/assets/js/jquery.codemirror/addon/hint/show-hint.js +286 -0
  61. data/server/assets/js/jquery.codemirror/addon/hint/sql-hint.js +105 -0
  62. data/server/assets/js/jquery.codemirror/addon/hint/xml-hint.js +69 -0
  63. data/server/assets/js/jquery.codemirror/addon/lint/coffeescript-lint.js +27 -0
  64. data/server/assets/js/jquery.codemirror/addon/lint/css-lint.js +19 -0
  65. data/server/assets/js/jquery.codemirror/addon/lint/javascript-lint.js +126 -0
  66. data/server/assets/js/jquery.codemirror/addon/lint/json-lint.js +17 -0
  67. data/server/assets/js/jquery.codemirror/addon/lint/lint.css +73 -0
  68. data/server/assets/js/jquery.codemirror/addon/lint/lint.js +203 -0
  69. data/server/assets/js/jquery.codemirror/addon/merge/dep/diff_match_patch.js +50 -0
  70. data/server/assets/js/jquery.codemirror/addon/merge/merge.css +92 -0
  71. data/server/assets/js/jquery.codemirror/addon/merge/merge.js +474 -0
  72. data/server/assets/js/jquery.codemirror/addon/mode/loadmode.js +51 -0
  73. data/server/assets/js/jquery.codemirror/addon/mode/multiplex.js +101 -0
  74. data/server/assets/js/jquery.codemirror/addon/mode/multiplex_test.js +30 -0
  75. data/server/assets/js/jquery.codemirror/addon/mode/overlay.js +59 -0
  76. data/server/assets/js/jquery.codemirror/addon/runmode/colorize.js +29 -0
  77. data/server/assets/js/jquery.codemirror/addon/runmode/runmode-standalone.js +136 -0
  78. data/server/assets/js/jquery.codemirror/addon/runmode/runmode.js +56 -0
  79. data/server/assets/js/jquery.codemirror/addon/runmode/runmode.node.js +103 -0
  80. data/server/assets/js/jquery.codemirror/addon/scroll/scrollpastend.js +34 -0
  81. data/server/assets/js/jquery.codemirror/addon/search/match-highlighter.js +91 -0
  82. data/server/assets/js/jquery.codemirror/addon/search/search.js +133 -0
  83. data/server/assets/js/jquery.codemirror/addon/search/searchcursor.js +143 -0
  84. data/server/assets/js/jquery.codemirror/addon/selection/active-line.js +39 -0
  85. data/server/assets/js/jquery.codemirror/addon/selection/mark-selection.js +108 -0
  86. data/server/assets/js/jquery.codemirror/addon/tern/tern.css +85 -0
  87. data/server/assets/js/jquery.codemirror/addon/tern/tern.js +632 -0
  88. data/server/assets/js/jquery.codemirror/addon/tern/worker.js +41 -0
  89. data/server/assets/js/jquery.codemirror/addon/wrap/hardwrap.js +99 -0
  90. data/server/assets/js/jquery.codemirror/bin/authors.sh +6 -0
  91. data/server/assets/js/jquery.codemirror/bin/compress +92 -0
  92. data/server/assets/js/jquery.codemirror/bin/lint +16 -0
  93. data/server/assets/js/jquery.codemirror/bin/source-highlight +61 -0
  94. data/server/assets/js/jquery.codemirror/bower.json +15 -0
  95. data/server/assets/js/jquery.codemirror/demo/activeline.html +78 -0
  96. data/server/assets/js/jquery.codemirror/demo/anywordhint.html +79 -0
  97. data/server/assets/js/jquery.codemirror/demo/bidi.html +74 -0
  98. data/server/assets/js/jquery.codemirror/demo/btree.html +86 -0
  99. data/server/assets/js/jquery.codemirror/demo/buffers.html +109 -0
  100. data/server/assets/js/jquery.codemirror/demo/changemode.html +59 -0
  101. data/server/assets/js/jquery.codemirror/demo/closebrackets.html +63 -0
  102. data/server/assets/js/jquery.codemirror/demo/closetag.html +40 -0
  103. data/server/assets/js/jquery.codemirror/demo/complete.html +80 -0
  104. data/server/assets/js/jquery.codemirror/demo/emacs.html +75 -0
  105. data/server/assets/js/jquery.codemirror/demo/folding.html +75 -0
  106. data/server/assets/js/jquery.codemirror/demo/fullscreen.html +130 -0
  107. data/server/assets/js/jquery.codemirror/demo/hardwrap.html +69 -0
  108. data/server/assets/js/jquery.codemirror/demo/html5complete.html +54 -0
  109. data/server/assets/js/jquery.codemirror/demo/indentwrap.html +58 -0
  110. data/server/assets/js/jquery.codemirror/demo/lint.html +171 -0
  111. data/server/assets/js/jquery.codemirror/demo/loadmode.html +49 -0
  112. data/server/assets/js/jquery.codemirror/demo/marker.html +52 -0
  113. data/server/assets/js/jquery.codemirror/demo/markselection.html +45 -0
  114. data/server/assets/js/jquery.codemirror/demo/matchhighlighter.html +47 -0
  115. data/server/assets/js/jquery.codemirror/demo/matchtags.html +49 -0
  116. data/server/assets/js/jquery.codemirror/demo/merge.html +82 -0
  117. data/server/assets/js/jquery.codemirror/demo/multiplex.html +75 -0
  118. data/server/assets/js/jquery.codemirror/demo/mustache.html +68 -0
  119. data/server/assets/js/jquery.codemirror/demo/placeholder.html +45 -0
  120. data/server/assets/js/jquery.codemirror/demo/preview.html +88 -0
  121. data/server/assets/js/jquery.codemirror/demo/resize.html +58 -0
  122. data/server/assets/js/jquery.codemirror/demo/runmode.html +62 -0
  123. data/server/assets/js/jquery.codemirror/demo/search.html +94 -0
  124. data/server/assets/js/jquery.codemirror/demo/spanaffectswrapping_shim.html +85 -0
  125. data/server/assets/js/jquery.codemirror/demo/tern.html +129 -0
  126. data/server/assets/js/jquery.codemirror/demo/theme.html +121 -0
  127. data/server/assets/js/jquery.codemirror/demo/trailingspace.html +48 -0
  128. data/server/assets/js/jquery.codemirror/demo/variableheight.html +67 -0
  129. data/server/assets/js/jquery.codemirror/demo/vim.html +74 -0
  130. data/server/assets/js/jquery.codemirror/demo/visibletabs.html +62 -0
  131. data/server/assets/js/jquery.codemirror/demo/widget.html +85 -0
  132. data/server/assets/js/jquery.codemirror/demo/xmlcomplete.html +116 -0
  133. data/server/assets/js/jquery.codemirror/index.html +192 -0
  134. data/server/assets/js/jquery.codemirror/keymap/emacs.js +387 -0
  135. data/server/assets/js/jquery.codemirror/keymap/extra.js +43 -0
  136. data/server/assets/js/jquery.codemirror/keymap/vim.js +3703 -0
  137. data/server/assets/js/jquery.codemirror/lib/codemirror.css +263 -0
  138. data/server/assets/js/jquery.codemirror/lib/codemirror.js +5944 -0
  139. data/server/assets/js/jquery.codemirror/mode/apl/apl.js +160 -0
  140. data/server/assets/js/jquery.codemirror/mode/apl/index.html +72 -0
  141. data/server/assets/js/jquery.codemirror/mode/asterisk/asterisk.js +183 -0
  142. data/server/assets/js/jquery.codemirror/mode/asterisk/index.html +154 -0
  143. data/server/assets/js/jquery.codemirror/mode/clike/clike.js +362 -0
  144. data/server/assets/js/jquery.codemirror/mode/clike/index.html +195 -0
  145. data/server/assets/js/jquery.codemirror/mode/clike/scala.html +767 -0
  146. data/server/assets/js/jquery.codemirror/mode/clojure/clojure.js +224 -0
  147. data/server/assets/js/jquery.codemirror/mode/clojure/index.html +88 -0
  148. data/server/assets/js/jquery.codemirror/mode/cobol/cobol.js +240 -0
  149. data/server/assets/js/jquery.codemirror/mode/cobol/index.html +210 -0
  150. data/server/assets/js/jquery.codemirror/mode/coffeescript/coffeescript.js +354 -0
  151. data/server/assets/js/jquery.codemirror/mode/coffeescript/index.html +740 -0
  152. data/server/assets/js/jquery.codemirror/mode/commonlisp/commonlisp.js +105 -0
  153. data/server/assets/js/jquery.codemirror/mode/commonlisp/index.html +177 -0
  154. data/server/assets/js/jquery.codemirror/mode/css/css.js +639 -0
  155. data/server/assets/js/jquery.codemirror/mode/css/index.html +70 -0
  156. data/server/assets/js/jquery.codemirror/mode/css/scss.html +157 -0
  157. data/server/assets/js/jquery.codemirror/mode/css/scss_test.js +93 -0
  158. data/server/assets/js/jquery.codemirror/mode/css/test.js +142 -0
  159. data/server/assets/js/jquery.codemirror/mode/d/d.js +205 -0
  160. data/server/assets/js/jquery.codemirror/mode/d/index.html +273 -0
  161. data/server/assets/js/jquery.codemirror/mode/diff/diff.js +32 -0
  162. data/server/assets/js/jquery.codemirror/mode/diff/index.html +117 -0
  163. data/server/assets/js/jquery.codemirror/mode/dtd/dtd.js +127 -0
  164. data/server/assets/js/jquery.codemirror/mode/dtd/index.html +89 -0
  165. data/server/assets/js/jquery.codemirror/mode/ecl/ecl.js +192 -0
  166. data/server/assets/js/jquery.codemirror/mode/ecl/index.html +52 -0
  167. data/server/assets/js/jquery.codemirror/mode/eiffel/eiffel.js +147 -0
  168. data/server/assets/js/jquery.codemirror/mode/eiffel/index.html +430 -0
  169. data/server/assets/js/jquery.codemirror/mode/erlang/erlang.js +484 -0
  170. data/server/assets/js/jquery.codemirror/mode/erlang/index.html +75 -0
  171. data/server/assets/js/jquery.codemirror/mode/fortran/fortran.js +173 -0
  172. data/server/assets/js/jquery.codemirror/mode/fortran/index.html +81 -0
  173. data/server/assets/js/jquery.codemirror/mode/gas/gas.js +330 -0
  174. data/server/assets/js/jquery.codemirror/mode/gas/index.html +68 -0
  175. data/server/assets/js/jquery.codemirror/mode/gfm/gfm.js +97 -0
  176. data/server/assets/js/jquery.codemirror/mode/gfm/index.html +82 -0
  177. data/server/assets/js/jquery.codemirror/mode/gfm/test.js +112 -0
  178. data/server/assets/js/jquery.codemirror/mode/gherkin/gherkin.js +168 -0
  179. data/server/assets/js/jquery.codemirror/mode/gherkin/index.html +48 -0
  180. data/server/assets/js/jquery.codemirror/mode/go/go.js +168 -0
  181. data/server/assets/js/jquery.codemirror/mode/go/index.html +85 -0
  182. data/server/assets/js/jquery.codemirror/mode/groovy/groovy.js +211 -0
  183. data/server/assets/js/jquery.codemirror/mode/groovy/index.html +84 -0
  184. data/server/assets/js/jquery.codemirror/mode/haml/haml.js +153 -0
  185. data/server/assets/js/jquery.codemirror/mode/haml/index.html +79 -0
  186. data/server/assets/js/jquery.codemirror/mode/haml/test.js +94 -0
  187. data/server/assets/js/jquery.codemirror/mode/haskell/haskell.js +250 -0
  188. data/server/assets/js/jquery.codemirror/mode/haskell/index.html +73 -0
  189. data/server/assets/js/jquery.codemirror/mode/haxe/haxe.js +429 -0
  190. data/server/assets/js/jquery.codemirror/mode/haxe/index.html +103 -0
  191. data/server/assets/js/jquery.codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  192. data/server/assets/js/jquery.codemirror/mode/htmlembedded/index.html +60 -0
  193. data/server/assets/js/jquery.codemirror/mode/htmlmixed/htmlmixed.js +104 -0
  194. data/server/assets/js/jquery.codemirror/mode/htmlmixed/index.html +85 -0
  195. data/server/assets/js/jquery.codemirror/mode/http/http.js +98 -0
  196. data/server/assets/js/jquery.codemirror/mode/http/index.html +45 -0
  197. data/server/assets/js/jquery.codemirror/mode/index.html +114 -0
  198. data/server/assets/js/jquery.codemirror/mode/jade/index.html +66 -0
  199. data/server/assets/js/jquery.codemirror/mode/jade/jade.js +90 -0
  200. data/server/assets/js/jquery.codemirror/mode/javascript/index.html +107 -0
  201. data/server/assets/js/jquery.codemirror/mode/javascript/javascript.js +617 -0
  202. data/server/assets/js/jquery.codemirror/mode/javascript/test.js +72 -0
  203. data/server/assets/js/jquery.codemirror/mode/javascript/typescript.html +61 -0
  204. data/server/assets/js/jquery.codemirror/mode/jinja2/index.html +50 -0
  205. data/server/assets/js/jquery.codemirror/mode/jinja2/jinja2.js +42 -0
  206. data/server/assets/js/jquery.codemirror/mode/julia/index.html +187 -0
  207. data/server/assets/js/jquery.codemirror/mode/julia/julia.js +262 -0
  208. data/server/assets/js/jquery.codemirror/mode/less/index.html +753 -0
  209. data/server/assets/js/jquery.codemirror/mode/less/less.js +346 -0
  210. data/server/assets/js/jquery.codemirror/mode/livescript/index.html +459 -0
  211. data/server/assets/js/jquery.codemirror/mode/livescript/livescript.js +267 -0
  212. data/server/assets/js/jquery.codemirror/mode/livescript/livescript.ls +266 -0
  213. data/server/assets/js/jquery.codemirror/mode/lua/index.html +86 -0
  214. data/server/assets/js/jquery.codemirror/mode/lua/lua.js +144 -0
  215. data/server/assets/js/jquery.codemirror/mode/markdown/index.html +359 -0
  216. data/server/assets/js/jquery.codemirror/mode/markdown/markdown.js +560 -0
  217. data/server/assets/js/jquery.codemirror/mode/markdown/test.js +664 -0
  218. data/server/assets/js/jquery.codemirror/mode/meta.js +91 -0
  219. data/server/assets/js/jquery.codemirror/mode/mirc/index.html +161 -0
  220. data/server/assets/js/jquery.codemirror/mode/mirc/mirc.js +177 -0
  221. data/server/assets/js/jquery.codemirror/mode/nginx/index.html +181 -0
  222. data/server/assets/js/jquery.codemirror/mode/nginx/nginx.js +163 -0
  223. data/server/assets/js/jquery.codemirror/mode/ntriples/index.html +45 -0
  224. data/server/assets/js/jquery.codemirror/mode/ntriples/ntriples.js +170 -0
  225. data/server/assets/js/jquery.codemirror/mode/ocaml/index.html +146 -0
  226. data/server/assets/js/jquery.codemirror/mode/ocaml/ocaml.js +116 -0
  227. data/server/assets/js/jquery.codemirror/mode/octave/index.html +95 -0
  228. data/server/assets/js/jquery.codemirror/mode/octave/octave.js +118 -0
  229. data/server/assets/js/jquery.codemirror/mode/pascal/index.html +61 -0
  230. data/server/assets/js/jquery.codemirror/mode/pascal/pascal.js +94 -0
  231. data/server/assets/js/jquery.codemirror/mode/pegjs/index.html +66 -0
  232. data/server/assets/js/jquery.codemirror/mode/pegjs/pegjs.js +103 -0
  233. data/server/assets/js/jquery.codemirror/mode/perl/index.html +75 -0
  234. data/server/assets/js/jquery.codemirror/mode/perl/perl.js +816 -0
  235. data/server/assets/js/jquery.codemirror/mode/php/index.html +62 -0
  236. data/server/assets/js/jquery.codemirror/mode/php/php.js +132 -0
  237. data/server/assets/js/jquery.codemirror/mode/pig/index.html +55 -0
  238. data/server/assets/js/jquery.codemirror/mode/pig/pig.js +171 -0
  239. data/server/assets/js/jquery.codemirror/mode/properties/index.html +53 -0
  240. data/server/assets/js/jquery.codemirror/mode/properties/properties.js +63 -0
  241. data/server/assets/js/jquery.codemirror/mode/python/index.html +187 -0
  242. data/server/assets/js/jquery.codemirror/mode/python/python.js +368 -0
  243. data/server/assets/js/jquery.codemirror/mode/q/index.html +144 -0
  244. data/server/assets/js/jquery.codemirror/mode/q/q.js +124 -0
  245. data/server/assets/js/jquery.codemirror/mode/r/index.html +86 -0
  246. data/server/assets/js/jquery.codemirror/mode/r/r.js +141 -0
  247. data/server/assets/js/jquery.codemirror/mode/rpm/changes/changes.js +19 -0
  248. data/server/assets/js/jquery.codemirror/mode/rpm/changes/index.html +67 -0
  249. data/server/assets/js/jquery.codemirror/mode/rpm/spec/index.html +114 -0
  250. data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.css +5 -0
  251. data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.js +66 -0
  252. data/server/assets/js/jquery.codemirror/mode/rst/index.html +534 -0
  253. data/server/assets/js/jquery.codemirror/mode/rst/rst.js +560 -0
  254. data/server/assets/js/jquery.codemirror/mode/ruby/index.html +185 -0
  255. data/server/assets/js/jquery.codemirror/mode/ruby/ruby.js +247 -0
  256. data/server/assets/js/jquery.codemirror/mode/rust/index.html +61 -0
  257. data/server/assets/js/jquery.codemirror/mode/rust/rust.js +436 -0
  258. data/server/assets/js/jquery.codemirror/mode/sass/index.html +66 -0
  259. data/server/assets/js/jquery.codemirror/mode/sass/sass.js +330 -0
  260. data/server/assets/js/jquery.codemirror/mode/scheme/index.html +77 -0
  261. data/server/assets/js/jquery.codemirror/mode/scheme/scheme.js +232 -0
  262. data/server/assets/js/jquery.codemirror/mode/shell/index.html +66 -0
  263. data/server/assets/js/jquery.codemirror/mode/shell/shell.js +118 -0
  264. data/server/assets/js/jquery.codemirror/mode/sieve/index.html +93 -0
  265. data/server/assets/js/jquery.codemirror/mode/sieve/sieve.js +183 -0
  266. data/server/assets/js/jquery.codemirror/mode/smalltalk/index.html +68 -0
  267. data/server/assets/js/jquery.codemirror/mode/smalltalk/smalltalk.js +151 -0
  268. data/server/assets/js/jquery.codemirror/mode/smarty/index.html +136 -0
  269. data/server/assets/js/jquery.codemirror/mode/smarty/smarty.js +205 -0
  270. data/server/assets/js/jquery.codemirror/mode/smartymixed/index.html +114 -0
  271. data/server/assets/js/jquery.codemirror/mode/smartymixed/smartymixed.js +175 -0
  272. data/server/assets/js/jquery.codemirror/mode/sparql/index.html +54 -0
  273. data/server/assets/js/jquery.codemirror/mode/sparql/sparql.js +145 -0
  274. data/server/assets/js/jquery.codemirror/mode/sql/index.html +75 -0
  275. data/server/assets/js/jquery.codemirror/mode/sql/sql.js +365 -0
  276. data/server/assets/js/jquery.codemirror/mode/stex/index.html +110 -0
  277. data/server/assets/js/jquery.codemirror/mode/stex/stex.js +246 -0
  278. data/server/assets/js/jquery.codemirror/mode/stex/test.js +120 -0
  279. data/server/assets/js/jquery.codemirror/mode/tcl/index.html +143 -0
  280. data/server/assets/js/jquery.codemirror/mode/tcl/tcl.js +131 -0
  281. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/index.html +155 -0
  282. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  283. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  284. data/server/assets/js/jquery.codemirror/mode/tiki/index.html +95 -0
  285. data/server/assets/js/jquery.codemirror/mode/tiki/tiki.css +26 -0
  286. data/server/assets/js/jquery.codemirror/mode/tiki/tiki.js +308 -0
  287. data/server/assets/js/jquery.codemirror/mode/toml/index.html +73 -0
  288. data/server/assets/js/jquery.codemirror/mode/toml/toml.js +71 -0
  289. data/server/assets/js/jquery.codemirror/mode/turtle/index.html +51 -0
  290. data/server/assets/js/jquery.codemirror/mode/turtle/turtle.js +145 -0
  291. data/server/assets/js/jquery.codemirror/mode/vb/index.html +103 -0
  292. data/server/assets/js/jquery.codemirror/mode/vb/vb.js +259 -0
  293. data/server/assets/js/jquery.codemirror/mode/vbscript/index.html +55 -0
  294. data/server/assets/js/jquery.codemirror/mode/vbscript/vbscript.js +334 -0
  295. data/server/assets/js/jquery.codemirror/mode/velocity/index.html +119 -0
  296. data/server/assets/js/jquery.codemirror/mode/velocity/velocity.js +186 -0
  297. data/server/assets/js/jquery.codemirror/mode/verilog/index.html +132 -0
  298. data/server/assets/js/jquery.codemirror/mode/verilog/verilog.js +182 -0
  299. data/server/assets/js/jquery.codemirror/mode/xml/index.html +57 -0
  300. data/server/assets/js/jquery.codemirror/mode/xml/xml.js +345 -0
  301. data/server/assets/js/jquery.codemirror/mode/xquery/index.html +210 -0
  302. data/server/assets/js/jquery.codemirror/mode/xquery/test.js +64 -0
  303. data/server/assets/js/jquery.codemirror/mode/xquery/xquery.js +432 -0
  304. data/server/assets/js/jquery.codemirror/mode/yaml/index.html +80 -0
  305. data/server/assets/js/jquery.codemirror/mode/yaml/yaml.js +97 -0
  306. data/server/assets/js/jquery.codemirror/mode/z80/index.html +52 -0
  307. data/server/assets/js/jquery.codemirror/mode/z80/z80.js +85 -0
  308. data/server/assets/js/jquery.codemirror/package.json +19 -0
  309. data/server/assets/js/jquery.codemirror/test/comment_test.js +51 -0
  310. data/server/assets/js/jquery.codemirror/test/doc_test.js +329 -0
  311. data/server/assets/js/jquery.codemirror/test/driver.js +139 -0
  312. data/server/assets/js/jquery.codemirror/test/emacs_test.js +135 -0
  313. data/server/assets/js/jquery.codemirror/test/index.html +209 -0
  314. data/server/assets/js/jquery.codemirror/test/lint/acorn.js +1593 -0
  315. data/server/assets/js/jquery.codemirror/test/lint/lint.js +139 -0
  316. data/server/assets/js/jquery.codemirror/test/lint/walk.js +216 -0
  317. data/server/assets/js/jquery.codemirror/test/mode_test.css +10 -0
  318. data/server/assets/js/jquery.codemirror/test/mode_test.js +200 -0
  319. data/server/assets/js/jquery.codemirror/test/phantom_driver.js +31 -0
  320. data/server/assets/js/jquery.codemirror/test/run.js +34 -0
  321. data/server/assets/js/jquery.codemirror/test/test.js +1562 -0
  322. data/server/assets/js/jquery.codemirror/test/vim_test.js +2391 -0
  323. data/server/assets/js/jquery.codemirror/theme/3024-day.css +34 -0
  324. data/server/assets/js/jquery.codemirror/theme/3024-night.css +34 -0
  325. data/server/assets/js/jquery.codemirror/theme/ambiance-mobile.css +5 -0
  326. data/server/assets/js/jquery.codemirror/theme/ambiance.css +70 -0
  327. data/server/assets/js/jquery.codemirror/theme/base16-dark.css +34 -0
  328. data/server/assets/js/jquery.codemirror/theme/base16-light.css +34 -0
  329. data/server/assets/js/jquery.codemirror/theme/blackboard.css +28 -0
  330. data/server/assets/js/jquery.codemirror/theme/cobalt.css +21 -0
  331. data/server/assets/js/jquery.codemirror/theme/eclipse.css +23 -0
  332. data/server/assets/js/jquery.codemirror/theme/elegant.css +13 -0
  333. data/server/assets/js/jquery.codemirror/theme/erlang-dark.css +30 -0
  334. data/server/assets/js/jquery.codemirror/theme/lesser-dark.css +47 -0
  335. data/server/assets/js/jquery.codemirror/theme/mbo.css +37 -0
  336. data/server/assets/js/jquery.codemirror/theme/midnight.css +43 -0
  337. data/server/assets/js/jquery.codemirror/theme/monokai.css +29 -0
  338. data/server/assets/js/jquery.codemirror/theme/neat.css +12 -0
  339. data/server/assets/js/jquery.codemirror/theme/night.css +24 -0
  340. data/server/assets/js/jquery.codemirror/theme/paraiso-dark.css +34 -0
  341. data/server/assets/js/jquery.codemirror/theme/paraiso-light.css +34 -0
  342. data/server/assets/js/jquery.codemirror/theme/rubyblue.css +23 -0
  343. data/server/assets/js/jquery.codemirror/theme/solarized.css +180 -0
  344. data/server/assets/js/jquery.codemirror/theme/the-matrix.css +26 -0
  345. data/server/assets/js/jquery.codemirror/theme/tomorrow-night-eighties.css +34 -0
  346. data/server/assets/js/jquery.codemirror/theme/twilight.css +28 -0
  347. data/server/assets/js/jquery.codemirror/theme/vibrant-ink.css +30 -0
  348. data/server/assets/js/jquery.codemirror/theme/xq-dark.css +49 -0
  349. data/server/assets/js/jquery.codemirror/theme/xq-light.css +43 -0
  350. data/server/assets/js/jquery.js +4 -0
  351. data/server/assets/js/jquery.nanoscroller/jquery.nanoscroller.js +2 -0
  352. data/server/assets/js/jquery.nanoscroller/nanoscroller.css +49 -0
  353. data/server/assets/js/tester.js +161 -0
  354. data/server/config.ru +2 -0
  355. data/server/server.rb +41 -0
  356. data/server/views/_content.erb +65 -0
  357. data/server/views/_sidebar.erb +32 -0
  358. data/server/views/index.erb +40 -0
  359. metadata +402 -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
+ &lt;http://docutils.sourceforge.net/rst.html&gt;`_. 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 &lt;paragraphs&gt;`) 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 &lt;bullet-lists&gt;`) 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 &lt;definition-lists&gt;`) 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 &lt;block-quotes&gt;`) are created by just indenting
142
+ them more than the surrounding paragraphs.
143
+
144
+ Line blocks (:duref:`ref &lt;line-blocks&gt;`) 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 &lt;field-lists&gt;`)
153
+ * option lists (:duref:`ref &lt;option-lists&gt;`)
154
+ * quoted literal blocks (:duref:`ref &lt;quoted-literal-blocks&gt;`)
155
+ * doctest blocks (:duref:`ref &lt;doctest-blocks&gt;`)
156
+
157
+
158
+ Source Code
159
+ -----------
160
+
161
+ Literal code blocks (:duref:`ref &lt;literal-blocks&gt;`) 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
+ &lt;grid-tables&gt;`), 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 &lt;simple-tables&gt;`) 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 &lt;http://example.com/&gt;`_`` 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
+ &lt;hyperlink-targets&gt;`), 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 &lt;sections&gt;`) 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 &lt;explicit-markup-blocks&gt;`) 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 &lt;directives&gt;`) 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 ``&lt;div&gt;`` 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 ``&lt;meta&gt;`` 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 &lt;image&gt;`), 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 &lt;footnotes&gt;`), 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 &lt;citations&gt;`) 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 &lt;substitution-definitions&gt;`), 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 &lt;substitution-definitions&gt;`
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 &lt;comments&gt;`). 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
+ &lt;http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup&gt;`_
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>&gt;&gt;&gt;</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>