highlighting 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +52 -0
  3. data/app/helpers/syntax_helper.rb +2 -0
  4. data/lib/highlighting.rb +6 -0
  5. data/lib/highlighting/version.rb +3 -0
  6. data/vendor/assets/javascripts/prism-abap.js +48 -0
  7. data/vendor/assets/javascripts/prism-abap.min.js +1 -0
  8. data/vendor/assets/javascripts/prism-actionscript.js +17 -0
  9. data/vendor/assets/javascripts/prism-actionscript.min.js +1 -0
  10. data/vendor/assets/javascripts/prism-apacheconf.js +47 -0
  11. data/vendor/assets/javascripts/prism-apacheconf.min.js +1 -0
  12. data/vendor/assets/javascripts/prism-apl.js +29 -0
  13. data/vendor/assets/javascripts/prism-apl.min.js +1 -0
  14. data/vendor/assets/javascripts/prism-applescript.js +20 -0
  15. data/vendor/assets/javascripts/prism-applescript.min.js +1 -0
  16. data/vendor/assets/javascripts/prism-asciidoc.js +271 -0
  17. data/vendor/assets/javascripts/prism-asciidoc.min.js +1 -0
  18. data/vendor/assets/javascripts/prism-aspnet.js +36 -0
  19. data/vendor/assets/javascripts/prism-aspnet.min.js +1 -0
  20. data/vendor/assets/javascripts/prism-autohotkey.js +27 -0
  21. data/vendor/assets/javascripts/prism-autohotkey.min.js +1 -0
  22. data/vendor/assets/javascripts/prism-autoit.js +33 -0
  23. data/vendor/assets/javascripts/prism-autoit.min.js +1 -0
  24. data/vendor/assets/javascripts/prism-bash.js +78 -0
  25. data/vendor/assets/javascripts/prism-bash.min.js +1 -0
  26. data/vendor/assets/javascripts/prism-basic.js +14 -0
  27. data/vendor/assets/javascripts/prism-basic.min.js +1 -0
  28. data/vendor/assets/javascripts/prism-batch.js +99 -0
  29. data/vendor/assets/javascripts/prism-batch.min.js +1 -0
  30. data/vendor/assets/javascripts/prism-bison.js +39 -0
  31. data/vendor/assets/javascripts/prism-bison.min.js +1 -0
  32. data/vendor/assets/javascripts/prism-brainfuck.js +20 -0
  33. data/vendor/assets/javascripts/prism-brainfuck.min.js +1 -0
  34. data/vendor/assets/javascripts/prism-c.js +33 -0
  35. data/vendor/assets/javascripts/prism-c.min.js +1 -0
  36. data/vendor/assets/javascripts/prism-clike.js +26 -0
  37. data/vendor/assets/javascripts/prism-clike.min.js +1 -0
  38. data/vendor/assets/javascripts/prism-coffeescript.js +83 -0
  39. data/vendor/assets/javascripts/prism-coffeescript.min.js +1 -0
  40. data/vendor/assets/javascripts/prism-core.js +434 -0
  41. data/vendor/assets/javascripts/prism-core.min.js +1 -0
  42. data/vendor/assets/javascripts/prism-cpp.js +12 -0
  43. data/vendor/assets/javascripts/prism-cpp.min.js +1 -0
  44. data/vendor/assets/javascripts/prism-crystal.js +53 -0
  45. data/vendor/assets/javascripts/prism-crystal.min.js +1 -0
  46. data/vendor/assets/javascripts/prism-csharp.js +24 -0
  47. data/vendor/assets/javascripts/prism-csharp.min.js +1 -0
  48. data/vendor/assets/javascripts/prism-css-extras.js +15 -0
  49. data/vendor/assets/javascripts/prism-css-extras.min.js +1 -0
  50. data/vendor/assets/javascripts/prism-css.js +48 -0
  51. data/vendor/assets/javascripts/prism-css.min.js +1 -0
  52. data/vendor/assets/javascripts/prism-d.js +64 -0
  53. data/vendor/assets/javascripts/prism-d.min.js +1 -0
  54. data/vendor/assets/javascripts/prism-dart.js +18 -0
  55. data/vendor/assets/javascripts/prism-dart.min.js +1 -0
  56. data/vendor/assets/javascripts/prism-diff.js +20 -0
  57. data/vendor/assets/javascripts/prism-diff.min.js +1 -0
  58. data/vendor/assets/javascripts/prism-docker.js +9 -0
  59. data/vendor/assets/javascripts/prism-docker.min.js +1 -0
  60. data/vendor/assets/javascripts/prism-eiffel.js +24 -0
  61. data/vendor/assets/javascripts/prism-eiffel.min.js +1 -0
  62. data/vendor/assets/javascripts/prism-elixir.js +90 -0
  63. data/vendor/assets/javascripts/prism-elixir.min.js +1 -0
  64. data/vendor/assets/javascripts/prism-erlang.js +41 -0
  65. data/vendor/assets/javascripts/prism-erlang.min.js +1 -0
  66. data/vendor/assets/javascripts/prism-fortran.js +37 -0
  67. data/vendor/assets/javascripts/prism-fortran.min.js +1 -0
  68. data/vendor/assets/javascripts/prism-fsharp.js +33 -0
  69. data/vendor/assets/javascripts/prism-fsharp.min.js +1 -0
  70. data/vendor/assets/javascripts/prism-gherkin.js +78 -0
  71. data/vendor/assets/javascripts/prism-gherkin.min.js +1 -0
  72. data/vendor/assets/javascripts/prism-git.js +68 -0
  73. data/vendor/assets/javascripts/prism-git.min.js +1 -0
  74. data/vendor/assets/javascripts/prism-glsl.js +16 -0
  75. data/vendor/assets/javascripts/prism-glsl.min.js +1 -0
  76. data/vendor/assets/javascripts/prism-go.js +9 -0
  77. data/vendor/assets/javascripts/prism-go.min.js +1 -0
  78. data/vendor/assets/javascripts/prism-groovy.js +51 -0
  79. data/vendor/assets/javascripts/prism-groovy.min.js +1 -0
  80. data/vendor/assets/javascripts/prism-haml.js +154 -0
  81. data/vendor/assets/javascripts/prism-haml.min.js +1 -0
  82. data/vendor/assets/javascripts/prism-handlebars.js +83 -0
  83. data/vendor/assets/javascripts/prism-handlebars.min.js +1 -0
  84. data/vendor/assets/javascripts/prism-haskell.js +32 -0
  85. data/vendor/assets/javascripts/prism-haskell.min.js +1 -0
  86. data/vendor/assets/javascripts/prism-haxe.js +43 -0
  87. data/vendor/assets/javascripts/prism-haxe.min.js +1 -0
  88. data/vendor/assets/javascripts/prism-http.js +50 -0
  89. data/vendor/assets/javascripts/prism-http.min.js +1 -0
  90. data/vendor/assets/javascripts/prism-icon.js +17 -0
  91. data/vendor/assets/javascripts/prism-icon.min.js +1 -0
  92. data/vendor/assets/javascripts/prism-inform7.js +58 -0
  93. data/vendor/assets/javascripts/prism-inform7.min.js +1 -0
  94. data/vendor/assets/javascripts/prism-ini.js +11 -0
  95. data/vendor/assets/javascripts/prism-ini.min.js +1 -0
  96. data/vendor/assets/javascripts/prism-j.js +22 -0
  97. data/vendor/assets/javascripts/prism-j.min.js +1 -0
  98. data/vendor/assets/javascripts/prism-jade.js +198 -0
  99. data/vendor/assets/javascripts/prism-jade.min.js +1 -0
  100. data/vendor/assets/javascripts/prism-java.js +8 -0
  101. data/vendor/assets/javascripts/prism-java.min.js +1 -0
  102. data/vendor/assets/javascripts/prism-javascript.js +45 -0
  103. data/vendor/assets/javascripts/prism-javascript.min.js +1 -0
  104. data/vendor/assets/javascripts/prism-jsx.js +24 -0
  105. data/vendor/assets/javascripts/prism-jsx.min.js +1 -0
  106. data/vendor/assets/javascripts/prism-julia.js +12 -0
  107. data/vendor/assets/javascripts/prism-julia.min.js +1 -0
  108. data/vendor/assets/javascripts/prism-keyman.js +14 -0
  109. data/vendor/assets/javascripts/prism-keyman.min.js +1 -0
  110. data/vendor/assets/javascripts/prism-kotlin.js +68 -0
  111. data/vendor/assets/javascripts/prism-kotlin.min.js +1 -0
  112. data/vendor/assets/javascripts/prism-latex.js +61 -0
  113. data/vendor/assets/javascripts/prism-latex.min.js +1 -0
  114. data/vendor/assets/javascripts/prism-less.js +60 -0
  115. data/vendor/assets/javascripts/prism-less.min.js +1 -0
  116. data/vendor/assets/javascripts/prism-lolcode.js +54 -0
  117. data/vendor/assets/javascripts/prism-lolcode.min.js +1 -0
  118. data/vendor/assets/javascripts/prism-lua.js +17 -0
  119. data/vendor/assets/javascripts/prism-lua.min.js +1 -0
  120. data/vendor/assets/javascripts/prism-makefile.js +31 -0
  121. data/vendor/assets/javascripts/prism-makefile.min.js +1 -0
  122. data/vendor/assets/javascripts/prism-markdown.js +120 -0
  123. data/vendor/assets/javascripts/prism-markdown.min.js +1 -0
  124. data/vendor/assets/javascripts/prism-markup.js +46 -0
  125. data/vendor/assets/javascripts/prism-markup.min.js +1 -0
  126. data/vendor/assets/javascripts/prism-matlab.js +14 -0
  127. data/vendor/assets/javascripts/prism-matlab.min.js +1 -0
  128. data/vendor/assets/javascripts/prism-mel.js +39 -0
  129. data/vendor/assets/javascripts/prism-mel.min.js +1 -0
  130. data/vendor/assets/javascripts/prism-mizar.js +12 -0
  131. data/vendor/assets/javascripts/prism-mizar.min.js +1 -0
  132. data/vendor/assets/javascripts/prism-monkey.js +25 -0
  133. data/vendor/assets/javascripts/prism-monkey.min.js +1 -0
  134. data/vendor/assets/javascripts/prism-nasm.js +24 -0
  135. data/vendor/assets/javascripts/prism-nasm.min.js +1 -0
  136. data/vendor/assets/javascripts/prism-nginx.js +11 -0
  137. data/vendor/assets/javascripts/prism-nginx.min.js +1 -0
  138. data/vendor/assets/javascripts/prism-nim.js +30 -0
  139. data/vendor/assets/javascripts/prism-nim.min.js +1 -0
  140. data/vendor/assets/javascripts/prism-nix.js +39 -0
  141. data/vendor/assets/javascripts/prism-nix.min.js +1 -0
  142. data/vendor/assets/javascripts/prism-nsis.js +19 -0
  143. data/vendor/assets/javascripts/prism-nsis.min.js +1 -0
  144. data/vendor/assets/javascripts/prism-objectivec.js +5 -0
  145. data/vendor/assets/javascripts/prism-objectivec.min.js +1 -0
  146. data/vendor/assets/javascripts/prism-ocaml.js +21 -0
  147. data/vendor/assets/javascripts/prism-ocaml.min.js +1 -0
  148. data/vendor/assets/javascripts/prism-oz.js +21 -0
  149. data/vendor/assets/javascripts/prism-oz.min.js +1 -0
  150. data/vendor/assets/javascripts/prism-parigp.js +27 -0
  151. data/vendor/assets/javascripts/prism-parigp.min.js +1 -0
  152. data/vendor/assets/javascripts/prism-parser.js +66 -0
  153. data/vendor/assets/javascripts/prism-parser.min.js +1 -0
  154. data/vendor/assets/javascripts/prism-pascal.js +50 -0
  155. data/vendor/assets/javascripts/prism-pascal.min.js +1 -0
  156. data/vendor/assets/javascripts/prism-perl.js +140 -0
  157. data/vendor/assets/javascripts/prism-perl.min.js +1 -0
  158. data/vendor/assets/javascripts/prism-php-extras.js +11 -0
  159. data/vendor/assets/javascripts/prism-php-extras.min.js +1 -0
  160. data/vendor/assets/javascripts/prism-php.js +110 -0
  161. data/vendor/assets/javascripts/prism-php.min.js +1 -0
  162. data/vendor/assets/javascripts/prism-powershell.js +48 -0
  163. data/vendor/assets/javascripts/prism-powershell.min.js +1 -0
  164. data/vendor/assets/javascripts/prism-processing.js +18 -0
  165. data/vendor/assets/javascripts/prism-processing.min.js +1 -0
  166. data/vendor/assets/javascripts/prism-prolog.js +17 -0
  167. data/vendor/assets/javascripts/prism-prolog.min.js +1 -0
  168. data/vendor/assets/javascripts/prism-puppet.js +131 -0
  169. data/vendor/assets/javascripts/prism-puppet.min.js +1 -0
  170. data/vendor/assets/javascripts/prism-pure.js +77 -0
  171. data/vendor/assets/javascripts/prism-pure.min.js +1 -0
  172. data/vendor/assets/javascripts/prism-python.js +24 -0
  173. data/vendor/assets/javascripts/prism-python.min.js +1 -0
  174. data/vendor/assets/javascripts/prism-q.js +44 -0
  175. data/vendor/assets/javascripts/prism-q.min.js +1 -0
  176. data/vendor/assets/javascripts/prism-qore.js +17 -0
  177. data/vendor/assets/javascripts/prism-qore.min.js +1 -0
  178. data/vendor/assets/javascripts/prism-r.js +19 -0
  179. data/vendor/assets/javascripts/prism-r.min.js +1 -0
  180. data/vendor/assets/javascripts/prism-rest.js +205 -0
  181. data/vendor/assets/javascripts/prism-rest.min.js +1 -0
  182. data/vendor/assets/javascripts/prism-rip.js +28 -0
  183. data/vendor/assets/javascripts/prism-rip.min.js +1 -0
  184. data/vendor/assets/javascripts/prism-roboconf.js +27 -0
  185. data/vendor/assets/javascripts/prism-roboconf.min.js +1 -0
  186. data/vendor/assets/javascripts/prism-ruby.js +110 -0
  187. data/vendor/assets/javascripts/prism-ruby.min.js +1 -0
  188. data/vendor/assets/javascripts/prism-rust.js +53 -0
  189. data/vendor/assets/javascripts/prism-rust.min.js +1 -0
  190. data/vendor/assets/javascripts/prism-sas.js +31 -0
  191. data/vendor/assets/javascripts/prism-sas.min.js +1 -0
  192. data/vendor/assets/javascripts/prism-sass.js +73 -0
  193. data/vendor/assets/javascripts/prism-sass.min.js +1 -0
  194. data/vendor/assets/javascripts/prism-scala.js +9 -0
  195. data/vendor/assets/javascripts/prism-scala.min.js +1 -0
  196. data/vendor/assets/javascripts/prism-scheme.js +26 -0
  197. data/vendor/assets/javascripts/prism-scheme.min.js +1 -0
  198. data/vendor/assets/javascripts/prism-scss.js +60 -0
  199. data/vendor/assets/javascripts/prism-scss.min.js +1 -0
  200. data/vendor/assets/javascripts/prism-smalltalk.js +31 -0
  201. data/vendor/assets/javascripts/prism-smalltalk.min.js +1 -0
  202. data/vendor/assets/javascripts/prism-smarty.js +127 -0
  203. data/vendor/assets/javascripts/prism-smarty.min.js +1 -0
  204. data/vendor/assets/javascripts/prism-sql.js +17 -0
  205. data/vendor/assets/javascripts/prism-sql.min.js +1 -0
  206. data/vendor/assets/javascripts/prism-stylus.js +102 -0
  207. data/vendor/assets/javascripts/prism-stylus.min.js +1 -0
  208. data/vendor/assets/javascripts/prism-swift.js +24 -0
  209. data/vendor/assets/javascripts/prism-swift.min.js +1 -0
  210. data/vendor/assets/javascripts/prism-tcl.js +43 -0
  211. data/vendor/assets/javascripts/prism-tcl.min.js +1 -0
  212. data/vendor/assets/javascripts/prism-textile.js +254 -0
  213. data/vendor/assets/javascripts/prism-textile.min.js +1 -0
  214. data/vendor/assets/javascripts/prism-twig.js +46 -0
  215. data/vendor/assets/javascripts/prism-twig.min.js +1 -0
  216. data/vendor/assets/javascripts/prism-typescript.js +3 -0
  217. data/vendor/assets/javascripts/prism-typescript.min.js +1 -0
  218. data/vendor/assets/javascripts/prism-verilog.js +17 -0
  219. data/vendor/assets/javascripts/prism-verilog.min.js +1 -0
  220. data/vendor/assets/javascripts/prism-vhdl.js +23 -0
  221. data/vendor/assets/javascripts/prism-vhdl.min.js +1 -0
  222. data/vendor/assets/javascripts/prism-vim.js +10 -0
  223. data/vendor/assets/javascripts/prism-vim.min.js +1 -0
  224. data/vendor/assets/javascripts/prism-wiki.js +81 -0
  225. data/vendor/assets/javascripts/prism-wiki.min.js +1 -0
  226. data/vendor/assets/javascripts/prism-yaml.js +44 -0
  227. data/vendor/assets/javascripts/prism-yaml.min.js +1 -0
  228. data/vendor/assets/javascripts/prism.js +708 -0
  229. data/vendor/assets/stylesheets/prism-coy.css +235 -0
  230. data/vendor/assets/stylesheets/prism-dark.css +128 -0
  231. data/vendor/assets/stylesheets/prism-funky.css +117 -0
  232. data/vendor/assets/stylesheets/prism-okaidia.css +121 -0
  233. data/vendor/assets/stylesheets/prism-tomorrow.css +121 -0
  234. data/vendor/assets/stylesheets/prism-twilight.css +201 -0
  235. data/vendor/assets/stylesheets/prism.css +137 -0
  236. metadata +306 -0
