pygments.rb 1.2.1 → 2.2.0

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 (386) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +13 -0
  3. data/.github/workflows/ci.yml +40 -0
  4. data/.github/workflows/release.yml +24 -0
  5. data/.gitignore +4 -6
  6. data/.rubocop.yml +16 -0
  7. data/CHANGELOG.adoc +137 -0
  8. data/Gemfile +3 -1
  9. data/LICENSE +1 -1
  10. data/README.adoc +159 -0
  11. data/Rakefile +8 -32
  12. data/bench.rb +14 -8
  13. data/lib/pygments.rb +16 -14
  14. data/lib/pygments/lexer.rb +87 -65
  15. data/lib/pygments/mentos.py +23 -110
  16. data/lib/pygments/popen.rb +188 -284
  17. data/lib/pygments/version.rb +2 -2
  18. data/pygments.rb.gemspec +20 -13
  19. data/test/test_pygments.rb +50 -110
  20. data/vendor/pygments-main/{AUTHORS → Pygments-2.8.1.dist-info/AUTHORS} +26 -3
  21. data/vendor/pygments-main/Pygments-2.8.1.dist-info/INSTALLER +1 -0
  22. data/vendor/pygments-main/{LICENSE → Pygments-2.8.1.dist-info/LICENSE} +1 -1
  23. data/vendor/pygments-main/Pygments-2.8.1.dist-info/METADATA +48 -0
  24. data/vendor/pygments-main/Pygments-2.8.1.dist-info/RECORD +494 -0
  25. data/vendor/pygments-main/Pygments-2.8.1.dist-info/REQUESTED +0 -0
  26. data/vendor/pygments-main/Pygments-2.8.1.dist-info/WHEEL +5 -0
  27. data/vendor/pygments-main/Pygments-2.8.1.dist-info/entry_points.txt +3 -0
  28. data/vendor/pygments-main/Pygments-2.8.1.dist-info/top_level.txt +1 -0
  29. data/vendor/pygments-main/bin/pygmentize +8 -0
  30. data/vendor/pygments-main/pygments/__init__.py +6 -12
  31. data/vendor/pygments-main/pygments/__main__.py +17 -0
  32. data/vendor/pygments-main/pygments/cmdline.py +213 -184
  33. data/vendor/pygments-main/pygments/console.py +6 -10
  34. data/vendor/pygments-main/pygments/filter.py +4 -7
  35. data/vendor/pygments-main/pygments/filters/__init__.py +609 -22
  36. data/vendor/pygments-main/pygments/formatter.py +4 -5
  37. data/vendor/pygments-main/pygments/formatters/__init__.py +10 -10
  38. data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -4
  39. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -2
  40. data/vendor/pygments-main/pygments/formatters/html.py +242 -139
  41. data/vendor/pygments-main/pygments/formatters/img.py +91 -50
  42. data/vendor/pygments-main/pygments/formatters/irc.py +39 -40
  43. data/vendor/pygments-main/pygments/formatters/latex.py +62 -33
  44. data/vendor/pygments-main/pygments/formatters/other.py +18 -17
  45. data/vendor/pygments-main/pygments/formatters/rtf.py +29 -30
  46. data/vendor/pygments-main/pygments/formatters/svg.py +40 -5
  47. data/vendor/pygments-main/pygments/formatters/terminal.py +25 -32
  48. data/vendor/pygments-main/pygments/formatters/terminal256.py +45 -14
  49. data/vendor/pygments-main/pygments/lexer.py +47 -44
  50. data/vendor/pygments-main/pygments/lexers/__init__.py +341 -0
  51. data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1644 -0
  52. data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +231 -0
  53. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +75 -0
  54. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1724 -0
  55. data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +5326 -0
  56. data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +292 -0
  57. data/vendor/pygments-main/pygments/lexers/_mapping.py +554 -0
  58. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1171 -0
  59. data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +1281 -0
  60. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +2600 -0
  61. data/vendor/pygments-main/pygments/lexers/_php_builtins.py +4752 -0
  62. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +677 -0
  63. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3093 -0
  64. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +1160 -0
  65. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +557 -0
  66. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +457 -0
  67. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1003 -0
  68. data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +112 -0
  69. data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +279 -0
  70. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1938 -0
  71. data/vendor/pygments-main/pygments/lexers/actionscript.py +244 -0
  72. data/vendor/pygments-main/pygments/lexers/agile.py +23 -0
  73. data/vendor/pygments-main/pygments/lexers/algebra.py +239 -0
  74. data/vendor/pygments-main/pygments/lexers/ambient.py +75 -0
  75. data/vendor/pygments-main/pygments/lexers/amdgpu.py +48 -0
  76. data/vendor/pygments-main/pygments/lexers/ampl.py +86 -0
  77. data/vendor/pygments-main/pygments/lexers/apl.py +100 -0
  78. data/vendor/pygments-main/pygments/lexers/archetype.py +317 -0
  79. data/vendor/pygments-main/pygments/lexers/arrow.py +116 -0
  80. data/vendor/pygments-main/pygments/lexers/asm.py +1004 -0
  81. data/vendor/pygments-main/pygments/lexers/automation.py +379 -0
  82. data/vendor/pygments-main/pygments/lexers/bare.py +103 -0
  83. data/vendor/pygments-main/pygments/lexers/basic.py +661 -0
  84. data/vendor/pygments-main/pygments/lexers/bibtex.py +159 -0
  85. data/vendor/pygments-main/pygments/lexers/boa.py +101 -0
  86. data/vendor/pygments-main/pygments/lexers/business.py +626 -0
  87. data/vendor/pygments-main/pygments/lexers/c_cpp.py +342 -0
  88. data/vendor/pygments-main/pygments/lexers/c_like.py +565 -0
  89. data/vendor/pygments-main/pygments/lexers/capnproto.py +77 -0
  90. data/vendor/pygments-main/pygments/lexers/cddl.py +190 -0
  91. data/vendor/pygments-main/pygments/lexers/chapel.py +111 -0
  92. data/vendor/pygments-main/pygments/lexers/clean.py +178 -0
  93. data/vendor/pygments-main/pygments/lexers/compiled.py +33 -0
  94. data/vendor/pygments-main/pygments/lexers/configs.py +985 -0
  95. data/vendor/pygments-main/pygments/lexers/console.py +113 -0
  96. data/vendor/pygments-main/pygments/lexers/crystal.py +366 -0
  97. data/vendor/pygments-main/pygments/lexers/csound.py +466 -0
  98. data/vendor/pygments-main/pygments/lexers/css.py +694 -0
  99. data/vendor/pygments-main/pygments/lexers/d.py +255 -0
  100. data/vendor/pygments-main/pygments/lexers/dalvik.py +124 -0
  101. data/vendor/pygments-main/pygments/lexers/data.py +697 -0
  102. data/vendor/pygments-main/pygments/lexers/devicetree.py +108 -0
  103. data/vendor/pygments-main/pygments/lexers/diff.py +164 -0
  104. data/vendor/pygments-main/pygments/lexers/dotnet.py +706 -0
  105. data/vendor/pygments-main/pygments/lexers/dsls.py +959 -0
  106. data/vendor/pygments-main/pygments/lexers/dylan.py +286 -0
  107. data/vendor/pygments-main/pygments/lexers/ecl.py +137 -0
  108. data/vendor/pygments-main/pygments/lexers/eiffel.py +64 -0
  109. data/vendor/pygments-main/pygments/lexers/elm.py +120 -0
  110. data/vendor/pygments-main/pygments/lexers/email.py +150 -0
  111. data/vendor/pygments-main/pygments/lexers/erlang.py +529 -0
  112. data/vendor/pygments-main/pygments/lexers/esoteric.py +303 -0
  113. data/vendor/pygments-main/pygments/lexers/ezhil.py +76 -0
  114. data/vendor/pygments-main/pygments/lexers/factor.py +343 -0
  115. data/vendor/pygments-main/pygments/lexers/fantom.py +249 -0
  116. data/vendor/pygments-main/pygments/lexers/felix.py +272 -0
  117. data/vendor/pygments-main/pygments/lexers/floscript.py +82 -0
  118. data/vendor/pygments-main/pygments/lexers/forth.py +177 -0
  119. data/vendor/pygments-main/pygments/lexers/fortran.py +208 -0
  120. data/vendor/pygments-main/pygments/lexers/foxpro.py +427 -0
  121. data/vendor/pygments-main/pygments/lexers/freefem.py +897 -0
  122. data/vendor/pygments-main/pygments/lexers/functional.py +20 -0
  123. data/vendor/pygments-main/pygments/lexers/futhark.py +110 -0
  124. data/vendor/pygments-main/pygments/lexers/gdscript.py +345 -0
  125. data/vendor/pygments-main/pygments/lexers/go.py +100 -0
  126. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +269 -0
  127. data/vendor/pygments-main/pygments/lexers/graph.py +84 -0
  128. data/vendor/pygments-main/pygments/lexers/graphics.py +799 -0
  129. data/vendor/pygments-main/pygments/lexers/graphviz.py +57 -0
  130. data/vendor/pygments-main/pygments/lexers/haskell.py +869 -0
  131. data/vendor/pygments-main/pygments/lexers/haxe.py +935 -0
  132. data/vendor/pygments-main/pygments/lexers/hdl.py +468 -0
  133. data/vendor/pygments-main/pygments/lexers/hexdump.py +102 -0
  134. data/vendor/pygments-main/pygments/lexers/html.py +613 -0
  135. data/vendor/pygments-main/pygments/lexers/idl.py +280 -0
  136. data/vendor/pygments-main/pygments/lexers/igor.py +419 -0
  137. data/vendor/pygments-main/pygments/lexers/inferno.py +95 -0
  138. data/vendor/pygments-main/pygments/lexers/installers.py +321 -0
  139. data/vendor/pygments-main/pygments/lexers/int_fiction.py +1367 -0
  140. data/vendor/pygments-main/pygments/lexers/iolang.py +62 -0
  141. data/vendor/pygments-main/pygments/lexers/j.py +145 -0
  142. data/vendor/pygments-main/pygments/lexers/javascript.py +1536 -0
  143. data/vendor/pygments-main/pygments/lexers/julia.py +330 -0
  144. data/vendor/pygments-main/pygments/lexers/jvm.py +1739 -0
  145. data/vendor/pygments-main/pygments/lexers/lisp.py +2698 -0
  146. data/vendor/pygments-main/pygments/lexers/make.py +205 -0
  147. data/vendor/pygments-main/pygments/lexers/markup.py +762 -0
  148. data/vendor/pygments-main/pygments/lexers/math.py +20 -0
  149. data/vendor/pygments-main/pygments/lexers/matlab.py +3280 -0
  150. data/vendor/pygments-main/pygments/lexers/mime.py +225 -0
  151. data/vendor/pygments-main/pygments/lexers/ml.py +957 -0
  152. data/vendor/pygments-main/pygments/lexers/modeling.py +365 -0
  153. data/vendor/pygments-main/pygments/lexers/modula2.py +1579 -0
  154. data/vendor/pygments-main/pygments/lexers/monte.py +203 -0
  155. data/vendor/pygments-main/pygments/lexers/mosel.py +447 -0
  156. data/vendor/pygments-main/pygments/lexers/ncl.py +893 -0
  157. data/vendor/pygments-main/pygments/lexers/nimrod.py +158 -0
  158. data/vendor/pygments-main/pygments/lexers/nit.py +63 -0
  159. data/vendor/pygments-main/pygments/lexers/nix.py +135 -0
  160. data/vendor/pygments-main/pygments/lexers/oberon.py +120 -0
  161. data/vendor/pygments-main/pygments/lexers/objective.py +503 -0
  162. data/vendor/pygments-main/pygments/lexers/ooc.py +84 -0
  163. data/vendor/pygments-main/pygments/lexers/other.py +40 -0
  164. data/vendor/pygments-main/pygments/lexers/parasail.py +78 -0
  165. data/vendor/pygments-main/pygments/lexers/parsers.py +799 -0
  166. data/vendor/pygments-main/pygments/lexers/pascal.py +643 -0
  167. data/vendor/pygments-main/pygments/lexers/pawn.py +202 -0
  168. data/vendor/pygments-main/pygments/lexers/perl.py +731 -0
  169. data/vendor/pygments-main/pygments/lexers/php.py +320 -0
  170. data/vendor/pygments-main/pygments/lexers/pointless.py +70 -0
  171. data/vendor/pygments-main/pygments/lexers/pony.py +93 -0
  172. data/vendor/pygments-main/pygments/lexers/praat.py +301 -0
  173. data/vendor/pygments-main/pygments/lexers/prolog.py +305 -0
  174. data/vendor/pygments-main/pygments/lexers/promql.py +182 -0
  175. data/vendor/pygments-main/pygments/lexers/python.py +1158 -0
  176. data/vendor/pygments-main/pygments/lexers/qvt.py +151 -0
  177. data/vendor/pygments-main/pygments/lexers/r.py +190 -0
  178. data/vendor/pygments-main/pygments/lexers/rdf.py +462 -0
  179. data/vendor/pygments-main/pygments/lexers/rebol.py +430 -0
  180. data/vendor/pygments-main/pygments/lexers/resource.py +84 -0
  181. data/vendor/pygments-main/pygments/lexers/ride.py +138 -0
  182. data/vendor/pygments-main/pygments/lexers/rnc.py +66 -0
  183. data/vendor/pygments-main/pygments/lexers/roboconf.py +81 -0
  184. data/vendor/pygments-main/pygments/lexers/robotframework.py +551 -0
  185. data/vendor/pygments-main/pygments/lexers/ruby.py +523 -0
  186. data/vendor/pygments-main/pygments/lexers/rust.py +223 -0
  187. data/vendor/pygments-main/pygments/lexers/sas.py +227 -0
  188. data/vendor/pygments-main/pygments/lexers/scdoc.py +82 -0
  189. data/vendor/pygments-main/pygments/lexers/scripting.py +1283 -0
  190. data/vendor/pygments-main/pygments/lexers/sgf.py +60 -0
  191. data/vendor/pygments-main/pygments/lexers/shell.py +909 -0
  192. data/vendor/pygments-main/pygments/lexers/sieve.py +68 -0
  193. data/vendor/pygments-main/pygments/lexers/slash.py +184 -0
  194. data/vendor/pygments-main/pygments/lexers/smalltalk.py +194 -0
  195. data/vendor/pygments-main/pygments/lexers/smv.py +78 -0
  196. data/vendor/pygments-main/pygments/lexers/snobol.py +82 -0
  197. data/vendor/pygments-main/pygments/lexers/solidity.py +91 -0
  198. data/vendor/pygments-main/pygments/lexers/special.py +106 -0
  199. data/vendor/pygments-main/pygments/lexers/sql.py +832 -0
  200. data/vendor/pygments-main/pygments/lexers/stata.py +170 -0
  201. data/vendor/pygments-main/pygments/lexers/supercollider.py +94 -0
  202. data/vendor/pygments-main/pygments/lexers/tcl.py +144 -0
  203. data/vendor/pygments-main/pygments/lexers/templates.py +2263 -0
  204. data/vendor/pygments-main/pygments/lexers/teraterm.py +334 -0
  205. data/vendor/pygments-main/pygments/lexers/testing.py +206 -0
  206. data/vendor/pygments-main/pygments/lexers/text.py +25 -0
  207. data/vendor/pygments-main/pygments/lexers/textedit.py +168 -0
  208. data/vendor/pygments-main/pygments/lexers/textfmts.py +429 -0
  209. data/vendor/pygments-main/pygments/lexers/theorem.py +476 -0
  210. data/vendor/pygments-main/pygments/lexers/tnt.py +262 -0
  211. data/vendor/pygments-main/pygments/lexers/trafficscript.py +53 -0
  212. data/vendor/pygments-main/pygments/lexers/typoscript.py +218 -0
  213. data/vendor/pygments-main/pygments/lexers/unicon.py +411 -0
  214. data/vendor/pygments-main/pygments/lexers/urbi.py +145 -0
  215. data/vendor/pygments-main/pygments/lexers/usd.py +89 -0
  216. data/vendor/pygments-main/pygments/lexers/varnish.py +189 -0
  217. data/vendor/pygments-main/pygments/lexers/verification.py +113 -0
  218. data/vendor/pygments-main/pygments/lexers/web.py +23 -0
  219. data/vendor/pygments-main/pygments/lexers/webidl.py +298 -0
  220. data/vendor/pygments-main/pygments/lexers/webmisc.py +991 -0
  221. data/vendor/pygments-main/pygments/lexers/whiley.py +115 -0
  222. data/vendor/pygments-main/pygments/lexers/x10.py +68 -0
  223. data/vendor/pygments-main/pygments/lexers/xorg.py +36 -0
  224. data/vendor/pygments-main/pygments/lexers/yang.py +103 -0
  225. data/vendor/pygments-main/pygments/lexers/zig.py +123 -0
  226. data/vendor/pygments-main/pygments/modeline.py +1 -2
  227. data/vendor/pygments-main/pygments/plugin.py +4 -3
  228. data/vendor/pygments-main/pygments/regexopt.py +1 -2
  229. data/vendor/pygments-main/pygments/scanner.py +2 -3
  230. data/vendor/pygments-main/pygments/sphinxext.py +2 -5
  231. data/vendor/pygments-main/pygments/style.py +61 -25
  232. data/vendor/pygments-main/pygments/styles/__init__.py +12 -5
  233. data/vendor/pygments-main/pygments/styles/abap.py +1 -2
  234. data/vendor/pygments-main/pygments/styles/algol.py +1 -2
  235. data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
  236. data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
  237. data/vendor/pygments-main/pygments/styles/autumn.py +1 -2
  238. data/vendor/pygments-main/pygments/styles/borland.py +1 -2
  239. data/vendor/pygments-main/pygments/styles/bw.py +1 -2
  240. data/vendor/pygments-main/pygments/styles/colorful.py +1 -2
  241. data/vendor/pygments-main/pygments/styles/default.py +1 -2
  242. data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
  243. data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
  244. data/vendor/pygments-main/pygments/styles/fruity.py +1 -2
  245. data/vendor/pygments-main/pygments/styles/igor.py +1 -2
  246. data/vendor/pygments-main/pygments/styles/inkpot.py +66 -0
  247. data/vendor/pygments-main/pygments/styles/lovelace.py +1 -2
  248. data/vendor/pygments-main/pygments/styles/manni.py +1 -2
  249. data/vendor/pygments-main/pygments/styles/material.py +118 -0
  250. data/vendor/pygments-main/pygments/styles/monokai.py +4 -4
  251. data/vendor/pygments-main/pygments/styles/murphy.py +1 -2
  252. data/vendor/pygments-main/pygments/styles/native.py +1 -2
  253. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -2
  254. data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -2
  255. data/vendor/pygments-main/pygments/styles/pastie.py +1 -2
  256. data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
  257. data/vendor/pygments-main/pygments/styles/rainbow_dash.py +1 -2
  258. data/vendor/pygments-main/pygments/styles/rrt.py +1 -2
  259. data/vendor/pygments-main/pygments/styles/sas.py +1 -2
  260. data/vendor/pygments-main/pygments/styles/solarized.py +136 -0
  261. data/vendor/pygments-main/pygments/styles/stata_dark.py +40 -0
  262. data/vendor/pygments-main/pygments/styles/{stata.py → stata_light.py} +14 -16
  263. data/vendor/pygments-main/pygments/styles/tango.py +1 -2
  264. data/vendor/pygments-main/pygments/styles/trac.py +1 -2
  265. data/vendor/pygments-main/pygments/styles/vim.py +1 -2
  266. data/vendor/pygments-main/pygments/styles/vs.py +1 -2
  267. data/vendor/pygments-main/pygments/styles/xcode.py +1 -2
  268. data/vendor/pygments-main/pygments/styles/zenburn.py +80 -0
  269. data/vendor/pygments-main/pygments/token.py +1 -2
  270. data/vendor/pygments-main/pygments/unistring.py +47 -109
  271. data/vendor/pygments-main/pygments/util.py +16 -96
  272. metadata +81 -139
  273. data/CHANGELOG.md +0 -111
  274. data/README.md +0 -121
  275. data/cache-lexers.rb +0 -8
  276. data/circle.yml +0 -20
  277. data/test/test_data.c +0 -2581
  278. data/test/test_data.py +0 -514
  279. data/test/test_data_generated +0 -2582
  280. data/vendor/custom_lexers/github.py +0 -565
  281. data/vendor/pygments-main/CHANGES +0 -1186
  282. data/vendor/pygments-main/MANIFEST.in +0 -6
  283. data/vendor/pygments-main/Makefile +0 -65
  284. data/vendor/pygments-main/README.rst +0 -39
  285. data/vendor/pygments-main/REVISION +0 -1
  286. data/vendor/pygments-main/TODO +0 -12
  287. data/vendor/pygments-main/doc/Makefile +0 -153
  288. data/vendor/pygments-main/doc/_static/favicon.ico +0 -0
  289. data/vendor/pygments-main/doc/_static/logo_new.png +0 -0
  290. data/vendor/pygments-main/doc/_static/logo_only.png +0 -0
  291. data/vendor/pygments-main/doc/_templates/docssidebar.html +0 -3
  292. data/vendor/pygments-main/doc/_templates/indexsidebar.html +0 -25
  293. data/vendor/pygments-main/doc/_themes/pygments14/layout.html +0 -98
  294. data/vendor/pygments-main/doc/_themes/pygments14/static/bodybg.png +0 -0
  295. data/vendor/pygments-main/doc/_themes/pygments14/static/docbg.png +0 -0
  296. data/vendor/pygments-main/doc/_themes/pygments14/static/listitem.png +0 -0
  297. data/vendor/pygments-main/doc/_themes/pygments14/static/logo.png +0 -0
  298. data/vendor/pygments-main/doc/_themes/pygments14/static/pocoo.png +0 -0
  299. data/vendor/pygments-main/doc/_themes/pygments14/static/pygments14.css_t +0 -401
  300. data/vendor/pygments-main/doc/_themes/pygments14/theme.conf +0 -15
  301. data/vendor/pygments-main/doc/conf.py +0 -241
  302. data/vendor/pygments-main/doc/docs/api.rst +0 -354
  303. data/vendor/pygments-main/doc/docs/authors.rst +0 -4
  304. data/vendor/pygments-main/doc/docs/changelog.rst +0 -1
  305. data/vendor/pygments-main/doc/docs/cmdline.rst +0 -166
  306. data/vendor/pygments-main/doc/docs/filterdevelopment.rst +0 -71
  307. data/vendor/pygments-main/doc/docs/filters.rst +0 -41
  308. data/vendor/pygments-main/doc/docs/formatterdevelopment.rst +0 -169
  309. data/vendor/pygments-main/doc/docs/formatters.rst +0 -48
  310. data/vendor/pygments-main/doc/docs/index.rst +0 -66
  311. data/vendor/pygments-main/doc/docs/integrate.rst +0 -40
  312. data/vendor/pygments-main/doc/docs/java.rst +0 -70
  313. data/vendor/pygments-main/doc/docs/lexerdevelopment.rst +0 -728
  314. data/vendor/pygments-main/doc/docs/lexers.rst +0 -69
  315. data/vendor/pygments-main/doc/docs/moinmoin.rst +0 -39
  316. data/vendor/pygments-main/doc/docs/plugins.rst +0 -93
  317. data/vendor/pygments-main/doc/docs/quickstart.rst +0 -205
  318. data/vendor/pygments-main/doc/docs/rstdirective.rst +0 -22
  319. data/vendor/pygments-main/doc/docs/styles.rst +0 -201
  320. data/vendor/pygments-main/doc/docs/tokens.rst +0 -372
  321. data/vendor/pygments-main/doc/docs/unicode.rst +0 -58
  322. data/vendor/pygments-main/doc/download.rst +0 -41
  323. data/vendor/pygments-main/doc/faq.rst +0 -139
  324. data/vendor/pygments-main/doc/index.rst +0 -54
  325. data/vendor/pygments-main/doc/languages.rst +0 -154
  326. data/vendor/pygments-main/doc/make.bat +0 -190
  327. data/vendor/pygments-main/doc/pygmentize.1 +0 -94
  328. data/vendor/pygments-main/external/autopygmentize +0 -101
  329. data/vendor/pygments-main/external/lasso-builtins-generator-9.lasso +0 -162
  330. data/vendor/pygments-main/external/markdown-processor.py +0 -67
  331. data/vendor/pygments-main/external/moin-parser.py +0 -112
  332. data/vendor/pygments-main/external/pygments.bashcomp +0 -38
  333. data/vendor/pygments-main/external/rst-directive.py +0 -82
  334. data/vendor/pygments-main/pygmentize +0 -8
  335. data/vendor/pygments-main/requirements.txt +0 -5
  336. data/vendor/pygments-main/scripts/check_sources.py +0 -211
  337. data/vendor/pygments-main/scripts/debug_lexer.py +0 -246
  338. data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +0 -33
  339. data/vendor/pygments-main/scripts/epydoc.css +0 -280
  340. data/vendor/pygments-main/scripts/get_vimkw.py +0 -74
  341. data/vendor/pygments-main/scripts/pylintrc +0 -301
  342. data/vendor/pygments-main/scripts/vim2pygments.py +0 -935
  343. data/vendor/pygments-main/setup.cfg +0 -10
  344. data/vendor/pygments-main/setup.py +0 -77
  345. data/vendor/pygments-main/tox.ini +0 -7
  346. data/vendor/simplejson/.gitignore +0 -10
  347. data/vendor/simplejson/.travis.yml +0 -5
  348. data/vendor/simplejson/CHANGES.txt +0 -291
  349. data/vendor/simplejson/LICENSE.txt +0 -19
  350. data/vendor/simplejson/MANIFEST.in +0 -5
  351. data/vendor/simplejson/README.rst +0 -19
  352. data/vendor/simplejson/conf.py +0 -179
  353. data/vendor/simplejson/index.rst +0 -628
  354. data/vendor/simplejson/scripts/make_docs.py +0 -18
  355. data/vendor/simplejson/setup.py +0 -104
  356. data/vendor/simplejson/simplejson/__init__.py +0 -510
  357. data/vendor/simplejson/simplejson/_speedups.c +0 -2745
  358. data/vendor/simplejson/simplejson/decoder.py +0 -425
  359. data/vendor/simplejson/simplejson/encoder.py +0 -567
  360. data/vendor/simplejson/simplejson/ordered_dict.py +0 -119
  361. data/vendor/simplejson/simplejson/scanner.py +0 -77
  362. data/vendor/simplejson/simplejson/tests/__init__.py +0 -67
  363. data/vendor/simplejson/simplejson/tests/test_bigint_as_string.py +0 -55
  364. data/vendor/simplejson/simplejson/tests/test_check_circular.py +0 -30
  365. data/vendor/simplejson/simplejson/tests/test_decimal.py +0 -66
  366. data/vendor/simplejson/simplejson/tests/test_decode.py +0 -83
  367. data/vendor/simplejson/simplejson/tests/test_default.py +0 -9
  368. data/vendor/simplejson/simplejson/tests/test_dump.py +0 -67
  369. data/vendor/simplejson/simplejson/tests/test_encode_basestring_ascii.py +0 -46
  370. data/vendor/simplejson/simplejson/tests/test_encode_for_html.py +0 -32
  371. data/vendor/simplejson/simplejson/tests/test_errors.py +0 -34
  372. data/vendor/simplejson/simplejson/tests/test_fail.py +0 -91
  373. data/vendor/simplejson/simplejson/tests/test_float.py +0 -19
  374. data/vendor/simplejson/simplejson/tests/test_indent.py +0 -86
  375. data/vendor/simplejson/simplejson/tests/test_item_sort_key.py +0 -20
  376. data/vendor/simplejson/simplejson/tests/test_namedtuple.py +0 -121
  377. data/vendor/simplejson/simplejson/tests/test_pass1.py +0 -76
  378. data/vendor/simplejson/simplejson/tests/test_pass2.py +0 -14
  379. data/vendor/simplejson/simplejson/tests/test_pass3.py +0 -20
  380. data/vendor/simplejson/simplejson/tests/test_recursion.py +0 -67
  381. data/vendor/simplejson/simplejson/tests/test_scanstring.py +0 -117
  382. data/vendor/simplejson/simplejson/tests/test_separators.py +0 -42
  383. data/vendor/simplejson/simplejson/tests/test_speedups.py +0 -20
  384. data/vendor/simplejson/simplejson/tests/test_tuple.py +0 -49
  385. data/vendor/simplejson/simplejson/tests/test_unicode.py +0 -109
  386. 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,166 +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
