pygments.rb 1.1.1 → 2.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (383) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +13 -0
  3. data/.github/workflows/ci.yml +28 -0
  4. data/.github/workflows/release.yml +24 -0
  5. data/.gitignore +5 -5
  6. data/CHANGELOG.adoc +123 -0
  7. data/Gemfile +3 -1
  8. data/LICENSE +1 -1
  9. data/README.adoc +161 -0
  10. data/Rakefile +13 -19
  11. data/bench.rb +8 -7
  12. data/cache-lexers.rb +3 -2
  13. data/lexers +0 -0
  14. data/lib/pygments.rb +10 -11
  15. data/lib/pygments/lexer.rb +5 -5
  16. data/lib/pygments/mentos.py +23 -66
  17. data/lib/pygments/popen.rb +155 -204
  18. data/lib/pygments/version.rb +2 -2
  19. data/pygments.rb.gemspec +11 -9
  20. data/test/test_pygments.rb +54 -87
  21. data/vendor/pygments-main/{AUTHORS → Pygments-2.7.3.dist-info/AUTHORS} +23 -3
  22. data/vendor/pygments-main/Pygments-2.7.3.dist-info/INSTALLER +1 -0
  23. data/vendor/pygments-main/{LICENSE → Pygments-2.7.3.dist-info/LICENSE} +1 -1
  24. data/vendor/pygments-main/Pygments-2.7.3.dist-info/METADATA +49 -0
  25. data/vendor/pygments-main/Pygments-2.7.3.dist-info/RECORD +482 -0
  26. data/vendor/pygments-main/Pygments-2.7.3.dist-info/REQUESTED +0 -0
  27. data/vendor/pygments-main/Pygments-2.7.3.dist-info/WHEEL +5 -0
  28. data/vendor/pygments-main/Pygments-2.7.3.dist-info/entry_points.txt +3 -0
  29. data/vendor/pygments-main/Pygments-2.7.3.dist-info/top_level.txt +1 -0
  30. data/vendor/pygments-main/bin/pygmentize +8 -0
  31. data/vendor/pygments-main/pygments/__init__.py +6 -11
  32. data/vendor/pygments-main/pygments/__main__.py +18 -0
  33. data/vendor/pygments-main/pygments/cmdline.py +94 -41
  34. data/vendor/pygments-main/pygments/console.py +6 -9
  35. data/vendor/pygments-main/pygments/filter.py +4 -6
  36. data/vendor/pygments-main/pygments/filters/__init__.py +609 -21
  37. data/vendor/pygments-main/pygments/formatter.py +4 -4
  38. data/vendor/pygments-main/pygments/formatters/__init__.py +42 -6
  39. data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -3
  40. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
  41. data/vendor/pygments-main/pygments/formatters/html.py +223 -135
  42. data/vendor/pygments-main/pygments/formatters/img.py +102 -38
  43. data/vendor/pygments-main/pygments/formatters/irc.py +39 -39
  44. data/vendor/pygments-main/pygments/formatters/latex.py +56 -26
  45. data/vendor/pygments-main/pygments/formatters/other.py +12 -8
  46. data/vendor/pygments-main/pygments/formatters/rtf.py +29 -29
  47. data/vendor/pygments-main/pygments/formatters/svg.py +38 -4
  48. data/vendor/pygments-main/pygments/formatters/terminal.py +25 -31
  49. data/vendor/pygments-main/pygments/formatters/terminal256.py +22 -12
  50. data/vendor/pygments-main/pygments/lexer.py +41 -39
  51. data/vendor/pygments-main/pygments/lexers/__init__.py +62 -15
  52. data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +5 -5
  53. data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +15 -15
  54. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +11 -12
  55. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1717 -1338
  56. data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +8 -1
  57. data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +2 -4
  58. data/vendor/pygments-main/pygments/lexers/_mapping.py +79 -33
  59. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +2 -2
  60. data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +1282 -0
  61. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
  62. data/vendor/pygments-main/pygments/lexers/_php_builtins.py +17 -20
  63. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +73 -16
  64. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +2 -2
  65. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +1 -3
  66. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +151 -125
  67. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +6 -4
  68. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
  69. data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +113 -0
  70. data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +280 -0
  71. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
  72. data/vendor/pygments-main/pygments/lexers/actionscript.py +8 -3
  73. data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
  74. data/vendor/pygments-main/pygments/lexers/algebra.py +20 -1
  75. data/vendor/pygments-main/pygments/lexers/ambient.py +1 -1
  76. data/vendor/pygments-main/pygments/lexers/ampl.py +3 -3
  77. data/vendor/pygments-main/pygments/lexers/apl.py +15 -15
  78. data/vendor/pygments-main/pygments/lexers/archetype.py +3 -3
  79. data/vendor/pygments-main/pygments/lexers/arrow.py +117 -0
  80. data/vendor/pygments-main/pygments/lexers/asm.py +445 -70
  81. data/vendor/pygments-main/pygments/lexers/automation.py +3 -3
  82. data/vendor/pygments-main/pygments/lexers/bare.py +104 -0
  83. data/vendor/pygments-main/pygments/lexers/basic.py +166 -4
  84. data/vendor/pygments-main/pygments/lexers/bibtex.py +13 -9
  85. data/vendor/pygments-main/pygments/lexers/boa.py +102 -0
  86. data/vendor/pygments-main/pygments/lexers/business.py +69 -36
  87. data/vendor/pygments-main/pygments/lexers/c_cpp.py +137 -45
  88. data/vendor/pygments-main/pygments/lexers/c_like.py +68 -43
  89. data/vendor/pygments-main/pygments/lexers/capnproto.py +20 -21
  90. data/vendor/pygments-main/pygments/lexers/chapel.py +25 -14
  91. data/vendor/pygments-main/pygments/lexers/clean.py +135 -244
  92. data/vendor/pygments-main/pygments/lexers/compiled.py +1 -1
  93. data/vendor/pygments-main/pygments/lexers/configs.py +188 -37
  94. data/vendor/pygments-main/pygments/lexers/console.py +1 -1
  95. data/vendor/pygments-main/pygments/lexers/crystal.py +31 -23
  96. data/vendor/pygments-main/pygments/lexers/csound.py +288 -187
  97. data/vendor/pygments-main/pygments/lexers/css.py +18 -16
  98. data/vendor/pygments-main/pygments/lexers/d.py +10 -5
  99. data/vendor/pygments-main/pygments/lexers/dalvik.py +1 -1
  100. data/vendor/pygments-main/pygments/lexers/data.py +240 -97
  101. data/vendor/pygments-main/pygments/lexers/devicetree.py +109 -0
  102. data/vendor/pygments-main/pygments/lexers/diff.py +4 -4
  103. data/vendor/pygments-main/pygments/lexers/dotnet.py +40 -24
  104. data/vendor/pygments-main/pygments/lexers/dsls.py +147 -65
  105. data/vendor/pygments-main/pygments/lexers/dylan.py +16 -18
  106. data/vendor/pygments-main/pygments/lexers/ecl.py +16 -2
  107. data/vendor/pygments-main/pygments/lexers/eiffel.py +1 -1
  108. data/vendor/pygments-main/pygments/lexers/elm.py +5 -5
  109. data/vendor/pygments-main/pygments/lexers/email.py +151 -0
  110. data/vendor/pygments-main/pygments/lexers/erlang.py +29 -32
  111. data/vendor/pygments-main/pygments/lexers/esoteric.py +54 -25
  112. data/vendor/pygments-main/pygments/lexers/ezhil.py +24 -15
  113. data/vendor/pygments-main/pygments/lexers/factor.py +1 -1
  114. data/vendor/pygments-main/pygments/lexers/fantom.py +1 -1
  115. data/vendor/pygments-main/pygments/lexers/felix.py +1 -1
  116. data/vendor/pygments-main/pygments/lexers/floscript.py +83 -0
  117. data/vendor/pygments-main/pygments/lexers/forth.py +41 -40
  118. data/vendor/pygments-main/pygments/lexers/fortran.py +5 -4
  119. data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
  120. data/vendor/pygments-main/pygments/lexers/freefem.py +898 -0
  121. data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
  122. data/vendor/pygments-main/pygments/lexers/gdscript.py +346 -0
  123. data/vendor/pygments-main/pygments/lexers/go.py +1 -1
  124. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +63 -6
  125. data/vendor/pygments-main/pygments/lexers/graph.py +14 -9
  126. data/vendor/pygments-main/pygments/lexers/graphics.py +272 -25
  127. data/vendor/pygments-main/pygments/lexers/haskell.py +52 -22
  128. data/vendor/pygments-main/pygments/lexers/haxe.py +6 -6
  129. data/vendor/pygments-main/pygments/lexers/hdl.py +176 -86
  130. data/vendor/pygments-main/pygments/lexers/hexdump.py +18 -12
  131. data/vendor/pygments-main/pygments/lexers/html.py +31 -19
  132. data/vendor/pygments-main/pygments/lexers/idl.py +20 -9
  133. data/vendor/pygments-main/pygments/lexers/igor.py +244 -112
  134. data/vendor/pygments-main/pygments/lexers/inferno.py +2 -2
  135. data/vendor/pygments-main/pygments/lexers/installers.py +1 -1
  136. data/vendor/pygments-main/pygments/lexers/int_fiction.py +40 -15
  137. data/vendor/pygments-main/pygments/lexers/iolang.py +2 -2
  138. data/vendor/pygments-main/pygments/lexers/j.py +3 -3
  139. data/vendor/pygments-main/pygments/lexers/javascript.py +100 -66
  140. data/vendor/pygments-main/pygments/lexers/julia.py +46 -48
  141. data/vendor/pygments-main/pygments/lexers/jvm.py +265 -165
  142. data/vendor/pygments-main/pygments/lexers/lisp.py +882 -804
  143. data/vendor/pygments-main/pygments/lexers/make.py +10 -6
  144. data/vendor/pygments-main/pygments/lexers/markup.py +213 -43
  145. data/vendor/pygments-main/pygments/lexers/math.py +1 -1
  146. data/vendor/pygments-main/pygments/lexers/matlab.py +98 -41
  147. data/vendor/pygments-main/pygments/lexers/mime.py +226 -0
  148. data/vendor/pygments-main/pygments/lexers/ml.py +198 -9
  149. data/vendor/pygments-main/pygments/lexers/modeling.py +26 -18
  150. data/vendor/pygments-main/pygments/lexers/modula2.py +25 -6
  151. data/vendor/pygments-main/pygments/lexers/monte.py +4 -3
  152. data/vendor/pygments-main/pygments/lexers/mosel.py +448 -0
  153. data/vendor/pygments-main/pygments/lexers/ncl.py +85 -244
  154. data/vendor/pygments-main/pygments/lexers/nimrod.py +4 -4
  155. data/vendor/pygments-main/pygments/lexers/nit.py +1 -1
  156. data/vendor/pygments-main/pygments/lexers/nix.py +1 -1
  157. data/vendor/pygments-main/pygments/lexers/oberon.py +17 -1
  158. data/vendor/pygments-main/pygments/lexers/objective.py +16 -16
  159. data/vendor/pygments-main/pygments/lexers/ooc.py +1 -1
  160. data/vendor/pygments-main/pygments/lexers/other.py +1 -1
  161. data/vendor/pygments-main/pygments/lexers/parasail.py +1 -1
  162. data/vendor/pygments-main/pygments/lexers/parsers.py +23 -58
  163. data/vendor/pygments-main/pygments/lexers/pascal.py +23 -23
  164. data/vendor/pygments-main/pygments/lexers/pawn.py +30 -24
  165. data/vendor/pygments-main/pygments/lexers/perl.py +276 -160
  166. data/vendor/pygments-main/pygments/lexers/php.py +64 -10
  167. data/vendor/pygments-main/pygments/lexers/pointless.py +71 -0
  168. data/vendor/pygments-main/pygments/lexers/pony.py +94 -0
  169. data/vendor/pygments-main/pygments/lexers/praat.py +38 -30
  170. data/vendor/pygments-main/pygments/lexers/prolog.py +36 -36
  171. data/vendor/pygments-main/pygments/lexers/promql.py +183 -0
  172. data/vendor/pygments-main/pygments/lexers/python.py +439 -226
  173. data/vendor/pygments-main/pygments/lexers/qvt.py +6 -6
  174. data/vendor/pygments-main/pygments/lexers/r.py +13 -275
  175. data/vendor/pygments-main/pygments/lexers/rdf.py +232 -39
  176. data/vendor/pygments-main/pygments/lexers/rebol.py +8 -8
  177. data/vendor/pygments-main/pygments/lexers/resource.py +2 -2
  178. data/vendor/pygments-main/pygments/lexers/ride.py +139 -0
  179. data/vendor/pygments-main/pygments/lexers/rnc.py +1 -1
  180. data/vendor/pygments-main/pygments/lexers/roboconf.py +1 -1
  181. data/vendor/pygments-main/pygments/lexers/robotframework.py +23 -31
  182. data/vendor/pygments-main/pygments/lexers/ruby.py +22 -24
  183. data/vendor/pygments-main/pygments/lexers/rust.py +86 -71
  184. data/vendor/pygments-main/pygments/lexers/sas.py +7 -7
  185. data/vendor/pygments-main/pygments/lexers/scdoc.py +83 -0
  186. data/vendor/pygments-main/pygments/lexers/scripting.py +75 -13
  187. data/vendor/pygments-main/pygments/lexers/sgf.py +61 -0
  188. data/vendor/pygments-main/pygments/lexers/shell.py +175 -51
  189. data/vendor/pygments-main/pygments/lexers/sieve.py +69 -0
  190. data/vendor/pygments-main/pygments/lexers/slash.py +185 -0
  191. data/vendor/pygments-main/pygments/lexers/smalltalk.py +2 -2
  192. data/vendor/pygments-main/pygments/lexers/smv.py +30 -26
  193. data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
  194. data/vendor/pygments-main/pygments/lexers/solidity.py +92 -0
  195. data/vendor/pygments-main/pygments/lexers/special.py +5 -3
  196. data/vendor/pygments-main/pygments/lexers/sql.py +333 -177
  197. data/vendor/pygments-main/pygments/lexers/stata.py +107 -42
  198. data/vendor/pygments-main/pygments/lexers/supercollider.py +6 -1
  199. data/vendor/pygments-main/pygments/lexers/tcl.py +1 -1
  200. data/vendor/pygments-main/pygments/lexers/templates.py +144 -132
  201. data/vendor/pygments-main/pygments/lexers/teraterm.py +335 -0
  202. data/vendor/pygments-main/pygments/lexers/testing.py +6 -6
  203. data/vendor/pygments-main/pygments/lexers/text.py +2 -1
  204. data/vendor/pygments-main/pygments/lexers/textedit.py +4 -4
  205. data/vendor/pygments-main/pygments/lexers/textfmts.py +146 -13
  206. data/vendor/pygments-main/pygments/lexers/theorem.py +69 -53
  207. data/vendor/pygments-main/pygments/lexers/tnt.py +263 -0
  208. data/vendor/pygments-main/pygments/lexers/trafficscript.py +1 -1
  209. data/vendor/pygments-main/pygments/lexers/typoscript.py +8 -14
  210. data/vendor/pygments-main/pygments/lexers/unicon.py +412 -0
  211. data/vendor/pygments-main/pygments/lexers/urbi.py +14 -1
  212. data/vendor/pygments-main/pygments/lexers/usd.py +90 -0
  213. data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
  214. data/vendor/pygments-main/pygments/lexers/verification.py +15 -12
  215. data/vendor/pygments-main/pygments/lexers/web.py +1 -1
  216. data/vendor/pygments-main/pygments/lexers/webidl.py +299 -0
  217. data/vendor/pygments-main/pygments/lexers/webmisc.py +50 -38
  218. data/vendor/pygments-main/pygments/lexers/whiley.py +11 -12
  219. data/vendor/pygments-main/pygments/lexers/x10.py +1 -1
  220. data/vendor/pygments-main/pygments/lexers/xorg.py +37 -0
  221. data/vendor/pygments-main/pygments/lexers/yang.py +104 -0
  222. data/vendor/pygments-main/pygments/lexers/zig.py +124 -0
  223. data/vendor/pygments-main/pygments/modeline.py +6 -5
  224. data/vendor/pygments-main/pygments/plugin.py +14 -18
  225. data/vendor/pygments-main/pygments/regexopt.py +1 -1
  226. data/vendor/pygments-main/pygments/scanner.py +2 -2
  227. data/vendor/pygments-main/pygments/sphinxext.py +2 -4
  228. data/vendor/pygments-main/pygments/style.py +61 -24
  229. data/vendor/pygments-main/pygments/styles/__init__.py +13 -5
  230. data/vendor/pygments-main/pygments/styles/abap.py +29 -0
  231. data/vendor/pygments-main/pygments/styles/algol.py +1 -1
  232. data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -1
  233. data/vendor/pygments-main/pygments/styles/arduino.py +2 -2
  234. data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
  235. data/vendor/pygments-main/pygments/styles/borland.py +1 -1
  236. data/vendor/pygments-main/pygments/styles/bw.py +1 -1
  237. data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
  238. data/vendor/pygments-main/pygments/styles/default.py +1 -1
  239. data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
  240. data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
  241. data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
  242. data/vendor/pygments-main/pygments/styles/igor.py +1 -1
  243. data/vendor/pygments-main/pygments/styles/inkpot.py +67 -0
  244. data/vendor/pygments-main/pygments/styles/lovelace.py +1 -1
  245. data/vendor/pygments-main/pygments/styles/manni.py +1 -1
  246. data/vendor/pygments-main/pygments/styles/monokai.py +4 -3
  247. data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
  248. data/vendor/pygments-main/pygments/styles/native.py +1 -1
  249. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -1
  250. data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -1
  251. data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
  252. data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
  253. data/vendor/pygments-main/pygments/styles/rainbow_dash.py +89 -0
  254. data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
  255. data/vendor/pygments-main/pygments/styles/sas.py +3 -0
  256. data/vendor/pygments-main/pygments/styles/solarized.py +134 -0
  257. data/vendor/pygments-main/pygments/styles/stata_dark.py +41 -0
  258. data/vendor/pygments-main/pygments/styles/stata_light.py +39 -0
  259. data/vendor/pygments-main/pygments/styles/tango.py +1 -1
  260. data/vendor/pygments-main/pygments/styles/trac.py +1 -1
  261. data/vendor/pygments-main/pygments/styles/vim.py +1 -1
  262. data/vendor/pygments-main/pygments/styles/vs.py +1 -1
  263. data/vendor/pygments-main/pygments/styles/xcode.py +1 -1
  264. data/vendor/pygments-main/pygments/token.py +1 -1
  265. data/vendor/pygments-main/pygments/unistring.py +47 -108
  266. data/vendor/pygments-main/pygments/util.py +19 -95
  267. metadata +72 -138
  268. data/CHANGELOG.md +0 -94
  269. data/README.md +0 -121
  270. data/circle.yml +0 -20
  271. data/test/test_data.c +0 -2581
  272. data/test/test_data.py +0 -514
  273. data/test/test_data_generated +0 -2582
  274. data/vendor/custom_lexers/github.py +0 -565
  275. data/vendor/pygments-main/CHANGES +0 -1163
  276. data/vendor/pygments-main/MANIFEST.in +0 -6
  277. data/vendor/pygments-main/Makefile +0 -65
  278. data/vendor/pygments-main/README.rst +0 -39
  279. data/vendor/pygments-main/REVISION +0 -1
  280. data/vendor/pygments-main/TODO +0 -12
  281. data/vendor/pygments-main/doc/Makefile +0 -153
  282. data/vendor/pygments-main/doc/_static/favicon.ico +0 -0
  283. data/vendor/pygments-main/doc/_static/logo_new.png +0 -0
  284. data/vendor/pygments-main/doc/_static/logo_only.png +0 -0
  285. data/vendor/pygments-main/doc/_templates/docssidebar.html +0 -3
  286. data/vendor/pygments-main/doc/_templates/indexsidebar.html +0 -25
  287. data/vendor/pygments-main/doc/_themes/pygments14/layout.html +0 -98
  288. data/vendor/pygments-main/doc/_themes/pygments14/static/bodybg.png +0 -0
  289. data/vendor/pygments-main/doc/_themes/pygments14/static/docbg.png +0 -0
  290. data/vendor/pygments-main/doc/_themes/pygments14/static/listitem.png +0 -0
  291. data/vendor/pygments-main/doc/_themes/pygments14/static/logo.png +0 -0
  292. data/vendor/pygments-main/doc/_themes/pygments14/static/pocoo.png +0 -0
  293. data/vendor/pygments-main/doc/_themes/pygments14/static/pygments14.css_t +0 -401
  294. data/vendor/pygments-main/doc/_themes/pygments14/theme.conf +0 -15
  295. data/vendor/pygments-main/doc/conf.py +0 -241
  296. data/vendor/pygments-main/doc/docs/api.rst +0 -331
  297. data/vendor/pygments-main/doc/docs/authors.rst +0 -4
  298. data/vendor/pygments-main/doc/docs/changelog.rst +0 -1
  299. data/vendor/pygments-main/doc/docs/cmdline.rst +0 -149
  300. data/vendor/pygments-main/doc/docs/filterdevelopment.rst +0 -71
  301. data/vendor/pygments-main/doc/docs/filters.rst +0 -41
  302. data/vendor/pygments-main/doc/docs/formatterdevelopment.rst +0 -169
  303. data/vendor/pygments-main/doc/docs/formatters.rst +0 -48
  304. data/vendor/pygments-main/doc/docs/index.rst +0 -66
  305. data/vendor/pygments-main/doc/docs/integrate.rst +0 -40
  306. data/vendor/pygments-main/doc/docs/java.rst +0 -70
  307. data/vendor/pygments-main/doc/docs/lexerdevelopment.rst +0 -689
  308. data/vendor/pygments-main/doc/docs/lexers.rst +0 -69
  309. data/vendor/pygments-main/doc/docs/moinmoin.rst +0 -39
  310. data/vendor/pygments-main/doc/docs/plugins.rst +0 -93
  311. data/vendor/pygments-main/doc/docs/quickstart.rst +0 -205
  312. data/vendor/pygments-main/doc/docs/rstdirective.rst +0 -22
  313. data/vendor/pygments-main/doc/docs/styles.rst +0 -201
  314. data/vendor/pygments-main/doc/docs/tokens.rst +0 -372
  315. data/vendor/pygments-main/doc/docs/unicode.rst +0 -58
  316. data/vendor/pygments-main/doc/download.rst +0 -41
  317. data/vendor/pygments-main/doc/faq.rst +0 -139
  318. data/vendor/pygments-main/doc/index.rst +0 -54
  319. data/vendor/pygments-main/doc/languages.rst +0 -154
  320. data/vendor/pygments-main/doc/make.bat +0 -190
  321. data/vendor/pygments-main/doc/pygmentize.1 +0 -94
  322. data/vendor/pygments-main/external/autopygmentize +0 -84
  323. data/vendor/pygments-main/external/lasso-builtins-generator-9.lasso +0 -162
  324. data/vendor/pygments-main/external/markdown-processor.py +0 -67
  325. data/vendor/pygments-main/external/moin-parser.py +0 -112
  326. data/vendor/pygments-main/external/pygments.bashcomp +0 -38
  327. data/vendor/pygments-main/external/rst-directive.py +0 -82
  328. data/vendor/pygments-main/pygmentize +0 -8
  329. data/vendor/pygments-main/pygments/lexers/github.py +0 -565
  330. data/vendor/pygments-main/pygments/styles/stata.py +0 -37
  331. data/vendor/pygments-main/requirements.txt +0 -5
  332. data/vendor/pygments-main/scripts/check_sources.py +0 -211
  333. data/vendor/pygments-main/scripts/debug_lexer.py +0 -246
  334. data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +0 -33
  335. data/vendor/pygments-main/scripts/epydoc.css +0 -280
  336. data/vendor/pygments-main/scripts/find_error.py +0 -1
  337. data/vendor/pygments-main/scripts/get_vimkw.py +0 -74
  338. data/vendor/pygments-main/scripts/pylintrc +0 -301
  339. data/vendor/pygments-main/scripts/vim2pygments.py +0 -935
  340. data/vendor/pygments-main/setup.cfg +0 -10
  341. data/vendor/pygments-main/setup.py +0 -77
  342. data/vendor/pygments-main/tox.ini +0 -7
  343. data/vendor/simplejson/.gitignore +0 -10
  344. data/vendor/simplejson/.travis.yml +0 -5
  345. data/vendor/simplejson/CHANGES.txt +0 -291
  346. data/vendor/simplejson/LICENSE.txt +0 -19
  347. data/vendor/simplejson/MANIFEST.in +0 -5
  348. data/vendor/simplejson/README.rst +0 -19
  349. data/vendor/simplejson/conf.py +0 -179
  350. data/vendor/simplejson/index.rst +0 -628
  351. data/vendor/simplejson/scripts/make_docs.py +0 -18
  352. data/vendor/simplejson/setup.py +0 -104
  353. data/vendor/simplejson/simplejson/__init__.py +0 -510
  354. data/vendor/simplejson/simplejson/_speedups.c +0 -2745
  355. data/vendor/simplejson/simplejson/decoder.py +0 -425
  356. data/vendor/simplejson/simplejson/encoder.py +0 -567
  357. data/vendor/simplejson/simplejson/ordered_dict.py +0 -119
  358. data/vendor/simplejson/simplejson/scanner.py +0 -77
  359. data/vendor/simplejson/simplejson/tests/__init__.py +0 -67
  360. data/vendor/simplejson/simplejson/tests/test_bigint_as_string.py +0 -55
  361. data/vendor/simplejson/simplejson/tests/test_check_circular.py +0 -30
  362. data/vendor/simplejson/simplejson/tests/test_decimal.py +0 -66
  363. data/vendor/simplejson/simplejson/tests/test_decode.py +0 -83
  364. data/vendor/simplejson/simplejson/tests/test_default.py +0 -9
  365. data/vendor/simplejson/simplejson/tests/test_dump.py +0 -67
  366. data/vendor/simplejson/simplejson/tests/test_encode_basestring_ascii.py +0 -46
  367. data/vendor/simplejson/simplejson/tests/test_encode_for_html.py +0 -32
  368. data/vendor/simplejson/simplejson/tests/test_errors.py +0 -34
  369. data/vendor/simplejson/simplejson/tests/test_fail.py +0 -91
  370. data/vendor/simplejson/simplejson/tests/test_float.py +0 -19
  371. data/vendor/simplejson/simplejson/tests/test_indent.py +0 -86
  372. data/vendor/simplejson/simplejson/tests/test_item_sort_key.py +0 -20
  373. data/vendor/simplejson/simplejson/tests/test_namedtuple.py +0 -121
  374. data/vendor/simplejson/simplejson/tests/test_pass1.py +0 -76
  375. data/vendor/simplejson/simplejson/tests/test_pass2.py +0 -14
  376. data/vendor/simplejson/simplejson/tests/test_pass3.py +0 -20
  377. data/vendor/simplejson/simplejson/tests/test_recursion.py +0 -67
  378. data/vendor/simplejson/simplejson/tests/test_scanstring.py +0 -117
  379. data/vendor/simplejson/simplejson/tests/test_separators.py +0 -42
  380. data/vendor/simplejson/simplejson/tests/test_speedups.py +0 -20
  381. data/vendor/simplejson/simplejson/tests/test_tuple.py +0 -49
  382. data/vendor/simplejson/simplejson/tests/test_unicode.py +0 -109
  383. data/vendor/simplejson/simplejson/tool.py +0 -39