@@ -0,0 +1 @@
1
+ !function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[^\s\w\\]\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\w+|\*)(?=\s*=>)/,"function":[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,"boolean":/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.util.clone(e.languages.puppet)}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism);
@@ -0,0 +1,77 @@
1
+ (function (Prism) {
2
+ Prism.languages.pure = {
3
+ 'inline-lang': {
4
+ pattern: /%<[\s\S]+?%>/,
5
+ inside: {
6
+ 'lang': {
7
+ pattern: /(^%< *)-\*-.+?-\*-/,
8
+ lookbehind: true,
9
+ alias: 'comment'
10
+ },
11
+ 'delimiter': {
12
+ pattern: /^%<.*|%>$/,
13
+ alias: 'punctuation'
14
+ }
15
+ }
16
+ },
17
+ 'comment': [
18
+ {
19
+ pattern: /(^|[^\\])\/\*[\w\W]*?\*\//,
20
+ lookbehind: true
21
+ },
22
+ {
23
+ pattern: /(^|[^\\:])\/\/.*/,
24
+ lookbehind: true
25
+ },
26
+ /#!.+/
27
+ ],
28
+ 'string': /"(?:\\.|[^"\\\r\n])*"/,
29
+ 'number': {
30
+ // The look-behind prevents wrong highlighting of the .. operator
31
+ pattern: /((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,
32
+ lookbehind: true
33
+ },
34
+ 'keyword': /\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,
35
+ 'function': /\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,
36
+ 'special': {
37
+ pattern: /\b__[a-z]+__\b/i,
38
+ alias: 'builtin'
39
+ },
40
+ // Any combination of operator chars can be an operator
41
+ 'operator': /(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/,
42
+ // FIXME: How can we prevent | and , to be highlighted as operator when they are used alone?
43
+ 'punctuation': /[(){}\[\];,|]/
44
+ };
45
+
46
+ var inlineLanguages = [
47
+ 'c',
48
+ { lang: 'c++', alias: 'cpp' },
49
+ 'fortran',
50
+ 'ats',
51
+ 'dsp'
52
+ ];
53
+ var inlineLanguageRe = '%< *-\\*- *{lang}\\d* *-\\*-[\\s\\S]+?%>';
54
+
55
+ inlineLanguages.forEach(function (lang) {
56
+ var alias = lang;
57
+ if (typeof lang !== 'string') {
58
+ alias = lang.alias;
59
+ lang = lang.lang;
60
+ }
61
+ if (Prism.languages[alias]) {
62
+ var o = {};
63
+ o['inline-lang-' + alias] = {
64
+ pattern: RegExp(inlineLanguageRe.replace('{lang}', lang.replace(/([.+*?\/\\(){}\[\]])/g,'\\$1')), 'i'),
65
+ inside: Prism.util.clone(Prism.languages.pure['inline-lang'].inside)
66
+ };
67
+ o['inline-lang-' + alias].inside.rest = Prism.util.clone(Prism.languages[alias]);
68
+ Prism.languages.insertBefore('pure', 'inline-lang', o);
69
+ }
70
+ });
71
+
72
+ // C is the default inline language
73
+ if (Prism.languages.c) {
74
+ Prism.languages.pure['inline-lang'].inside.rest = Prism.util.clone(Prism.languages.c);
75
+ }
76
+
77
+ }(Prism));
@@ -0,0 +1 @@
1
+ !function(e){e.languages.pure={"inline-lang":{pattern:/%<[\s\S]+?%>/,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,"function":/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};var t=["c",{lang:"c++",alias:"cpp"},"fortran","ats","dsp"],a="%< *-\\*- *{lang}\\d* *-\\*-[\\s\\S]+?%>";t.forEach(function(t){var r=t;if("string"!=typeof t&&(r=t.alias,t=t.lang),e.languages[r]){var i={};i["inline-lang-"+r]={pattern:RegExp(a.replace("{lang}",t.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:e.util.clone(e.languages.pure["inline-lang"].inside)},i["inline-lang-"+r].inside.rest=e.util.clone(e.languages[r]),e.languages.insertBefore("pure","inline-lang",i)}}),e.languages.c&&(e.languages.pure["inline-lang"].inside.rest=e.util.clone(e.languages.c))}(Prism);
@@ -0,0 +1,24 @@
1
+ Prism.languages.python= {
2
+ 'triple-quoted-string': {
3
+ pattern: /"""[\s\S]+?"""|'''[\s\S]+?'''/,
4
+ alias: 'string'
5
+ },
6
+ 'comment': {
7
+ pattern: /(^|[^\\])#.*/,
8
+ lookbehind: true
9
+ },
10
+ 'string': /("|')(?:\\?.)*?\1/,
11
+ 'function' : {
12
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,
13
+ lookbehind: true
14
+ },
15
+ 'class-name': {
16
+ pattern: /(\bclass\s+)[a-z0-9_]+/i,
17
+ lookbehind: true
18
+ },
19
+ 'keyword' : /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,
20
+ 'boolean' : /\b(?:True|False)\b/,
21
+ 'number' : /\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
22
+ 'operator' : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
23
+ 'punctuation' : /[{}[\];(),.:]/
24
+ };
@@ -0,0 +1 @@
1
+ Prism.languages.python={"triple-quoted-string":{pattern:/"""[\s\S]+?"""|'''[\s\S]+?'''/,alias:"string"},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/};
@@ -0,0 +1,44 @@
1
+ Prism.languages.q = {
2
+ 'string': /"(?:\\.|[^"\\\r\n])*"/,
3
+ 'comment': [
4
+ // From http://code.kx.com/wiki/Reference/Slash:
5
+ // When / is following a space (or a right parenthesis, bracket, or brace), it is ignored with the rest of the line.
6
+ {
7
+
8
+ pattern: /([\t )\]}])\/.*/,
9
+ lookbehind: true
10
+ },
11
+ // From http://code.kx.com/wiki/Reference/Slash:
12
+ // A line which has / as its first character and contains at least one other non-whitespace character is a whole-line comment and is ignored entirely.
13
+ // A / on a line by itself begins a multiline comment which is terminated by the next \ on a line by itself.
14
+ // If a / is not matched by a \, the multiline comment is unterminated and continues to end of file.
15
+ // The / and \ must be the first char on the line, but may be followed by any amount of whitespace.
16
+ {
17
+ pattern: /(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,
18
+ lookbehind: true
19
+ },
20
+ // From http://code.kx.com/wiki/Reference/Slash:
21
+ // A \ on a line by itself with no preceding matching / will comment to end of file.
22
+ /^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,
23
+
24
+ /^#!.+/m
25
+ ],
26
+ 'symbol': /`(?::\S+|[\w.]*)/,
27
+ 'datetime': {
28
+ pattern: /0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,
29
+ alias: 'number'
30
+ },
31
+ // The negative look-ahead prevents bad highlighting
32
+ // of verbs 0: and 1:
33
+ 'number': /\b-?(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,
34
+ 'keyword': /\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,
35
+ 'adverb': {
36
+ pattern: /['\/\\]:?|\beach\b/,
37
+ alias: 'function'
38
+ },
39
+ 'verb': {
40
+ pattern: /(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?_~=|$&#@^]):?/,
41
+ alias: 'operator'
42
+ },
43
+ 'punctuation': /[(){}\[\];.]/
44
+ };
@@ -0,0 +1 @@
1
+ Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0},/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,/^#!.+/m],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b-?(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?_~=|$&#@^]):?/,alias:"operator"},punctuation:/[(){}\[\];.]/};
@@ -0,0 +1,17 @@
1
+ Prism.languages.qore = Prism.languages.extend('clike', {
2
+ 'comment': {
3
+ pattern: /(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:\/\/|#).*)/,
4
+ lookbehind: true
5
+ },
6
+ // Overridden to allow unescaped multi-line strings
7
+ 'string': /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\])*\1/,
8
+ 'variable': /\$(?!\d)\w+\b/,
9
+ 'keyword': /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:int|float|number|bool|string|date|list)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,
10
+ 'number': /\b(?:0b[01]+|0x[\da-f]*\.?[\da-fp\-]+|\d*\.?\d+e?\d*[df]|\d*\.?\d+)\b/i,
11
+ 'boolean': /\b(?:true|false)\b/i,
12
+ 'operator': {
13
+ pattern: /(^|[^\.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,
14
+ lookbehind: true
15
+ },
16
+ 'function': /\$?\b(?!\d)\w+(?=\()/
17
+ });
@@ -0,0 +1 @@
1
+ Prism.languages.qore=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\])*\1/,variable:/\$(?!\d)\w+\b/,keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:int|float|number|bool|string|date|list)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01]+|0x[\da-f]*\.?[\da-fp\-]+|\d*\.?\d+e?\d*[df]|\d*\.?\d+)\b/i,"boolean":/\b(?:true|false)\b/i,operator:{pattern:/(^|[^\.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},"function":/\$?\b(?!\d)\w+(?=\()/});
@@ -0,0 +1,19 @@
1
+ Prism.languages.r = {
2
+ 'comment': /#.*/,
3
+ 'string': /(['"])(?:\\?.)*?\1/,
4
+ 'percent-operator': {
5
+ // Includes user-defined operators
6
+ // and %%, %*%, %/%, %in%, %o%, %x%
7
+ pattern: /%[^%\s]*%/,
8
+ alias: 'operator'
9
+ },
10
+ 'boolean': /\b(?:TRUE|FALSE)\b/,
11
+ 'ellipsis': /\.\.(?:\.|\d+)/,
12
+ 'number': [
13
+ /\b(?:NaN|Inf)\b/,
14
+ /\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]?\d+)?[iL]?\b/
15
+ ],
16
+ 'keyword': /\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,
17
+ 'operator': /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,
18
+ 'punctuation': /[(){}\[\],;]/
19
+ };
@@ -0,0 +1 @@
1
+ Prism.languages.r={comment:/#.*/,string:/(['"])(?:\\?.)*?\1/,"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},"boolean":/\b(?:TRUE|FALSE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:NaN|Inf)\b/,/\b(?:0x[\dA-Fa-f]+(?:\.\d*)?|\d*\.?\d+)(?:[EePp][+-]?\d+)?[iL]?\b/],keyword:/\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/};
@@ -0,0 +1,205 @@
1
+ Prism.languages.rest = {
2
+ 'table': [
3
+ {
4
+ pattern: /(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,
5
+ lookbehind: true,
6
+ inside: {
7
+ 'punctuation': /\||(?:\+[=-]+)+\+/
8
+ }
9
+ },
10
+ {
11
+ pattern: /(\s*)(?:=+ +)+=+((?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,
12
+ lookbehind: true,
13
+ inside: {
14
+ 'punctuation': /[=-]+/
15
+ }
16
+ }
17
+ ],
18
+
19
+ // Directive-like patterns
20
+
21
+ 'substitution-def': {
22
+ pattern: /(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,
23
+ lookbehind: true,
24
+ inside: {
25
+ 'substitution': {
26
+ pattern: /^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,
27
+ alias: 'attr-value',
28
+ inside: {
29
+ 'punctuation': /^\||\|$/
30
+ }
31
+ },
32
+ 'directive': {
33
+ pattern: /( +)[^:]+::/,
34
+ lookbehind: true,
35
+ alias: 'function',
36
+ inside: {
37
+ 'punctuation': /::$/
38
+ }
39
+ }
40
+ }
41
+ },
42
+ 'link-target': [
43
+ {
44
+ pattern: /(^\s*\.\. )\[[^\]]+\]/m,
45
+ lookbehind: true,
46
+ alias: 'string',
47
+ inside: {
48
+ 'punctuation': /^\[|\]$/
49
+ }
50
+ },
51
+ {
52
+ pattern: /(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,
53
+ lookbehind: true,
54
+ alias: 'string',
55
+ inside: {
56
+ 'punctuation': /^_|:$/
57
+ }
58
+ }
59
+ ],
60
+ 'directive': {
61
+ pattern: /(^\s*\.\. )[^:]+::/m,
62
+ lookbehind: true,
63
+ alias: 'function',
64
+ inside: {
65
+ 'punctuation': /::$/
66
+ }
67
+ },
68
+ 'comment': {
69
+ // The two alternatives try to prevent highlighting of blank comments
70
+ pattern: /(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,
71
+ lookbehind: true
72
+ },
73
+
74
+ 'title': [
75
+ // Overlined and underlined
76
+ {
77
+ pattern: /^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,
78
+ inside: {
79
+ 'punctuation': /^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
80
+ 'important': /.+/
81
+ }
82
+ },
83
+
84
+ // Underlined only
85
+ {
86
+ pattern: /(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,
87
+ lookbehind: true,
88
+ inside: {
89
+ 'punctuation': /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
90
+ 'important': /.+/
91
+ }
92
+ }
93
+ ],
94
+ 'hr': {
95
+ pattern: /((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,
96
+ lookbehind: true,
97
+ alias: 'punctuation'
98
+ },
99
+ 'field': {
100
+ pattern: /(^\s*):[^:\r\n]+:(?= )/m,
101
+ lookbehind: true,
102
+ alias: 'attr-name'
103
+ },
104
+ 'command-line-option': {
105
+ pattern: /(^\s*)(?:[+-][a-z\d]|(?:\-\-|\/)[a-z\d-]+)(?:[ =](?:[a-z][a-z\d_-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:\-\-|\/)[a-z\d-]+)(?:[ =](?:[a-z][a-z\d_-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,
106
+ lookbehind: true,
107
+ alias: 'symbol'
108
+ },
109
+ 'literal-block': {
110
+ pattern: /::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,
111
+ inside: {
112
+ 'literal-block-punctuation': {
113
+ pattern: /^::/,
114
+ alias: 'punctuation'
115
+ }
116
+ }
117
+ },
118
+ 'quoted-literal-block': {
119
+ pattern: /::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,
120
+ inside: {
121
+ 'literal-block-punctuation': {
122
+ pattern: /^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,
123
+ alias: 'punctuation'
124
+ }
125
+ }
126
+ },
127
+ 'list-bullet': {
128
+ pattern: /(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,
129
+ lookbehind: true,
130
+ alias: 'punctuation'
131
+ },
132
+ 'doctest-block': {
133
+ pattern: /(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,
134
+ lookbehind: true,
135
+ inside: {
136
+ 'punctuation': /^>>>/
137
+ }
138
+ },
139
+
140
+ 'inline': [
141
+ {
142
+ pattern: /(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,
143
+ lookbehind: true,
144
+ inside: {
145
+ 'bold': {
146
+ pattern: /(^\*\*).+(?=\*\*$)/,
147
+ lookbehind: true
148
+ },
149
+ 'italic': {
150
+ pattern: /(^\*).+(?=\*$)/,
151
+ lookbehind: true
152
+ },
153
+ 'inline-literal': {
154
+ pattern: /(^``).+(?=``$)/,
155
+ lookbehind: true,
156
+ alias: 'symbol'
157
+ },
158
+ 'role': {
159
+ pattern: /^:[^:]+:|:[^:]+:$/,
160
+ alias: 'function',
161
+ inside: {
162
+ 'punctuation': /^:|:$/
163
+ }
164
+ },
165
+ 'interpreted-text': {
166
+ pattern: /(^`).+(?=`$)/,
167
+ lookbehind: true,
168
+ alias: 'attr-value'
169
+ },
170
+ 'substitution': {
171
+ pattern: /(^\|).+(?=\|$)/,
172
+ lookbehind: true,
173
+ alias: 'attr-value'
174
+ },
175
+ 'punctuation': /\*\*?|``?|\|/
176
+ }
177
+ }
178
+ ],
179
+
180
+ 'link': [
181
+ {
182
+ pattern: /\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,
183
+ alias: 'string',
184
+ inside: {
185
+ 'punctuation': /^\[|\]_$/
186
+ }
187
+ },
188
+ {
189
+ pattern: /(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
190
+ alias: 'string',
191
+ inside: {
192
+ 'punctuation': /^_?`|`$|`?_?_$/
193
+ }
194
+ }
195
+ ],
196
+
197
+ // Line block start,
198
+ // quote attribution,
199
+ // explicit markup start,
200
+ // and anonymous hyperlink target shortcut (__)
201
+ 'punctuation': {
202
+ pattern: /(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,
203
+ lookbehind: true
204
+ }
205
+ };
@@ -0,0 +1 @@
1
+ Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+((?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:\-\-|\/)[a-z\d-]+)(?:[ =](?:[a-z][a-z\d_-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:\-\-|\/)[a-z\d-]+)(?:[ =](?:[a-z][a-z\d_-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}};
@@ -0,0 +1,28 @@
1
+ Prism.languages.rip = {
2
+ 'comment': /#.*/,
3
+
4
+ 'keyword': /(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,
5
+
6
+ 'builtin': /@|\bSystem\b/,
7
+
8
+ 'boolean': /\b(?:true|false)\b/,
9
+
10
+ 'date': /\b\d{4}-\d{2}-\d{2}\b/,
11
+ 'time': /\b\d{2}:\d{2}:\d{2}\b/,
12
+ 'datetime': /\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,
13
+
14
+ 'character': /\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,
15
+
16
+ 'regex': {
17
+ pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/(?=\s*($|[\r\n,.;})]))/,
18
+ lookbehind: true
19
+ },
20
+
21
+ 'symbol': /:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,
22
+ 'string': /("|')(\\?.)*?\1/,
23
+ 'number': /[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,
24
+
25
+ 'punctuation': /(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,
26
+
27
+ 'reference': /[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/
28
+ };
@@ -0,0 +1 @@
1
+ Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,"boolean":/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/(?=\s*($|[\r\n,.;})]))/,lookbehind:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:/("|')(\\?.)*?\1/,number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/};
@@ -0,0 +1,27 @@
1
+ Prism.languages.roboconf = {
2
+ 'comment': /#.*/,
3
+ 'keyword': {
4
+ 'pattern': /(^|\s)(?:(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{)|(?:external|import)\b)/,
5
+ lookbehind: true
6
+ },
7
+ 'component': {
8
+ pattern: /[\w-]+(?=[ \t]*\{)/,
9
+ alias: 'variable'
10
+ },
11
+ 'property': /[\w.-]+(?=[ \t]*:)/,
12
+ 'value': {
13
+ pattern: /(=[ \t]*)[^,;]+/,
14
+ lookbehind: true,
15
+ alias: 'attr-value'
16
+ },
17
+ 'optional': {
18
+ pattern: /\(optional\)/,
19
+ alias: 'builtin'
20
+ },
21
+ 'wildcard': {
22
+ pattern: /(\.)\*/,
23
+ lookbehind: true,
24
+ alias: 'operator'
25
+ },
26
+ 'punctuation': /[{},.;:=]/
27
+ };