- Custom Lexers and Formatters
103
- ----------------------------
104
-
105
- .. versionadded:: 2.2
106
-
107
- The ``-x`` flag enables custom lexers and formatters to be loaded
108
- from files relative to the current directory. Create a file with a class named
109
- CustomLexer or CustomFormatter, then specify it on the command line::
110
-
111
- $ pygmentize -l your_lexer.py -f your_formatter.py -x
112
-
113
- You can also specify the name of your class with a colon::
114
-
115
- $ pygmentize -l your_lexer.py:SomeLexer -x
116
-
117
- For more information, see :doc:`the Pygments documentation on Lexer development
118
- <lexerdevelopment>`.
119
-
120
- Getting help
121
- ------------
122
-
123
- The ``-L`` option lists lexers, formatters, along with their short
124
- names and supported file name extensions, styles and filters. If you want to see
125
- only one category, give it as an argument::
126
-
127
- $ pygmentize -L filters
128
-
129
- will list only all installed filters.
130
-
131
- The ``-H`` option will give you detailed information (the same that can be found
132
- in this documentation) about a lexer, formatter or filter. Usage is as follows::
133
-
134
- $ pygmentize -H formatter html
135
-
136
- will print the help for the HTML formatter, while ::
137
-
138
- $ pygmentize -H lexer python
139
-
140
- will print the help for the Python lexer, etc.
141
-
142
-
143
- A note on encodings
144
- -------------------
145
-
146
- .. versionadded:: 0.9
147
-
148
- Pygments tries to be smart regarding encodings in the formatting process:
149
-
150
- * If you give an ``encoding`` option, it will be used as the input and
151
- output encoding.
152
-
153
- * If you give an ``outencoding`` option, it will override ``encoding``
154
- as the output encoding.
155
-
156
- * If you give an ``inencoding`` option, it will override ``encoding``
157
- as the input encoding.
158
-
159
- * If you don't give an encoding and have given an output file, the default
160
- encoding for lexer and formatter is the terminal encoding or the default
161
- locale encoding of the system. As a last resort, ``latin1`` is used (which
162
- will pass through all non-ASCII characters).
163
-
164
- * If you don't give an encoding and haven't given an output file (that means
165
- output is written to the console), the default encoding for lexer and
166
- 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``.