@@ -1,4 +0,0 @@
1
- Full contributor list
2
- =====================
3
-
4
- .. include:: ../../AUTHORS
@@ -1 +0,0 @@
1
- .. include:: ../../CHANGES
@@ -1,149 +0,0 @@
1
- .. -*- mode: rst -*-
2
-
3
- ======================
4
- Command Line Interface
5
- ======================
6
-
7
- You can use Pygments from the shell, provided you installed the
8
- :program:`pygmentize` script::
9
-
10
- $ pygmentize test.py
11
- print "Hello World"
12
-
13
- will print the file test.py to standard output, using the Python lexer
14
- (inferred from the file name extension) and the terminal formatter (because
15
- you didn't give an explicit formatter name).
16
-
17
- If you want HTML output::
18
-
19
- $ pygmentize -f html -l python -o test.html test.py
20
-
21
- As you can see, the -l option explicitly selects a lexer. As seen above, if you
22
- give an input file name and it has an extension that Pygments recognizes, you can
23
- omit this option.
24
-
25
- The ``-o`` option gives an output file name. If it is not given, output is
26
- written to stdout.
27
-
28
- The ``-f`` option selects a formatter (as with ``-l``, it can also be omitted
29
- if an output file name is given and has a supported extension).
30
- If no output file name is given and ``-f`` is omitted, the
31
- :class:`.TerminalFormatter` is used.
32
-
33
- The above command could therefore also be given as::
34
-
35
- $ pygmentize -o test.html test.py
36
-
37
- To create a full HTML document, including line numbers and stylesheet (using the
38
- "emacs" style), highlighting the Python file ``test.py`` to ``test.html``::
39
-
40
- $ pygmentize -O full,style=emacs -o test.html test.py
41
-
42
-
43
- Options and filters
44
- -------------------
45
-
46
- Lexer and formatter options can be given using the ``-O`` option::
47
-
48
- $ pygmentize -f html -O style=colorful,linenos=1 -l python test.py
49
-
50
- Be sure to enclose the option string in quotes if it contains any special shell
51
- characters, such as spaces or expansion wildcards like ``*``. If an option
52
- expects a list value, separate the list entries with spaces (you'll have to
53
- quote the option value in this case too, so that the shell doesn't split it).
54
-
55
- Since the ``-O`` option argument is split at commas and expects the split values
56
- to be of the form ``name=value``, you can't give an option value that contains
57
- commas or equals signs. Therefore, an option ``-P`` is provided (as of Pygments
58
- 0.9) that works like ``-O`` but can only pass one option per ``-P``. Its value
59
- can then contain all characters::
60
-
61
- $ pygmentize -P "heading=Pygments, the Python highlighter" ...
62
-
63
- Filters are added to the token stream using the ``-F`` option::
64
-
65
- $ pygmentize -f html -l pascal -F keywordcase:case=upper main.pas
66
-
67
- As you see, options for the filter are given after a colon. As for ``-O``, the
68
- filter name and options must be one shell word, so there may not be any spaces
69
- around the colon.
70
-
71
-
72
- Generating styles
73
- -----------------
74
-
75
- Formatters normally don't output full style information. For example, the HTML
76
- formatter by default only outputs ``<span>`` tags with ``class`` attributes.
77
- Therefore, there's a special ``-S`` option for generating style definitions.
78
- Usage is as follows::
79
-
80
- $ pygmentize -f html -S colorful -a .syntax
81
-
82
- generates a CSS style sheet (because you selected the HTML formatter) for
83
- the "colorful" style prepending a ".syntax" selector to all style rules.
84
-
85
- For an explanation what ``-a`` means for :doc:`a particular formatter
86
- <formatters>`, look for the `arg` argument for the formatter's
87
- :meth:`.get_style_defs()` method.
88
-
89
-
90
- Getting lexer names
91
- -------------------
92
-
93
- .. versionadded:: 1.0
94
-
95
- The ``-N`` option guesses a lexer name for a given filename, so that ::
96
-
97
- $ pygmentize -N setup.py
98
-
99
- will print out ``python``. It won't highlight anything yet. If no specific
100
- lexer is known for that filename, ``text`` is printed.
101
-
102
-
103
- Getting help
104
- ------------
105
-
106
- The ``-L`` option lists lexers, formatters, along with their short
107
- names and supported file name extensions, styles and filters. If you want to see
108
- only one category, give it as an argument::
109
-
110
- $ pygmentize -L filters
111
-
112
- will list only all installed filters.
113
-
114
- The ``-H`` option will give you detailed information (the same that can be found
115
- in this documentation) about a lexer, formatter or filter. Usage is as follows::
116
-
117
- $ pygmentize -H formatter html
118
-
119
- will print the help for the HTML formatter, while ::
120
-
121
- $ pygmentize -H lexer python
122
-
123
- will print the help for the Python lexer, etc.
124
-
125
-
126
- A note on encodings
127
- -------------------
128
-
129
- .. versionadded:: 0.9
130
-
131
- Pygments tries to be smart regarding encodings in the formatting process:
132
-
133
- * If you give an ``encoding`` option, it will be used as the input and
134
- output encoding.
135
-
136
- * If you give an ``outencoding`` option, it will override ``encoding``
137
- as the output encoding.
138
-
139
- * If you give an ``inencoding`` option, it will override ``encoding``
140
- as the input encoding.
141
-
142
- * If you don't give an encoding and have given an output file, the default
143
- encoding for lexer and formatter is the terminal encoding or the default
144
- locale encoding of the system. As a last resort, ``latin1`` is used (which
145
- will pass through all non-ASCII characters).
146
-
147
- * If you don't give an encoding and haven't given an output file (that means
148
- output is written to the console), the default encoding for lexer and
149
- formatter is the terminal encoding (``sys.stdout.encoding``).
@@ -1,71 +0,0 @@
1
- .. -*- mode: rst -*-
2
-
3
- =====================
4
- Write your own filter
5
- =====================
6
-
7
- .. versionadded:: 0.7
8
-
9
- Writing own filters is very easy. All you have to do is to subclass
10
- the `Filter` class and override the `filter` method. Additionally a
11
- filter is instantiated with some keyword arguments you can use to
12
- adjust the behavior of your filter.
13
-
14
-
15
- Subclassing Filters
16
- ===================
17
-
18
- As an example, we write a filter that converts all `Name.Function` tokens
19
- to normal `Name` tokens to make the output less colorful.
20
-
21
- .. sourcecode:: python
22
-
23
- from pygments.util import get_bool_opt
24
- from pygments.token import Name
25
- from pygments.filter import Filter
26
-
27
- class UncolorFilter(Filter):
28
-
29
- def __init__(self, **options):
30
- Filter.__init__(self, **options)
31
- self.class_too = get_bool_opt(options, 'classtoo')
32
-
33
- def filter(self, lexer, stream):
34
- for ttype, value in stream:
35
- if ttype is Name.Function or (self.class_too and
36
- ttype is Name.Class):
37
- ttype = Name
38
- yield ttype, value
39
-
40
- Some notes on the `lexer` argument: that can be quite confusing since it doesn't
41
- need to be a lexer instance. If a filter was added by using the `add_filter()`
42
- function of lexers, that lexer is registered for the filter. In that case
43
- `lexer` will refer to the lexer that has registered the filter. It *can* be used
44
- to access options passed to a lexer. Because it could be `None` you always have
45
- to check for that case if you access it.
46
-
47
-
48
- Using a decorator
49
- =================
50
-
51
- You can also use the `simplefilter` decorator from the `pygments.filter` module:
52
-
53
- .. sourcecode:: python
54
-
55
- from pygments.util import get_bool_opt
56
- from pygments.token import Name
57
- from pygments.filter import simplefilter
58
-
59
-
60
- @simplefilter
61
- def uncolor(self, lexer, stream, options):
62
- class_too = get_bool_opt(options, 'classtoo')
63
- for ttype, value in stream:
64
- if ttype is Name.Function or (class_too and
65
- ttype is Name.Class):
66
- ttype = Name
67
- yield ttype, value
68
-
69
- The decorator automatically subclasses an internal filter class and uses the
70
- decorated function as a method for filtering. (That's why there is a `self`
71
- argument that you probably won't end up using in the method.)
@@ -1,41 +0,0 @@
1
- .. -*- mode: rst -*-
2
-
3
- =======
4
- Filters
5
- =======
6
-
7
- .. versionadded:: 0.7
8
-
9
- You can filter token streams coming from lexers to improve or annotate the
10
- output. For example, you can highlight special words in comments, convert
11
- keywords to upper or lowercase to enforce a style guide etc.
12
-
13
- To apply a filter, you can use the `add_filter()` method of a lexer:
14
-
15
- .. sourcecode:: pycon
16
-
17
- >>> from pygments.lexers import PythonLexer
18
- >>> l = PythonLexer()
19
- >>> # add a filter given by a string and options
20
- >>> l.add_filter('codetagify', case='lower')
21
- >>> l.filters
22
- [<pygments.filters.CodeTagFilter object at 0xb785decc>]
23
- >>> from pygments.filters import KeywordCaseFilter
24
- >>> # or give an instance
25
- >>> l.add_filter(KeywordCaseFilter(case='lower'))
26
-
27
- The `add_filter()` method takes keyword arguments which are forwarded to
28
- the constructor of the filter.
29
-
30
- To get a list of all registered filters by name, you can use the
31
- `get_all_filters()` function from the `pygments.filters` module that returns an
32
- iterable for all known filters.
33
-
34
- If you want to write your own filter, have a look at :doc:`Write your own filter
35
- <filterdevelopment>`.
36
-
37
-
38
- Builtin Filters
39
- ===============
40
-
41
- .. pygmentsdoc:: filters
@@ -1,169 +0,0 @@
1
- .. -*- mode: rst -*-
2
-
3
- ========================
4
- Write your own formatter
5
- ========================
6
-
7
- As well as creating :doc:`your own lexer <lexerdevelopment>`, writing a new
8
- formatter for Pygments is easy and straightforward.
9
-
10
- A formatter is a class that is initialized with some keyword arguments (the
11
- formatter options) and that must provides a `format()` method.
12
- Additionally a formatter should provide a `get_style_defs()` method that
13
- returns the style definitions from the style in a form usable for the
14
- formatter's output format.
15
-
16
-
17
- Quickstart
18
- ==========
19
-
20
- The most basic formatter shipped with Pygments is the `NullFormatter`. It just
21
- sends the value of a token to the output stream:
22
-
23
- .. sourcecode:: python
24
-
25
- from pygments.formatter import Formatter
26
-
27
- class NullFormatter(Formatter):
28
- def format(self, tokensource, outfile):
29
- for ttype, value in tokensource:
30
- outfile.write(value)
31
-
32
- As you can see, the `format()` method is passed two parameters: `tokensource`
33
- and `outfile`. The first is an iterable of ``(token_type, value)`` tuples,
34
- the latter a file like object with a `write()` method.
35
-
36
- Because the formatter is that basic it doesn't overwrite the `get_style_defs()`
37
- method.
38
-
39
-
40
- Styles
41
- ======
42
-
43
- Styles aren't instantiated but their metaclass provides some class functions
44
- so that you can access the style definitions easily.
45
-
46
- Styles are iterable and yield tuples in the form ``(ttype, d)`` where `ttype`
47
- is a token and `d` is a dict with the following keys:
48
-
49
- ``'color'``
50
- Hexadecimal color value (eg: ``'ff0000'`` for red) or `None` if not
51
- defined.
52
-
53
- ``'bold'``
54
- `True` if the value should be bold
55
-
56
- ``'italic'``
57
- `True` if the value should be italic
58
-
59
- ``'underline'``
60
- `True` if the value should be underlined
61
-
62
- ``'bgcolor'``
63
- Hexadecimal color value for the background (eg: ``'eeeeeee'`` for light
64
- gray) or `None` if not defined.
65
-
66
- ``'border'``
67
- Hexadecimal color value for the border (eg: ``'0000aa'`` for a dark
68
- blue) or `None` for no border.
69
-
70
- Additional keys might appear in the future, formatters should ignore all keys
71
- they don't support.
72
-
73
-
74
- HTML 3.2 Formatter
75
- ==================
76
-
77
- For an more complex example, let's implement a HTML 3.2 Formatter. We don't
78
- use CSS but inline markup (``<u>``, ``<font>``, etc). Because this isn't good
79
- style this formatter isn't in the standard library ;-)
80
-
81
- .. sourcecode:: python
82
-
83
- from pygments.formatter import Formatter
84
-
85
- class OldHtmlFormatter(Formatter):
86
-
87
- def __init__(self, **options):
88
- Formatter.__init__(self, **options)
89
-
90
- # create a dict of (start, end) tuples that wrap the
91
- # value of a token so that we can use it in the format
92
- # method later
93
- self.styles = {}
94
-
95
- # we iterate over the `_styles` attribute of a style item
96
- # that contains the parsed style values.
97
- for token, style in self.style:
98
- start = end = ''
99
- # a style item is a tuple in the following form:
100
- # colors are readily specified in hex: 'RRGGBB'
101
- if style['color']:
102
- start += '<font color="#%s">' % style['color']
103
- end = '</font>' + end
104
- if style['bold']:
105
- start += '<b>'
106
- end = '</b>' + end
107
- if style['italic']:
108
- start += '<i>'
109
- end = '</i>' + end
110
- if style['underline']:
111
- start += '<u>'
112
- end = '</u>' + end
113
- self.styles[token] = (start, end)
114
-
115
- def format(self, tokensource, outfile):
116
- # lastval is a string we use for caching
117
- # because it's possible that an lexer yields a number
118
- # of consecutive tokens with the same token type.
119
- # to minimize the size of the generated html markup we
120
- # try to join the values of same-type tokens here
121
- lastval = ''
122
- lasttype = None
123
-
124
- # wrap the whole output with <pre>
125
- outfile.write('<pre>')
126
-
127
- for ttype, value in tokensource:
128
- # if the token type doesn't exist in the stylemap
129
- # we try it with the parent of the token type
130
- # eg: parent of Token.Literal.String.Double is
131
- # Token.Literal.String
132
- while ttype not in self.styles:
133
- ttype = ttype.parent
134
- if ttype == lasttype:
135
- # the current token type is the same of the last
136
- # iteration. cache it
137
- lastval += value
138
- else:
139
- # not the same token as last iteration, but we
140
- # have some data in the buffer. wrap it with the
141
- # defined style and write it to the output file
142
- if lastval:
143
- stylebegin, styleend = self.styles[lasttype]
144
- outfile.write(stylebegin + lastval + styleend)
145
- # set lastval/lasttype to current values
146
- lastval = value
147
- lasttype = ttype
148
-
149
- # if something is left in the buffer, write it to the
150
- # output file, then close the opened <pre> tag
151
- if lastval:
152
- stylebegin, styleend = self.styles[lasttype]
153
- outfile.write(stylebegin + lastval + styleend)
154
- outfile.write('</pre>\n')
155
-
156
- The comments should explain it. Again, this formatter doesn't override the
157
- `get_style_defs()` method. If we would have used CSS classes instead of
158
- inline HTML markup, we would need to generate the CSS first. For that
159
- purpose the `get_style_defs()` method exists:
160
-
161
-
162
- Generating Style Definitions
163
- ============================
164
-
165
- Some formatters like the `LatexFormatter` and the `HtmlFormatter` don't
166
- output inline markup but reference either macros or css classes. Because
167
- the definitions of those are not part of the output, the `get_style_defs()`
168
- method exists. It is passed one parameter (if it's used and how it's used
169
- is up to the formatter) and has to return a string or ``None``.
@@ -1,48 +0,0 @@
1
- .. -*- mode: rst -*-
2
-
3
- ====================
4
- Available formatters
5
- ====================
6
-
7
- This page lists all builtin formatters.
8
-
9
- Common options
10
- ==============
11
-
12
- All formatters support these options:
13
-
14
- `encoding`
15
- If given, must be an encoding name (such as ``"utf-8"``). This will
16
- be used to convert the token strings (which are Unicode strings)
17
- to byte strings in the output (default: ``None``).
18
- It will also be written in an encoding declaration suitable for the
19
- document format if the `full` option is given (e.g. a ``meta
20
- content-type`` directive in HTML or an invocation of the `inputenc`
21
- package in LaTeX).
22
-
23
- If this is ``""`` or ``None``, Unicode strings will be written
24
- to the output file, which most file-like objects do not support.
25
- For example, `pygments.highlight()` will return a Unicode string if
26
- called with no `outfile` argument and a formatter that has `encoding`
27
- set to ``None`` because it uses a `StringIO.StringIO` object that
28
- supports Unicode arguments to `write()`. Using a regular file object
29
- wouldn't work.
30
-
31
- .. versionadded:: 0.6
32
-
33
- `outencoding`
34
- When using Pygments from the command line, any `encoding` option given is
35
- passed to the lexer and the formatter. This is sometimes not desirable,
36
- for example if you want to set the input encoding to ``"guess"``.
37
- Therefore, `outencoding` has been introduced which overrides `encoding`
38
- for the formatter if given.
39
-
40
- .. versionadded:: 0.7
41
-
42
-
43
- Formatter classes
44
- =================
45
-
46
- All these classes are importable from :mod:`pygments.formatters`.
47
-
48
- .. pygmentsdoc:: formatters