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,664 @@
1
+ (function() {
2
+ var mode = CodeMirror.getMode({tabSize: 4}, "markdown");
3
+ function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
4
+
5
+ MT("plainText",
6
+ "foo");
7
+
8
+ // Don't style single trailing space
9
+ MT("trailingSpace1",
10
+ "foo ");
11
+
12
+ // Two or more trailing spaces should be styled with line break character
13
+ MT("trailingSpace2",
14
+ "foo[trailing-space-a ][trailing-space-new-line ]");
15
+
16
+ MT("trailingSpace3",
17
+ "foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]");
18
+
19
+ MT("trailingSpace4",
20
+ "foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]");
21
+
22
+ // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value)
23
+ MT("codeBlocksUsing4Spaces",
24
+ " [comment foo]");
25
+
26
+ // Code blocks using 4 spaces with internal indentation
27
+ MT("codeBlocksUsing4SpacesIndentation",
28
+ " [comment bar]",
29
+ " [comment hello]",
30
+ " [comment world]",
31
+ " [comment foo]",
32
+ "bar");
33
+
34
+ // Code blocks using 4 spaces with internal indentation
35
+ MT("codeBlocksUsing4SpacesIndentation",
36
+ " foo",
37
+ " [comment bar]",
38
+ " [comment hello]",
39
+ " [comment world]");
40
+
41
+ // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value)
42
+ MT("codeBlocksUsing1Tab",
43
+ "\t[comment foo]");
44
+
45
+ // Inline code using backticks
46
+ MT("inlineCodeUsingBackticks",
47
+ "foo [comment `bar`]");
48
+
49
+ // Block code using single backtick (shouldn't work)
50
+ MT("blockCodeSingleBacktick",
51
+ "[comment `]",
52
+ "foo",
53
+ "[comment `]");
54
+
55
+ // Unclosed backticks
56
+ // Instead of simply marking as CODE, it would be nice to have an
57
+ // incomplete flag for CODE, that is styled slightly different.
58
+ MT("unclosedBackticks",
59
+ "foo [comment `bar]");
60
+
61
+ // Per documentation: "To include a literal backtick character within a
62
+ // code span, you can use multiple backticks as the opening and closing
63
+ // delimiters"
64
+ MT("doubleBackticks",
65
+ "[comment ``foo ` bar``]");
66
+
67
+ // Tests based on Dingus
68
+ // http://daringfireball.net/projects/markdown/dingus
69
+ //
70
+ // Multiple backticks within an inline code block
71
+ MT("consecutiveBackticks",
72
+ "[comment `foo```bar`]");
73
+
74
+ // Multiple backticks within an inline code block with a second code block
75
+ MT("consecutiveBackticks",
76
+ "[comment `foo```bar`] hello [comment `world`]");
77
+
78
+ // Unclosed with several different groups of backticks
79
+ MT("unclosedBackticks",
80
+ "[comment ``foo ``` bar` hello]");
81
+
82
+ // Closed with several different groups of backticks
83
+ MT("closedBackticks",
84
+ "[comment ``foo ``` bar` hello``] world");
85
+
86
+ // atx headers
87
+ // http://daringfireball.net/projects/markdown/syntax#header
88
+
89
+ MT("atxH1",
90
+ "[header&header1 # foo]");
91
+
92
+ MT("atxH2",
93
+ "[header&header2 ## foo]");
94
+
95
+ MT("atxH3",
96
+ "[header&header3 ### foo]");
97
+
98
+ MT("atxH4",
99
+ "[header&header4 #### foo]");
100
+
101
+ MT("atxH5",
102
+ "[header&header5 ##### foo]");
103
+
104
+ MT("atxH6",
105
+ "[header&header6 ###### foo]");
106
+
107
+ // H6 - 7x '#' should still be H6, per Dingus
108
+ // http://daringfireball.net/projects/markdown/dingus
109
+ MT("atxH6NotH7",
110
+ "[header&header6 ####### foo]");
111
+
112
+ // Inline styles should be parsed inside headers
113
+ MT("atxH1inline",
114
+ "[header&header1 # foo ][header&header1&em *bar*]");
115
+
116
+ // Setext headers - H1, H2
117
+ // Per documentation, "Any number of underlining =’s or -’s will work."
118
+ // http://daringfireball.net/projects/markdown/syntax#header
119
+ // Ideally, the text would be marked as `header` as well, but this is
120
+ // not really feasible at the moment. So, instead, we're testing against
121
+ // what works today, to avoid any regressions.
122
+ //
123
+ // Check if single underlining = works
124
+ MT("setextH1",
125
+ "foo",
126
+ "[header&header1 =]");
127
+
128
+ // Check if 3+ ='s work
129
+ MT("setextH1",
130
+ "foo",
131
+ "[header&header1 ===]");
132
+
133
+ // Check if single underlining - works
134
+ MT("setextH2",
135
+ "foo",
136
+ "[header&header2 -]");
137
+
138
+ // Check if 3+ -'s work
139
+ MT("setextH2",
140
+ "foo",
141
+ "[header&header2 ---]");
142
+
143
+ // Single-line blockquote with trailing space
144
+ MT("blockquoteSpace",
145
+ "[atom > foo]");
146
+
147
+ // Single-line blockquote
148
+ MT("blockquoteNoSpace",
149
+ "[atom >foo]");
150
+
151
+ // No blank line before blockquote
152
+ MT("blockquoteNoBlankLine",
153
+ "foo",
154
+ "[atom > bar]");
155
+
156
+ // Nested blockquote
157
+ MT("blockquoteSpace",
158
+ "[atom > foo]",
159
+ "[number > > foo]",
160
+ "[atom > > > foo]");
161
+
162
+ // Single-line blockquote followed by normal paragraph
163
+ MT("blockquoteThenParagraph",
164
+ "[atom >foo]",
165
+ "",
166
+ "bar");
167
+
168
+ // Multi-line blockquote (lazy mode)
169
+ MT("multiBlockquoteLazy",
170
+ "[atom >foo]",
171
+ "[atom bar]");
172
+
173
+ // Multi-line blockquote followed by normal paragraph (lazy mode)
174
+ MT("multiBlockquoteLazyThenParagraph",
175
+ "[atom >foo]",
176
+ "[atom bar]",
177
+ "",
178
+ "hello");
179
+
180
+ // Multi-line blockquote (non-lazy mode)
181
+ MT("multiBlockquote",
182
+ "[atom >foo]",
183
+ "[atom >bar]");
184
+
185
+ // Multi-line blockquote followed by normal paragraph (non-lazy mode)
186
+ MT("multiBlockquoteThenParagraph",
187
+ "[atom >foo]",
188
+ "[atom >bar]",
189
+ "",
190
+ "hello");
191
+
192
+ // Check list types
193
+
194
+ MT("listAsterisk",
195
+ "foo",
196
+ "bar",
197
+ "",
198
+ "[variable-2 * foo]",
199
+ "[variable-2 * bar]");
200
+
201
+ MT("listPlus",
202
+ "foo",
203
+ "bar",
204
+ "",
205
+ "[variable-2 + foo]",
206
+ "[variable-2 + bar]");
207
+
208
+ MT("listDash",
209
+ "foo",
210
+ "bar",
211
+ "",
212
+ "[variable-2 - foo]",
213
+ "[variable-2 - bar]");
214
+
215
+ MT("listNumber",
216
+ "foo",
217
+ "bar",
218
+ "",
219
+ "[variable-2 1. foo]",
220
+ "[variable-2 2. bar]");
221
+
222
+ // Lists require a preceding blank line (per Dingus)
223
+ MT("listBogus",
224
+ "foo",
225
+ "1. bar",
226
+ "2. hello");
227
+
228
+ // Formatting in lists (*)
229
+ MT("listAsteriskFormatting",
230
+ "[variable-2 * ][variable-2&em *foo*][variable-2 bar]",
231
+ "[variable-2 * ][variable-2&strong **foo**][variable-2 bar]",
232
+ "[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
233
+ "[variable-2 * ][variable-2&comment `foo`][variable-2 bar]");
234
+
235
+ // Formatting in lists (+)
236
+ MT("listPlusFormatting",
237
+ "[variable-2 + ][variable-2&em *foo*][variable-2 bar]",
238
+ "[variable-2 + ][variable-2&strong **foo**][variable-2 bar]",
239
+ "[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
240
+ "[variable-2 + ][variable-2&comment `foo`][variable-2 bar]");
241
+
242
+ // Formatting in lists (-)
243
+ MT("listDashFormatting",
244
+ "[variable-2 - ][variable-2&em *foo*][variable-2 bar]",
245
+ "[variable-2 - ][variable-2&strong **foo**][variable-2 bar]",
246
+ "[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
247
+ "[variable-2 - ][variable-2&comment `foo`][variable-2 bar]");
248
+
249
+ // Formatting in lists (1.)
250
+ MT("listNumberFormatting",
251
+ "[variable-2 1. ][variable-2&em *foo*][variable-2 bar]",
252
+ "[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]",
253
+ "[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]",
254
+ "[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]");
255
+
256
+ // Paragraph lists
257
+ MT("listParagraph",
258
+ "[variable-2 * foo]",
259
+ "",
260
+ "[variable-2 * bar]");
261
+
262
+ // Multi-paragraph lists
263
+ //
264
+ // 4 spaces
265
+ MT("listMultiParagraph",
266
+ "[variable-2 * foo]",
267
+ "",
268
+ "[variable-2 * bar]",
269
+ "",
270
+ " [variable-2 hello]");
271
+
272
+ // 4 spaces, extra blank lines (should still be list, per Dingus)
273
+ MT("listMultiParagraphExtra",
274
+ "[variable-2 * foo]",
275
+ "",
276
+ "[variable-2 * bar]",
277
+ "",
278
+ "",
279
+ " [variable-2 hello]");
280
+
281
+ // 4 spaces, plus 1 space (should still be list, per Dingus)
282
+ MT("listMultiParagraphExtraSpace",
283
+ "[variable-2 * foo]",
284
+ "",
285
+ "[variable-2 * bar]",
286
+ "",
287
+ " [variable-2 hello]",
288
+ "",
289
+ " [variable-2 world]");
290
+
291
+ // 1 tab
292
+ MT("listTab",
293
+ "[variable-2 * foo]",
294
+ "",
295
+ "[variable-2 * bar]",
296
+ "",
297
+ "\t[variable-2 hello]");
298
+
299
+ // No indent
300
+ MT("listNoIndent",
301
+ "[variable-2 * foo]",
302
+ "",
303
+ "[variable-2 * bar]",
304
+ "",
305
+ "hello");
306
+
307
+ // Blockquote
308
+ MT("blockquote",
309
+ "[variable-2 * foo]",
310
+ "",
311
+ "[variable-2 * bar]",
312
+ "",
313
+ " [variable-2&atom > hello]");
314
+
315
+ // Code block
316
+ MT("blockquoteCode",
317
+ "[variable-2 * foo]",
318
+ "",
319
+ "[variable-2 * bar]",
320
+ "",
321
+ " [comment > hello]",
322
+ "",
323
+ " [variable-2 world]");
324
+
325
+ // Code block followed by text
326
+ MT("blockquoteCodeText",
327
+ "[variable-2 * foo]",
328
+ "",
329
+ " [variable-2 bar]",
330
+ "",
331
+ " [comment hello]",
332
+ "",
333
+ " [variable-2 world]");
334
+
335
+ // Nested list
336
+
337
+ MT("listAsteriskNested",
338
+ "[variable-2 * foo]",
339
+ "",
340
+ " [variable-3 * bar]");
341
+
342
+ MT("listPlusNested",
343
+ "[variable-2 + foo]",
344
+ "",
345
+ " [variable-3 + bar]");
346
+
347
+ MT("listDashNested",
348
+ "[variable-2 - foo]",
349
+ "",
350
+ " [variable-3 - bar]");
351
+
352
+ MT("listNumberNested",
353
+ "[variable-2 1. foo]",
354
+ "",
355
+ " [variable-3 2. bar]");
356
+
357
+ MT("listMixed",
358
+ "[variable-2 * foo]",
359
+ "",
360
+ " [variable-3 + bar]",
361
+ "",
362
+ " [keyword - hello]",
363
+ "",
364
+ " [variable-2 1. world]");
365
+
366
+ MT("listBlockquote",
367
+ "[variable-2 * foo]",
368
+ "",
369
+ " [variable-3 + bar]",
370
+ "",
371
+ " [atom&variable-3 > hello]");
372
+
373
+ MT("listCode",
374
+ "[variable-2 * foo]",
375
+ "",
376
+ " [variable-3 + bar]",
377
+ "",
378
+ " [comment hello]");
379
+
380
+ // Code with internal indentation
381
+ MT("listCodeIndentation",
382
+ "[variable-2 * foo]",
383
+ "",
384
+ " [comment bar]",
385
+ " [comment hello]",
386
+ " [comment world]",
387
+ " [comment foo]",
388
+ " [variable-2 bar]");
389
+
390
+ // List nesting edge cases
391
+ MT("listNested",
392
+ "[variable-2 * foo]",
393
+ "",
394
+ " [variable-3 * bar]",
395
+ "",
396
+ " [variable-2 hello]"
397
+ );
398
+ MT("listNested",
399
+ "[variable-2 * foo]",
400
+ "",
401
+ " [variable-3 * bar]",
402
+ "",
403
+ " [variable-3 * foo]"
404
+ );
405
+
406
+ // Code followed by text
407
+ MT("listCodeText",
408
+ "[variable-2 * foo]",
409
+ "",
410
+ " [comment bar]",
411
+ "",
412
+ "hello");
413
+
414
+ // Following tests directly from official Markdown documentation
415
+ // http://daringfireball.net/projects/markdown/syntax#hr
416
+
417
+ MT("hrSpace",
418
+ "[hr * * *]");
419
+
420
+ MT("hr",
421
+ "[hr ***]");
422
+
423
+ MT("hrLong",
424
+ "[hr *****]");
425
+
426
+ MT("hrSpaceDash",
427
+ "[hr - - -]");
428
+
429
+ MT("hrDashLong",
430
+ "[hr ---------------------------------------]");
431
+
432
+ // Inline link with title
433
+ MT("linkTitle",
434
+ "[link [[foo]]][string (http://example.com/ \"bar\")] hello");
435
+
436
+ // Inline link without title
437
+ MT("linkNoTitle",
438
+ "[link [[foo]]][string (http://example.com/)] bar");
439
+
440
+ // Inline link with image
441
+ MT("linkImage",
442
+ "[link [[][tag ![[foo]]][string (http://example.com/)][link ]]][string (http://example.com/)] bar");
443
+
444
+ // Inline link with Em
445
+ MT("linkEm",
446
+ "[link [[][link&em *foo*][link ]]][string (http://example.com/)] bar");
447
+
448
+ // Inline link with Strong
449
+ MT("linkStrong",
450
+ "[link [[][link&strong **foo**][link ]]][string (http://example.com/)] bar");
451
+
452
+ // Inline link with EmStrong
453
+ MT("linkEmStrong",
454
+ "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string (http://example.com/)] bar");
455
+
456
+ // Image with title
457
+ MT("imageTitle",
458
+ "[tag ![[foo]]][string (http://example.com/ \"bar\")] hello");
459
+
460
+ // Image without title
461
+ MT("imageNoTitle",
462
+ "[tag ![[foo]]][string (http://example.com/)] bar");
463
+
464
+ // Image with asterisks
465
+ MT("imageAsterisks",
466
+ "[tag ![[*foo*]]][string (http://example.com/)] bar");
467
+
468
+ // Not a link. Should be normal text due to square brackets being used
469
+ // regularly in text, especially in quoted material, and no space is allowed
470
+ // between square brackets and parentheses (per Dingus).
471
+ MT("notALink",
472
+ "[[foo]] (bar)");
473
+
474
+ // Reference-style links
475
+ MT("linkReference",
476
+ "[link [[foo]]][string [[bar]]] hello");
477
+
478
+ // Reference-style links with Em
479
+ MT("linkReferenceEm",
480
+ "[link [[][link&em *foo*][link ]]][string [[bar]]] hello");
481
+
482
+ // Reference-style links with Strong
483
+ MT("linkReferenceStrong",
484
+ "[link [[][link&strong **foo**][link ]]][string [[bar]]] hello");
485
+
486
+ // Reference-style links with EmStrong
487
+ MT("linkReferenceEmStrong",
488
+ "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string [[bar]]] hello");
489
+
490
+ // Reference-style links with optional space separator (per docuentation)
491
+ // "You can optionally use a space to separate the sets of brackets"
492
+ MT("linkReferenceSpace",
493
+ "[link [[foo]]] [string [[bar]]] hello");
494
+
495
+ // Should only allow a single space ("...use *a* space...")
496
+ MT("linkReferenceDoubleSpace",
497
+ "[[foo]] [[bar]] hello");
498
+
499
+ // Reference-style links with implicit link name
500
+ MT("linkImplicit",
501
+ "[link [[foo]]][string [[]]] hello");
502
+
503
+ // @todo It would be nice if, at some point, the document was actually
504
+ // checked to see if the referenced link exists
505
+
506
+ // Link label, for reference-style links (taken from documentation)
507
+
508
+ MT("labelNoTitle",
509
+ "[link [[foo]]:] [string http://example.com/]");
510
+
511
+ MT("labelIndented",
512
+ " [link [[foo]]:] [string http://example.com/]");
513
+
514
+ MT("labelSpaceTitle",
515
+ "[link [[foo bar]]:] [string http://example.com/ \"hello\"]");
516
+
517
+ MT("labelDoubleTitle",
518
+ "[link [[foo bar]]:] [string http://example.com/ \"hello\"] \"world\"");
519
+
520
+ MT("labelTitleDoubleQuotes",
521
+ "[link [[foo]]:] [string http://example.com/ \"bar\"]");
522
+
523
+ MT("labelTitleSingleQuotes",
524
+ "[link [[foo]]:] [string http://example.com/ 'bar']");
525
+
526
+ MT("labelTitleParenthese",
527
+ "[link [[foo]]:] [string http://example.com/ (bar)]");
528
+
529
+ MT("labelTitleInvalid",
530
+ "[link [[foo]]:] [string http://example.com/] bar");
531
+
532
+ MT("labelLinkAngleBrackets",
533
+ "[link [[foo]]:] [string <http://example.com/> \"bar\"]");
534
+
535
+ MT("labelTitleNextDoubleQuotes",
536
+ "[link [[foo]]:] [string http://example.com/]",
537
+ "[string \"bar\"] hello");
538
+
539
+ MT("labelTitleNextSingleQuotes",
540
+ "[link [[foo]]:] [string http://example.com/]",
541
+ "[string 'bar'] hello");
542
+
543
+ MT("labelTitleNextParenthese",
544
+ "[link [[foo]]:] [string http://example.com/]",
545
+ "[string (bar)] hello");
546
+
547
+ MT("labelTitleNextMixed",
548
+ "[link [[foo]]:] [string http://example.com/]",
549
+ "(bar\" hello");
550
+
551
+ MT("linkWeb",
552
+ "[link <http://example.com/>] foo");
553
+
554
+ MT("linkWebDouble",
555
+ "[link <http://example.com/>] foo [link <http://example.com/>]");
556
+
557
+ MT("linkEmail",
558
+ "[link <user@example.com>] foo");
559
+
560
+ MT("linkEmailDouble",
561
+ "[link <user@example.com>] foo [link <user@example.com>]");
562
+
563
+ MT("emAsterisk",
564
+ "[em *foo*] bar");
565
+
566
+ MT("emUnderscore",
567
+ "[em _foo_] bar");
568
+
569
+ MT("emInWordAsterisk",
570
+ "foo[em *bar*]hello");
571
+
572
+ MT("emInWordUnderscore",
573
+ "foo[em _bar_]hello");
574
+
575
+ // Per documentation: "...surround an * or _ with spaces, it’ll be
576
+ // treated as a literal asterisk or underscore."
577
+
578
+ MT("emEscapedBySpaceIn",
579
+ "foo [em _bar _ hello_] world");
580
+
581
+ MT("emEscapedBySpaceOut",
582
+ "foo _ bar[em _hello_]world");
583
+
584
+ MT("emEscapedByNewline",
585
+ "foo",
586
+ "_ bar[em _hello_]world");
587
+
588
+ // Unclosed emphasis characters
589
+ // Instead of simply marking as EM / STRONG, it would be nice to have an
590
+ // incomplete flag for EM and STRONG, that is styled slightly different.
591
+ MT("emIncompleteAsterisk",
592
+ "foo [em *bar]");
593
+
594
+ MT("emIncompleteUnderscore",
595
+ "foo [em _bar]");
596
+
597
+ MT("strongAsterisk",
598
+ "[strong **foo**] bar");
599
+
600
+ MT("strongUnderscore",
601
+ "[strong __foo__] bar");
602
+
603
+ MT("emStrongAsterisk",
604
+ "[em *foo][em&strong **bar*][strong hello**] world");
605
+
606
+ MT("emStrongUnderscore",
607
+ "[em _foo][em&strong __bar_][strong hello__] world");
608
+
609
+ // "...same character must be used to open and close an emphasis span.""
610
+ MT("emStrongMixed",
611
+ "[em _foo][em&strong **bar*hello__ world]");
612
+
613
+ MT("emStrongMixed",
614
+ "[em *foo][em&strong __bar_hello** world]");
615
+
616
+ // These characters should be escaped:
617
+ // \ backslash
618
+ // ` backtick
619
+ // * asterisk
620
+ // _ underscore
621
+ // {} curly braces
622
+ // [] square brackets
623
+ // () parentheses
624
+ // # hash mark
625
+ // + plus sign
626
+ // - minus sign (hyphen)
627
+ // . dot
628
+ // ! exclamation mark
629
+
630
+ MT("escapeBacktick",
631
+ "foo \\`bar\\`");
632
+
633
+ MT("doubleEscapeBacktick",
634
+ "foo \\\\[comment `bar\\\\`]");
635
+
636
+ MT("escapeAsterisk",
637
+ "foo \\*bar\\*");
638
+
639
+ MT("doubleEscapeAsterisk",
640
+ "foo \\\\[em *bar\\\\*]");
641
+
642
+ MT("escapeUnderscore",
643
+ "foo \\_bar\\_");
644
+
645
+ MT("doubleEscapeUnderscore",
646
+ "foo \\\\[em _bar\\\\_]");
647
+
648
+ MT("escapeHash",
649
+ "\\# foo");
650
+
651
+ MT("doubleEscapeHash",
652
+ "\\\\# foo");
653
+
654
+
655
+ // Tests to make sure GFM-specific things aren't getting through
656
+
657
+ MT("taskList",
658
+ "[variable-2 * [ ]] bar]");
659
+
660
+ MT("fencedCodeBlocks",
661
+ "[comment ```]",
662
+ "foo",
663
+ "[comment ```]");
664
+ })();