pygments.rb 2.4.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (349) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +8 -8
  3. data/.github/workflows/release.yml +5 -5
  4. data/.gitignore +2 -0
  5. data/.rubocop.yml +1 -1
  6. data/CHANGELOG.adoc +12 -0
  7. data/README.adoc +2 -2
  8. data/lib/pygments/popen.rb +2 -2
  9. data/lib/pygments/version.rb +1 -1
  10. data/pygments.rb.gemspec +3 -3
  11. data/vendor/pygments-main/bin/pygmentize +1 -1
  12. data/vendor/pygments-main/pygments/__init__.py +2 -2
  13. data/vendor/pygments-main/pygments/__main__.py +1 -1
  14. data/vendor/pygments-main/pygments/cmdline.py +12 -12
  15. data/vendor/pygments-main/pygments/console.py +5 -5
  16. data/vendor/pygments-main/pygments/filter.py +2 -3
  17. data/vendor/pygments-main/pygments/filters/__init__.py +4 -4
  18. data/vendor/pygments-main/pygments/formatter.py +6 -1
  19. data/vendor/pygments-main/pygments/formatters/__init__.py +7 -8
  20. data/vendor/pygments-main/pygments/formatters/_mapping.py +0 -0
  21. data/vendor/pygments-main/pygments/formatters/bbcode.py +2 -2
  22. data/vendor/pygments-main/pygments/formatters/groff.py +3 -3
  23. data/vendor/pygments-main/pygments/formatters/html.py +38 -40
  24. data/vendor/pygments-main/pygments/formatters/img.py +51 -11
  25. data/vendor/pygments-main/pygments/formatters/irc.py +1 -1
  26. data/vendor/pygments-main/pygments/formatters/latex.py +24 -27
  27. data/vendor/pygments-main/pygments/formatters/other.py +3 -4
  28. data/vendor/pygments-main/pygments/formatters/pangomarkup.py +2 -2
  29. data/vendor/pygments-main/pygments/formatters/rtf.py +228 -25
  30. data/vendor/pygments-main/pygments/formatters/svg.py +17 -20
  31. data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
  32. data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
  33. data/vendor/pygments-main/pygments/lexer.py +51 -33
  34. data/vendor/pygments-main/pygments/lexers/__init__.py +12 -12
  35. data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +1 -1
  36. data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
  37. data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
  38. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
  39. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1 -1
  40. data/vendor/pygments-main/pygments/lexers/_css_builtins.py +1 -1
  41. data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +1 -1
  42. data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
  43. data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +1 -1
  44. data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +5 -5
  45. data/vendor/pygments-main/pygments/lexers/_luau_builtins.py +62 -0
  46. data/vendor/pygments-main/pygments/lexers/_mapping.py +41 -11
  47. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
  48. data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +3 -3
  49. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
  50. data/vendor/pygments-main/pygments/lexers/_php_builtins.py +3 -3
  51. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +5 -5
  52. data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +1 -1
  53. data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1 -1
  54. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +4 -4
  55. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +3 -3
  56. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +1 -1
  57. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
  58. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
  59. data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
  60. data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
  61. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
  62. data/vendor/pygments-main/pygments/lexers/actionscript.py +6 -8
  63. data/vendor/pygments-main/pygments/lexers/ada.py +3 -3
  64. data/vendor/pygments-main/pygments/lexers/agile.py +3 -1
  65. data/vendor/pygments-main/pygments/lexers/algebra.py +9 -13
  66. data/vendor/pygments-main/pygments/lexers/ambient.py +2 -3
  67. data/vendor/pygments-main/pygments/lexers/amdgpu.py +3 -3
  68. data/vendor/pygments-main/pygments/lexers/ampl.py +2 -3
  69. data/vendor/pygments-main/pygments/lexers/apdlexer.py +4 -3
  70. data/vendor/pygments-main/pygments/lexers/apl.py +2 -3
  71. data/vendor/pygments-main/pygments/lexers/archetype.py +8 -12
  72. data/vendor/pygments-main/pygments/lexers/arrow.py +2 -3
  73. data/vendor/pygments-main/pygments/lexers/arturo.py +2 -3
  74. data/vendor/pygments-main/pygments/lexers/asc.py +4 -4
  75. data/vendor/pygments-main/pygments/lexers/asm.py +28 -15
  76. data/vendor/pygments-main/pygments/lexers/asn1.py +178 -0
  77. data/vendor/pygments-main/pygments/lexers/automation.py +6 -8
  78. data/vendor/pygments-main/pygments/lexers/bare.py +2 -3
  79. data/vendor/pygments-main/pygments/lexers/basic.py +48 -57
  80. data/vendor/pygments-main/pygments/lexers/bdd.py +3 -4
  81. data/vendor/pygments-main/pygments/lexers/berry.py +4 -4
  82. data/vendor/pygments-main/pygments/lexers/bibtex.py +5 -5
  83. data/vendor/pygments-main/pygments/lexers/blueprint.py +173 -0
  84. data/vendor/pygments-main/pygments/lexers/boa.py +4 -4
  85. data/vendor/pygments-main/pygments/lexers/bqn.py +109 -0
  86. data/vendor/pygments-main/pygments/lexers/business.py +21 -22
  87. data/vendor/pygments-main/pygments/lexers/c_cpp.py +9 -4
  88. data/vendor/pygments-main/pygments/lexers/c_like.py +99 -27
  89. data/vendor/pygments-main/pygments/lexers/capnproto.py +2 -3
  90. data/vendor/pygments-main/pygments/lexers/carbon.py +10 -11
  91. data/vendor/pygments-main/pygments/lexers/cddl.py +8 -9
  92. data/vendor/pygments-main/pygments/lexers/chapel.py +2 -3
  93. data/vendor/pygments-main/pygments/lexers/clean.py +2 -1
  94. data/vendor/pygments-main/pygments/lexers/comal.py +2 -1
  95. data/vendor/pygments-main/pygments/lexers/compiled.py +2 -1
  96. data/vendor/pygments-main/pygments/lexers/configs.py +342 -108
  97. data/vendor/pygments-main/pygments/lexers/console.py +5 -5
  98. data/vendor/pygments-main/pygments/lexers/cplint.py +2 -3
  99. data/vendor/pygments-main/pygments/lexers/crystal.py +4 -5
  100. data/vendor/pygments-main/pygments/lexers/csound.py +6 -8
  101. data/vendor/pygments-main/pygments/lexers/css.py +5 -5
  102. data/vendor/pygments-main/pygments/lexers/d.py +4 -3
  103. data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -3
  104. data/vendor/pygments-main/pygments/lexers/data.py +8 -12
  105. data/vendor/pygments-main/pygments/lexers/dax.py +2 -3
  106. data/vendor/pygments-main/pygments/lexers/devicetree.py +2 -3
  107. data/vendor/pygments-main/pygments/lexers/diff.py +7 -6
  108. data/vendor/pygments-main/pygments/lexers/dns.py +109 -0
  109. data/vendor/pygments-main/pygments/lexers/dotnet.py +19 -14
  110. data/vendor/pygments-main/pygments/lexers/dsls.py +24 -35
  111. data/vendor/pygments-main/pygments/lexers/dylan.py +8 -16
  112. data/vendor/pygments-main/pygments/lexers/ecl.py +2 -3
  113. data/vendor/pygments-main/pygments/lexers/eiffel.py +3 -4
  114. data/vendor/pygments-main/pygments/lexers/elm.py +3 -4
  115. data/vendor/pygments-main/pygments/lexers/elpi.py +28 -21
  116. data/vendor/pygments-main/pygments/lexers/email.py +3 -3
  117. data/vendor/pygments-main/pygments/lexers/erlang.py +22 -24
  118. data/vendor/pygments-main/pygments/lexers/esoteric.py +11 -12
  119. data/vendor/pygments-main/pygments/lexers/ezhil.py +2 -3
  120. data/vendor/pygments-main/pygments/lexers/factor.py +2 -3
  121. data/vendor/pygments-main/pygments/lexers/fantom.py +3 -3
  122. data/vendor/pygments-main/pygments/lexers/felix.py +9 -10
  123. data/vendor/pygments-main/pygments/lexers/fift.py +2 -1
  124. data/vendor/pygments-main/pygments/lexers/floscript.py +2 -3
  125. data/vendor/pygments-main/pygments/lexers/forth.py +2 -3
  126. data/vendor/pygments-main/pygments/lexers/fortran.py +6 -7
  127. data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
  128. data/vendor/pygments-main/pygments/lexers/freefem.py +2 -3
  129. data/vendor/pygments-main/pygments/lexers/func.py +3 -1
  130. data/vendor/pygments-main/pygments/lexers/functional.py +2 -1
  131. data/vendor/pygments-main/pygments/lexers/futhark.py +6 -7
  132. data/vendor/pygments-main/pygments/lexers/gcodelexer.py +3 -3
  133. data/vendor/pygments-main/pygments/lexers/gdscript.py +2 -1
  134. data/vendor/pygments-main/pygments/lexers/go.py +3 -4
  135. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +6 -9
  136. data/vendor/pygments-main/pygments/lexers/graph.py +12 -9
  137. data/vendor/pygments-main/pygments/lexers/graphics.py +13 -17
  138. data/vendor/pygments-main/pygments/lexers/graphql.py +176 -0
  139. data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -3
  140. data/vendor/pygments-main/pygments/lexers/gsql.py +2 -3
  141. data/vendor/pygments-main/pygments/lexers/haskell.py +27 -32
  142. data/vendor/pygments-main/pygments/lexers/haxe.py +3 -5
  143. data/vendor/pygments-main/pygments/lexers/hdl.py +8 -7
  144. data/vendor/pygments-main/pygments/lexers/hexdump.py +3 -3
  145. data/vendor/pygments-main/pygments/lexers/html.py +34 -13
  146. data/vendor/pygments-main/pygments/lexers/idl.py +2 -3
  147. data/vendor/pygments-main/pygments/lexers/igor.py +305 -290
  148. data/vendor/pygments-main/pygments/lexers/inferno.py +2 -3
  149. data/vendor/pygments-main/pygments/lexers/installers.py +7 -9
  150. data/vendor/pygments-main/pygments/lexers/int_fiction.py +150 -162
  151. data/vendor/pygments-main/pygments/lexers/iolang.py +2 -3
  152. data/vendor/pygments-main/pygments/lexers/j.py +2 -3
  153. data/vendor/pygments-main/pygments/lexers/javascript.py +18 -19
  154. data/vendor/pygments-main/pygments/lexers/jmespath.py +2 -1
  155. data/vendor/pygments-main/pygments/lexers/jslt.py +2 -3
  156. data/vendor/pygments-main/pygments/lexers/jsonnet.py +4 -3
  157. data/vendor/pygments-main/pygments/lexers/jsx.py +75 -0
  158. data/vendor/pygments-main/pygments/lexers/julia.py +4 -5
  159. data/vendor/pygments-main/pygments/lexers/jvm.py +98 -116
  160. data/vendor/pygments-main/pygments/lexers/kuin.py +2 -3
  161. data/vendor/pygments-main/pygments/lexers/kusto.py +93 -0
  162. data/vendor/pygments-main/pygments/lexers/ldap.py +155 -0
  163. data/vendor/pygments-main/pygments/lexers/lean.py +241 -0
  164. data/vendor/pygments-main/pygments/lexers/lilypond.py +2 -3
  165. data/vendor/pygments-main/pygments/lexers/lisp.py +373 -65
  166. data/vendor/pygments-main/pygments/lexers/macaulay2.py +53 -4
  167. data/vendor/pygments-main/pygments/lexers/make.py +7 -5
  168. data/vendor/pygments-main/pygments/lexers/markup.py +242 -91
  169. data/vendor/pygments-main/pygments/lexers/math.py +2 -1
  170. data/vendor/pygments-main/pygments/lexers/matlab.py +10 -12
  171. data/vendor/pygments-main/pygments/lexers/maxima.py +2 -3
  172. data/vendor/pygments-main/pygments/lexers/meson.py +2 -3
  173. data/vendor/pygments-main/pygments/lexers/mime.py +4 -4
  174. data/vendor/pygments-main/pygments/lexers/minecraft.py +24 -27
  175. data/vendor/pygments-main/pygments/lexers/mips.py +3 -1
  176. data/vendor/pygments-main/pygments/lexers/ml.py +59 -61
  177. data/vendor/pygments-main/pygments/lexers/modeling.py +19 -22
  178. data/vendor/pygments-main/pygments/lexers/modula2.py +2 -3
  179. data/vendor/pygments-main/pygments/lexers/mojo.py +704 -0
  180. data/vendor/pygments-main/pygments/lexers/monte.py +2 -3
  181. data/vendor/pygments-main/pygments/lexers/mosel.py +3 -3
  182. data/vendor/pygments-main/pygments/lexers/ncl.py +4 -3
  183. data/vendor/pygments-main/pygments/lexers/nimrod.py +7 -8
  184. data/vendor/pygments-main/pygments/lexers/nit.py +2 -3
  185. data/vendor/pygments-main/pygments/lexers/nix.py +40 -31
  186. data/vendor/pygments-main/pygments/lexers/oberon.py +3 -3
  187. data/vendor/pygments-main/pygments/lexers/objective.py +14 -6
  188. data/vendor/pygments-main/pygments/lexers/ooc.py +2 -3
  189. data/vendor/pygments-main/pygments/lexers/openscad.py +96 -0
  190. data/vendor/pygments-main/pygments/lexers/other.py +2 -1
  191. data/vendor/pygments-main/pygments/lexers/parasail.py +2 -3
  192. data/vendor/pygments-main/pygments/lexers/parsers.py +41 -44
  193. data/vendor/pygments-main/pygments/lexers/pascal.py +6 -3
  194. data/vendor/pygments-main/pygments/lexers/pawn.py +5 -5
  195. data/vendor/pygments-main/pygments/lexers/perl.py +3 -3
  196. data/vendor/pygments-main/pygments/lexers/phix.py +2 -3
  197. data/vendor/pygments-main/pygments/lexers/php.py +4 -5
  198. data/vendor/pygments-main/pygments/lexers/pointless.py +2 -3
  199. data/vendor/pygments-main/pygments/lexers/pony.py +3 -3
  200. data/vendor/pygments-main/pygments/lexers/praat.py +2 -3
  201. data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
  202. data/vendor/pygments-main/pygments/lexers/prolog.py +23 -9
  203. data/vendor/pygments-main/pygments/lexers/promql.py +2 -1
  204. data/vendor/pygments-main/pygments/lexers/prql.py +251 -0
  205. data/vendor/pygments-main/pygments/lexers/ptx.py +119 -0
  206. data/vendor/pygments-main/pygments/lexers/python.py +24 -24
  207. data/vendor/pygments-main/pygments/lexers/q.py +5 -6
  208. data/vendor/pygments-main/pygments/lexers/qlik.py +3 -3
  209. data/vendor/pygments-main/pygments/lexers/qvt.py +5 -3
  210. data/vendor/pygments-main/pygments/lexers/r.py +8 -6
  211. data/vendor/pygments-main/pygments/lexers/rdf.py +19 -13
  212. data/vendor/pygments-main/pygments/lexers/rebol.py +7 -7
  213. data/vendor/pygments-main/pygments/lexers/resource.py +5 -6
  214. data/vendor/pygments-main/pygments/lexers/ride.py +4 -5
  215. data/vendor/pygments-main/pygments/lexers/rita.py +2 -3
  216. data/vendor/pygments-main/pygments/lexers/rnc.py +2 -3
  217. data/vendor/pygments-main/pygments/lexers/roboconf.py +5 -5
  218. data/vendor/pygments-main/pygments/lexers/robotframework.py +2 -3
  219. data/vendor/pygments-main/pygments/lexers/ruby.py +8 -13
  220. data/vendor/pygments-main/pygments/lexers/rust.py +9 -10
  221. data/vendor/pygments-main/pygments/lexers/sas.py +3 -3
  222. data/vendor/pygments-main/pygments/lexers/savi.py +131 -130
  223. data/vendor/pygments-main/pygments/lexers/scdoc.py +13 -7
  224. data/vendor/pygments-main/pygments/lexers/scripting.py +354 -42
  225. data/vendor/pygments-main/pygments/lexers/sgf.py +2 -3
  226. data/vendor/pygments-main/pygments/lexers/shell.py +107 -129
  227. data/vendor/pygments-main/pygments/lexers/sieve.py +3 -3
  228. data/vendor/pygments-main/pygments/lexers/slash.py +4 -5
  229. data/vendor/pygments-main/pygments/lexers/smalltalk.py +3 -5
  230. data/vendor/pygments-main/pygments/lexers/smithy.py +2 -3
  231. data/vendor/pygments-main/pygments/lexers/smv.py +3 -3
  232. data/vendor/pygments-main/pygments/lexers/snobol.py +3 -3
  233. data/vendor/pygments-main/pygments/lexers/solidity.py +3 -3
  234. data/vendor/pygments-main/pygments/lexers/soong.py +78 -0
  235. data/vendor/pygments-main/pygments/lexers/sophia.py +3 -4
  236. data/vendor/pygments-main/pygments/lexers/special.py +8 -3
  237. data/vendor/pygments-main/pygments/lexers/spice.py +15 -16
  238. data/vendor/pygments-main/pygments/lexers/sql.py +24 -18
  239. data/vendor/pygments-main/pygments/lexers/srcinfo.py +3 -3
  240. data/vendor/pygments-main/pygments/lexers/stata.py +2 -3
  241. data/vendor/pygments-main/pygments/lexers/supercollider.py +2 -3
  242. data/vendor/pygments-main/pygments/lexers/tact.py +303 -0
  243. data/vendor/pygments-main/pygments/lexers/tal.py +13 -10
  244. data/vendor/pygments-main/pygments/lexers/tcl.py +2 -3
  245. data/vendor/pygments-main/pygments/lexers/teal.py +2 -3
  246. data/vendor/pygments-main/pygments/lexers/templates.py +131 -72
  247. data/vendor/pygments-main/pygments/lexers/teraterm.py +2 -3
  248. data/vendor/pygments-main/pygments/lexers/testing.py +4 -5
  249. data/vendor/pygments-main/pygments/lexers/text.py +2 -1
  250. data/vendor/pygments-main/pygments/lexers/textedit.py +9 -6
  251. data/vendor/pygments-main/pygments/lexers/textfmts.py +20 -15
  252. data/vendor/pygments-main/pygments/lexers/theorem.py +41 -115
  253. data/vendor/pygments-main/pygments/lexers/thingsdb.py +50 -26
  254. data/vendor/pygments-main/pygments/lexers/tlb.py +3 -1
  255. data/vendor/pygments-main/pygments/lexers/tls.py +54 -0
  256. data/vendor/pygments-main/pygments/lexers/tnt.py +2 -3
  257. data/vendor/pygments-main/pygments/lexers/trafficscript.py +3 -3
  258. data/vendor/pygments-main/pygments/lexers/typoscript.py +6 -7
  259. data/vendor/pygments-main/pygments/lexers/typst.py +104 -0
  260. data/vendor/pygments-main/pygments/lexers/ul4.py +47 -5
  261. data/vendor/pygments-main/pygments/lexers/unicon.py +9 -7
  262. data/vendor/pygments-main/pygments/lexers/urbi.py +3 -3
  263. data/vendor/pygments-main/pygments/lexers/usd.py +6 -11
  264. data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
  265. data/vendor/pygments-main/pygments/lexers/verification.py +4 -5
  266. data/vendor/pygments-main/pygments/lexers/verifpal.py +65 -0
  267. data/vendor/pygments-main/pygments/lexers/vip.py +150 -0
  268. data/vendor/pygments-main/pygments/lexers/vyper.py +140 -0
  269. data/vendor/pygments-main/pygments/lexers/web.py +2 -1
  270. data/vendor/pygments-main/pygments/lexers/webassembly.py +2 -3
  271. data/vendor/pygments-main/pygments/lexers/webidl.py +2 -3
  272. data/vendor/pygments-main/pygments/lexers/webmisc.py +11 -15
  273. data/vendor/pygments-main/pygments/lexers/wgsl.py +6 -7
  274. data/vendor/pygments-main/pygments/lexers/whiley.py +2 -3
  275. data/vendor/pygments-main/pygments/lexers/wowtoc.py +3 -3
  276. data/vendor/pygments-main/pygments/lexers/wren.py +3 -4
  277. data/vendor/pygments-main/pygments/lexers/x10.py +6 -7
  278. data/vendor/pygments-main/pygments/lexers/xorg.py +2 -1
  279. data/vendor/pygments-main/pygments/lexers/yang.py +2 -3
  280. data/vendor/pygments-main/pygments/lexers/yara.py +69 -0
  281. data/vendor/pygments-main/pygments/lexers/zig.py +2 -1
  282. data/vendor/pygments-main/pygments/modeline.py +4 -4
  283. data/vendor/pygments-main/pygments/plugin.py +3 -19
  284. data/vendor/pygments-main/pygments/regexopt.py +1 -1
  285. data/vendor/pygments-main/pygments/scanner.py +1 -1
  286. data/vendor/pygments-main/pygments/sphinxext.py +38 -8
  287. data/vendor/pygments-main/pygments/style.py +8 -2
  288. data/vendor/pygments-main/pygments/styles/__init__.py +17 -59
  289. data/vendor/pygments-main/pygments/styles/_mapping.py +54 -0
  290. data/vendor/pygments-main/pygments/styles/abap.py +5 -1
  291. data/vendor/pygments-main/pygments/styles/algol.py +5 -1
  292. data/vendor/pygments-main/pygments/styles/algol_nu.py +5 -1
  293. data/vendor/pygments-main/pygments/styles/arduino.py +76 -72
  294. data/vendor/pygments-main/pygments/styles/autumn.py +6 -1
  295. data/vendor/pygments-main/pygments/styles/borland.py +6 -1
  296. data/vendor/pygments-main/pygments/styles/bw.py +6 -1
  297. data/vendor/pygments-main/pygments/styles/coffee.py +80 -0
  298. data/vendor/pygments-main/pygments/styles/colorful.py +6 -1
  299. data/vendor/pygments-main/pygments/styles/default.py +6 -1
  300. data/vendor/pygments-main/pygments/styles/dracula.py +68 -80
  301. data/vendor/pygments-main/pygments/styles/emacs.py +6 -1
  302. data/vendor/pygments-main/pygments/styles/friendly.py +6 -1
  303. data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +6 -1
  304. data/vendor/pygments-main/pygments/styles/fruity.py +7 -1
  305. data/vendor/pygments-main/pygments/styles/gh_dark.py +7 -1
  306. data/vendor/pygments-main/pygments/styles/gruvbox.py +10 -1
  307. data/vendor/pygments-main/pygments/styles/igor.py +6 -1
  308. data/vendor/pygments-main/pygments/styles/inkpot.py +7 -2
  309. data/vendor/pygments-main/pygments/styles/lightbulb.py +110 -0
  310. data/vendor/pygments-main/pygments/styles/lilypond.py +8 -2
  311. data/vendor/pygments-main/pygments/styles/lovelace.py +16 -10
  312. data/vendor/pygments-main/pygments/styles/manni.py +7 -2
  313. data/vendor/pygments-main/pygments/styles/material.py +21 -14
  314. data/vendor/pygments-main/pygments/styles/monokai.py +16 -10
  315. data/vendor/pygments-main/pygments/styles/murphy.py +7 -2
  316. data/vendor/pygments-main/pygments/styles/native.py +10 -5
  317. data/vendor/pygments-main/pygments/styles/nord.py +9 -3
  318. data/vendor/pygments-main/pygments/styles/onedark.py +6 -2
  319. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +7 -2
  320. data/vendor/pygments-main/pygments/styles/paraiso_light.py +7 -2
  321. data/vendor/pygments-main/pygments/styles/pastie.py +7 -1
  322. data/vendor/pygments-main/pygments/styles/perldoc.py +7 -1
  323. data/vendor/pygments-main/pygments/styles/rainbow_dash.py +26 -19
  324. data/vendor/pygments-main/pygments/styles/rrt.py +8 -2
  325. data/vendor/pygments-main/pygments/styles/sas.py +6 -1
  326. data/vendor/pygments-main/pygments/styles/solarized.py +9 -1
  327. data/vendor/pygments-main/pygments/styles/staroffice.py +6 -1
  328. data/vendor/pygments-main/pygments/styles/stata_dark.py +6 -2
  329. data/vendor/pygments-main/pygments/styles/stata_light.py +6 -1
  330. data/vendor/pygments-main/pygments/styles/tango.py +7 -3
  331. data/vendor/pygments-main/pygments/styles/trac.py +7 -1
  332. data/vendor/pygments-main/pygments/styles/vim.py +7 -1
  333. data/vendor/pygments-main/pygments/styles/vs.py +7 -2
  334. data/vendor/pygments-main/pygments/styles/xcode.py +6 -1
  335. data/vendor/pygments-main/pygments/styles/zenburn.py +6 -1
  336. data/vendor/pygments-main/pygments/token.py +2 -1
  337. data/vendor/pygments-main/pygments/unistring.py +5 -5
  338. data/vendor/pygments-main/pygments/util.py +13 -19
  339. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/METADATA +14 -13
  340. data/vendor/pygments-main/pygments-2.18.0.dist-info/RECORD +663 -0
  341. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/WHEEL +1 -2
  342. data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/AUTHORS +13 -0
  343. metadata +41 -17
  344. data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +0 -614
  345. data/vendor/pygments-main/Pygments-2.15.1.dist-info/top_level.txt +0 -1
  346. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/INSTALLER +0 -0
  347. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/REQUESTED +0 -0
  348. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/entry_points.txt +0 -0
  349. /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,150 @@
1
+ """
2
+ pygments.lexers.vip
3
+ ~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexers for Visual Prolog & Grammar files.
6
+
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ import re
12
+
13
+ from pygments.lexer import RegexLexer, inherit, words, include
14
+ from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
15
+ Number, Punctuation, Whitespace
16
+
17
+ __all__ = ['VisualPrologLexer', 'VisualPrologGrammarLexer']
18
+
19
+
20
+ class VisualPrologBaseLexer(RegexLexer):
21
+ minorendkw = ('try', 'foreach', 'if')
22
+ minorkwexp = ('and', 'catch', 'do', 'else', 'elseif', 'erroneous', 'externally', 'failure', 'finally', 'foreach', 'if', 'or', 'orelse', 'otherwise', 'then',
23
+ 'try', 'div', 'mod', 'rem', 'quot')
24
+ dockw = ('short', 'detail', 'end', 'withdomain')
25
+ tokens = {
26
+ 'root': [
27
+ (r'\s+', Whitespace),
28
+ (words(minorendkw, prefix=r'\bend\s+', suffix=r'\b'), Keyword.Minor),
29
+ (r'end', Keyword),
30
+ (words(minorkwexp, suffix=r'\b'), Keyword.Minor),
31
+ (r'0[xo][\da-fA-F_]+', Number),
32
+ (r'((\d[\d_]*)?\.)?\d[\d_]*([eE][\-+]?\d+)?', Number),
33
+ (r'_\w*', Name.Variable.Anonymous),
34
+ (r'[A-Z]\w*', Name.Variable),
35
+ (r'@\w+', Name.Variable),
36
+ (r'[a-z]\w*', Name),
37
+ (r'/\*', Comment, 'comment'),
38
+ (r'\%', Comment, 'commentline'),
39
+ (r'"', String.Symbol, 'string'),
40
+ (r'\'', String.Symbol, 'stringsingle'),
41
+ (r'@"', String.Symbol, 'atstring'),
42
+ (r'[\-+*^/!?<>=~:]+', Operator),
43
+ (r'[$,.[\]|(){}\\]+', Punctuation),
44
+ (r'.', Text),
45
+ ],
46
+ 'commentdoc': [
47
+ (words(dockw, prefix=r'@', suffix=r'\b'), Comment.Preproc),
48
+ (r'@', Comment),
49
+ ],
50
+ 'commentline': [
51
+ include('commentdoc'),
52
+ (r'[^@\n]+', Comment),
53
+ (r'$', Comment, '#pop'),
54
+ ],
55
+ 'comment': [
56
+ include('commentdoc'),
57
+ (r'[^@*/]+', Comment),
58
+ (r'/\*', Comment, '#push'),
59
+ (r'\*/', Comment, '#pop'),
60
+ (r'[*/]', Comment),
61
+ ],
62
+ 'stringescape': [
63
+ (r'\\u[0-9a-fA-F]{4}', String.Escape),
64
+ (r'\\[\'"ntr\\]', String.Escape),
65
+ ],
66
+ 'stringsingle': [
67
+ include('stringescape'),
68
+ (r'\'', String.Symbol, '#pop'),
69
+ (r'[^\'\\\n]+', String),
70
+ (r'\n', String.Escape.Error, '#pop'),
71
+ ],
72
+ 'string': [
73
+ include('stringescape'),
74
+ (r'"', String.Symbol, '#pop'),
75
+ (r'[^"\\\n]+', String),
76
+ (r'\n', String.Escape.Error, '#pop'),
77
+ ],
78
+ 'atstring': [
79
+ (r'""', String.Escape),
80
+ (r'"', String.Symbol, '#pop'),
81
+ (r'[^"]+', String),
82
+ ]
83
+ }
84
+
85
+
86
+ class VisualPrologLexer(VisualPrologBaseLexer):
87
+ """Lexer for VisualProlog
88
+ """
89
+ name = 'Visual Prolog'
90
+ url = 'https://www.visual-prolog.com/'
91
+ aliases = ['visualprolog']
92
+ filenames = ['*.pro', '*.cl', '*.i', '*.pack', '*.ph']
93
+ version_added = '2.17'
94
+
95
+ majorkw = ('goal', 'namespace', 'interface', 'class', 'implement', 'where', 'open', 'inherits', 'supports', 'resolve',
96
+ 'delegate', 'monitor', 'constants', 'domains', 'predicates', 'constructors', 'properties', 'clauses', 'facts')
97
+ minorkw = ('align', 'anyflow', 'as', 'bitsize', 'determ', 'digits', 'erroneous', 'externally', 'failure', 'from',
98
+ 'guard', 'multi', 'nondeterm', 'or', 'orelse', 'otherwise', 'procedure', 'resolve', 'single', 'suspending')
99
+ directivekw = ('bininclude', 'else', 'elseif', 'endif', 'error', 'export', 'externally', 'from', 'grammargenerate',
100
+ 'grammarinclude', 'if', 'include', 'message', 'options', 'orrequires', 'requires', 'stringinclude', 'then')
101
+ tokens = {
102
+ 'root': [
103
+ (words(minorkw, suffix=r'\b'), Keyword.Minor),
104
+ (words(majorkw, suffix=r'\b'), Keyword),
105
+ (words(directivekw, prefix='#', suffix=r'\b'), Keyword.Directive),
106
+ inherit
107
+ ]
108
+ }
109
+
110
+ def analyse_text(text):
111
+ """Competes with IDL and Prolog on *.pro; div. lisps on*.cl and SwigLexer on *.i"""
112
+ # These are *really* good indicators (and not conflicting with the other languages)
113
+ # end-scope first on line e.g. 'end implement'
114
+ # section keyword alone on line e.g. 'clauses'
115
+ if re.search(r'^\s*(end\s+(interface|class|implement)|(clauses|predicates|domains|facts|constants|properties)\s*$)', text):
116
+ return 0.98
117
+ else:
118
+ return 0
119
+
120
+
121
+ class VisualPrologGrammarLexer(VisualPrologBaseLexer):
122
+ """Lexer for VisualProlog grammar
123
+ """
124
+
125
+ name = 'Visual Prolog Grammar'
126
+ url = 'https://www.visual-prolog.com/'
127
+ aliases = ['visualprologgrammar']
128
+ filenames = ['*.vipgrm']
129
+ version_added = '2.17'
130
+
131
+ majorkw = ('open', 'namespace', 'grammar', 'nonterminals',
132
+ 'startsymbols', 'terminals', 'rules', 'precedence')
133
+ directivekw = ('bininclude', 'stringinclude')
134
+ tokens = {
135
+ 'root': [
136
+ (words(majorkw, suffix=r'\b'), Keyword),
137
+ (words(directivekw, prefix='#', suffix=r'\b'), Keyword.Directive),
138
+ inherit
139
+ ]
140
+ }
141
+
142
+ def analyse_text(text):
143
+ """No competditors (currently)"""
144
+ # These are *really* good indicators
145
+ # end-scope first on line e.g. 'end grammar'
146
+ # section keyword alone on line e.g. 'rules'
147
+ if re.search(r'^\s*(end\s+grammar|(nonterminals|startsymbols|terminals|rules|precedence)\s*$)', text):
148
+ return 0.98
149
+ else:
150
+ return 0
@@ -0,0 +1,140 @@
1
+ """
2
+ pygments.lexers.vyper
3
+ ~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ Lexer for the Vyper Smart Contract language.
6
+
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
+ :license: BSD, see LICENSE for details.
9
+ """
10
+
11
+ from pygments.lexer import RegexLexer, bygroups, words
12
+ from pygments.token import (Comment, String, Name, Keyword, Number,
13
+ Operator, Punctuation, Text, Whitespace)
14
+
15
+ __all__ = ['VyperLexer']
16
+
17
+
18
+ class VyperLexer(RegexLexer):
19
+ """For the Vyper smart contract language.
20
+ """
21
+ name = 'Vyper'
22
+ aliases = ['vyper']
23
+ filenames = ['*.vy']
24
+ url = "https://vyper.readthedocs.io"
25
+ version_added = '2.17'
26
+
27
+ tokens = {
28
+ 'root': [
29
+ # Whitespace
30
+ (r'\s+', Whitespace),
31
+
32
+ # Line continuations
33
+ (r'(\\)(\n|\r\n|\r)', bygroups(Text, Whitespace)),
34
+
35
+ # Comments - inline and multiline
36
+ (r'#.*$', Comment.Single),
37
+ (r'\"\"\"', Comment.Multiline, 'multiline-comment'),
38
+
39
+ # Strings - single and double
40
+ (r"'", String.Single, 'single-string'),
41
+ (r'"', String.Double, 'double-string'),
42
+
43
+ # Functions (working)
44
+ (r'(def)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)',
45
+ bygroups(Keyword, Whitespace, Name.Function)),
46
+
47
+ # Event and Struct
48
+ (r'(event|struct|interface|log)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)',
49
+ bygroups(Keyword, Whitespace, Name.Class)),
50
+
51
+ # Imports
52
+ (r'(from)(\s+)(vyper\.\w+)(\s+)(import)(\s+)(\w+)',
53
+ bygroups(Keyword, Whitespace, Name.Namespace, Whitespace,
54
+ Keyword, Whitespace, Name.Class)),
55
+
56
+ # Numeric Literals
57
+ (r'\b0x[0-9a-fA-F]+\b', Number.Hex),
58
+ (r'\b(\d{1,3}(?:_\d{3})*|\d+)\b', Number.Integer),
59
+ (r'\b\d+\.\d*\b', Number.Float),
60
+
61
+ # Keywords
62
+ (words(('def', 'event', 'pass', 'return', 'for', 'while', 'if', 'elif',
63
+ 'else', 'assert', 'raise', 'import', 'in', 'struct', 'implements',
64
+ 'interface', 'from', 'indexed', 'log'),
65
+ prefix=r'\b', suffix=r'\b'), Keyword),
66
+
67
+ # Visibility and State Mutability
68
+ (words(('public', 'private', 'view', 'pure', 'constant',
69
+ 'immutable', 'nonpayable'), prefix=r'\b', suffix=r'\b'),
70
+ Keyword.Declaration),
71
+
72
+ # Built-in Functions
73
+ (words(('bitwise_and', 'bitwise_not', 'bitwise_or', 'bitwise_xor', 'shift',
74
+ 'create_minimal_proxy_to', 'create_copy_of', 'create_from_blueprint',
75
+ 'ecadd', 'ecmul', 'ecrecover', 'keccak256', 'sha256', 'concat', 'convert',
76
+ 'uint2str', 'extract32', 'slice', 'abs', 'ceil', 'floor', 'max', 'max_value',
77
+ 'min', 'min_value', 'pow_mod256', 'sqrt', 'isqrt', 'uint256_addmod',
78
+ 'uint256_mulmod', 'unsafe_add', 'unsafe_sub', 'unsafe_mul', 'unsafe_div',
79
+ 'as_wei_value', 'blockhash', 'empty', 'len', 'method_id', '_abi_encode',
80
+ '_abi_decode', 'print', 'range'), prefix=r'\b', suffix=r'\b'),
81
+ Name.Builtin),
82
+
83
+ # Built-in Variables and Attributes
84
+ (words(('msg.sender', 'msg.value', 'block.timestamp', 'block.number', 'msg.gas'),
85
+ prefix=r'\b', suffix=r'\b'),
86
+ Name.Builtin.Pseudo),
87
+
88
+ (words(('uint', 'uint8', 'uint16', 'uint32', 'uint64', 'uint128', 'uint256',
89
+ 'int', 'int8', 'int16', 'int32', 'int64', 'int128', 'int256', 'bool',
90
+ 'decimal', 'bytes', 'bytes1', 'bytes2', 'bytes3', 'bytes4', 'bytes5',
91
+ 'bytes6', 'bytes7', 'bytes8', 'bytes9', 'bytes10', 'bytes11',
92
+ 'bytes12', 'bytes13', 'bytes14', 'bytes15', 'bytes16', 'bytes17',
93
+ 'bytes18', 'bytes19', 'bytes20', 'bytes21', 'bytes22', 'bytes23',
94
+ 'bytes24', 'bytes25', 'bytes26', 'bytes27', 'bytes28', 'bytes29',
95
+ 'bytes30', 'bytes31', 'bytes32', 'string', 'String', 'address',
96
+ 'enum', 'struct'), prefix=r'\b', suffix=r'\b'),
97
+ Keyword.Type),
98
+
99
+ # indexed keywords
100
+ (r'\b(indexed)\b(\s*)(\()(\s*)(\w+)(\s*)(\))',
101
+ bygroups(Keyword, Whitespace, Punctuation, Whitespace,
102
+ Keyword.Type, Punctuation)),
103
+
104
+ # Operators and Punctuation
105
+ (r'(\+|\-|\*|\/|<=?|>=?|==|!=|=|\||&|%)', Operator),
106
+ (r'[.,:;()\[\]{}]', Punctuation),
107
+
108
+ # Other variable names and types
109
+ (r'@[\w.]+', Name.Decorator),
110
+ (r'__\w+__', Name.Magic), # Matches double underscores followed by word characters
111
+ (r'EMPTY_BYTES32', Name.Constant),
112
+ (r'\bERC20\b', Name.Class),
113
+ (r'\bself\b', Name.Attribute),
114
+
115
+ (r'Bytes\[\d+\]', Keyword.Type),
116
+
117
+ # Generic names and variables
118
+ (r'\b[a-zA-Z_]\w*\b:', Name.Variable),
119
+ (r'\b[a-zA-Z_]\w*\b', Name),
120
+
121
+ ],
122
+
123
+ 'multiline-comment': [
124
+ (r'\"\"\"', Comment.Multiline, '#pop'),
125
+ (r'[^"]+', Comment.Multiline),
126
+ (r'\"', Comment.Multiline)
127
+ ],
128
+
129
+ 'single-string': [
130
+ (r"[^\\']+", String.Single),
131
+ (r"'", String.Single, '#pop'),
132
+ (r'\\.', String.Escape),
133
+ ],
134
+
135
+ 'double-string': [
136
+ (r'[^\\"]+', String.Double),
137
+ (r'"', String.Double, '#pop'),
138
+ (r'\\.', String.Escape),
139
+ ]
140
+ }
@@ -4,10 +4,11 @@
4
4
 
5
5
  Just export previously exported lexers.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
11
+ # ruff: noqa: F401
11
12
  from pygments.lexers.html import HtmlLexer, DtdLexer, XmlLexer, XsltLexer, \
12
13
  HamlLexer, ScamlLexer, JadeLexer
13
14
  from pygments.lexers.css import CssLexer, SassLexer, ScssLexer
@@ -8,7 +8,7 @@
8
8
  and https://webassembly.github.io/spec/core/text/.
9
9
 
10
10
 
11
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
11
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
12
12
  :license: BSD, see LICENSE for details.
13
13
  """
14
14
 
@@ -63,14 +63,13 @@ builtins = (
63
63
 
64
64
  class WatLexer(RegexLexer):
65
65
  """Lexer for the WebAssembly text format.
66
-
67
- .. versionadded:: 2.9
68
66
  """
69
67
 
70
68
  name = 'WebAssembly'
71
69
  url = 'https://webassembly.org/'
72
70
  aliases = ['wast', 'wat']
73
71
  filenames = ['*.wat', '*.wast']
72
+ version_added = '2.9'
74
73
 
75
74
  tokens = {
76
75
  'root': [
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for Web IDL, including some extensions.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -39,14 +39,13 @@ _string = r'"[^"]*"'
39
39
  class WebIDLLexer(RegexLexer):
40
40
  """
41
41
  For Web IDL.
42
-
43
- .. versionadded:: 2.6
44
42
  """
45
43
 
46
44
  name = 'Web IDL'
47
45
  url = 'https://www.w3.org/wiki/Web_IDL'
48
46
  aliases = ['webidl']
49
47
  filenames = ['*.webidl']
48
+ version_added = '2.6'
50
49
 
51
50
  tokens = {
52
51
  'common': [
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for misc. web stuff.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -26,8 +26,6 @@ __all__ = ['DuelLexer', 'SlimLexer', 'XQueryLexer', 'QmlLexer', 'CirruLexer']
26
26
  class DuelLexer(RegexLexer):
27
27
  """
28
28
  Lexer for Duel Views Engine (formerly JBST) markup with JavaScript code blocks.
29
-
30
- .. versionadded:: 1.4
31
29
  """
32
30
 
33
31
  name = 'Duel'
@@ -35,6 +33,7 @@ class DuelLexer(RegexLexer):
35
33
  aliases = ['duel', 'jbst', 'jsonml+bst']
36
34
  filenames = ['*.duel', '*.jbst']
37
35
  mimetypes = ['text/x-duel', 'text/x-jbst']
36
+ version_added = '1.4'
38
37
 
39
38
  flags = re.DOTALL
40
39
 
@@ -59,14 +58,13 @@ class XQueryLexer(ExtendedRegexLexer):
59
58
  """
60
59
  An XQuery lexer, parsing a stream and outputting the tokens needed to
61
60
  highlight xquery code.
62
-
63
- .. versionadded:: 1.4
64
61
  """
65
62
  name = 'XQuery'
66
63
  url = 'https://www.w3.org/XML/Query/'
67
64
  aliases = ['xquery', 'xqy', 'xq', 'xql', 'xqm']
68
65
  filenames = ['*.xqy', '*.xquery', '*.xq', '*.xql', '*.xqm']
69
66
  mimetypes = ['text/xquery', 'application/xquery']
67
+ version_added = '1.4'
70
68
 
71
69
  xquery_parse_state = []
72
70
 
@@ -82,13 +80,13 @@ class XQueryLexer(ExtendedRegexLexer):
82
80
  # ncnamechar = ncnamestartchar + (r"|-|\.|[0-9]|\u00B7|[\u0300-\u036F]|"
83
81
  # r"[\u203F-\u2040]")
84
82
  ncnamechar = r"(?:" + ncnamestartchar + r"|-|\.|[0-9])"
85
- ncname = "(?:%s+%s*)" % (ncnamestartchar, ncnamechar)
83
+ ncname = f"(?:{ncnamestartchar}+{ncnamechar}*)"
86
84
  pitarget_namestartchar = r"(?:[A-KN-WYZ]|_|:|[a-kn-wyz])"
87
85
  pitarget_namechar = r"(?:" + pitarget_namestartchar + r"|-|\.|[0-9])"
88
- pitarget = "%s+%s*" % (pitarget_namestartchar, pitarget_namechar)
89
- prefixedname = "%s:%s" % (ncname, ncname)
86
+ pitarget = f"{pitarget_namestartchar}+{pitarget_namechar}*"
87
+ prefixedname = f"{ncname}:{ncname}"
90
88
  unprefixedname = ncname
91
- qname = "(?:%s|%s)" % (prefixedname, unprefixedname)
89
+ qname = f"(?:{prefixedname}|{unprefixedname})"
92
90
 
93
91
  entityref = r'(?:&(?:lt|gt|amp|quot|apos|nbsp);)'
94
92
  charref = r'(?:&#[0-9]+;|&#x[0-9a-fA-F]+;)'
@@ -813,8 +811,6 @@ class XQueryLexer(ExtendedRegexLexer):
813
811
  class QmlLexer(RegexLexer):
814
812
  """
815
813
  For QML files.
816
-
817
- .. versionadded:: 1.6
818
814
  """
819
815
 
820
816
  # QML is based on javascript, so much of this is taken from the
@@ -825,6 +821,7 @@ class QmlLexer(RegexLexer):
825
821
  aliases = ['qml', 'qbs']
826
822
  filenames = ['*.qml', '*.qbs']
827
823
  mimetypes = ['application/x-qml', 'application/x-qt.qbs+qml']
824
+ version_added = '1.6'
828
825
 
829
826
  # pasted from JavascriptLexer, with some additions
830
827
  flags = re.DOTALL | re.MULTILINE
@@ -891,8 +888,6 @@ class CirruLexer(RegexLexer):
891
888
  * using ``$`` as folding operator
892
889
  * using ``,`` as unfolding operator
893
890
  * using indentations for nested blocks
894
-
895
- .. versionadded:: 2.0
896
891
  """
897
892
 
898
893
  name = 'Cirru'
@@ -900,6 +895,7 @@ class CirruLexer(RegexLexer):
900
895
  aliases = ['cirru']
901
896
  filenames = ['*.cirru']
902
897
  mimetypes = ['text/x-cirru']
898
+ version_added = '2.0'
903
899
  flags = re.MULTILINE
904
900
 
905
901
  tokens = {
@@ -940,14 +936,14 @@ class CirruLexer(RegexLexer):
940
936
  class SlimLexer(ExtendedRegexLexer):
941
937
  """
942
938
  For Slim markup.
943
-
944
- .. versionadded:: 2.0
945
939
  """
946
940
 
947
941
  name = 'Slim'
948
942
  aliases = ['slim']
949
943
  filenames = ['*.slim']
950
944
  mimetypes = ['text/x-slim']
945
+ url = 'https://slim-template.github.io'
946
+ version_added = '2.0'
951
947
 
952
948
  flags = re.IGNORECASE
953
949
  _dot = r'(?: \|\n(?=.* \|)|.)'
@@ -4,11 +4,11 @@
4
4
 
5
5
  Lexer for the WebGPU Shading Language.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
11
- from pygments.lexer import RegexLexer, include, bygroups, words, default
11
+ from pygments.lexer import RegexLexer, include, words, default
12
12
  from pygments.token import Comment, Operator, Keyword, Name, \
13
13
  Number, Punctuation, Whitespace
14
14
  from pygments import unistring as uni
@@ -27,20 +27,19 @@ NotLineEndRE = '[^' + "".join(LineEndCodePoints) + ']'
27
27
  LineEndRE = '[' + "".join(LineEndCodePoints) + ']'
28
28
 
29
29
  # https://www.w3.org/TR/WGSL/#syntax-ident_pattern_token
30
- ident_pattern_token = '([{}][{}]+)|[{}]'.format(uni.xid_start,uni.xid_continue,uni.xid_start)
30
+ ident_pattern_token = f'([{uni.xid_start}][{uni.xid_continue}]+)|[{uni.xid_start}]'
31
31
 
32
32
 
33
33
  class WgslLexer(RegexLexer):
34
34
  """
35
35
  Lexer for the WebGPU Shading Language.
36
-
37
- .. versionadded:: 2.15
38
36
  """
39
37
  name = 'WebGPU Shading Language'
40
38
  url = 'https://www.w3.org/TR/WGSL/'
41
39
  aliases = ['wgsl']
42
40
  filenames = ['*.wgsl']
43
41
  mimetypes = ['text/wgsl']
42
+ version_added = '2.15'
44
43
 
45
44
  # https://www.w3.org/TR/WGSL/#var-and-value
46
45
  keyword_decl = (words('var let const override'.split(),suffix=r'\b'), Keyword.Declaration)
@@ -323,8 +322,8 @@ class WgslLexer(RegexLexer):
323
322
  'comments': [
324
323
  # Line ending comments
325
324
  # Match up CR/LF pair first.
326
- (r'//{}*{}{}'.format(NotLineEndRE,CR,LF), Comment.Single),
327
- (r'//{}*{}'.format(NotLineEndRE,LineEndRE), Comment.Single),
325
+ (rf'//{NotLineEndRE}*{CR}{LF}', Comment.Single),
326
+ (rf'//{NotLineEndRE}*{LineEndRE}', Comment.Single),
328
327
  (r'/\*', Comment.Multiline, 'block_comment'),
329
328
  ],
330
329
  'attribute': [
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for the Whiley language.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -18,14 +18,13 @@ __all__ = ['WhileyLexer']
18
18
  class WhileyLexer(RegexLexer):
19
19
  """
20
20
  Lexer for the Whiley programming language.
21
-
22
- .. versionadded:: 2.2
23
21
  """
24
22
  name = 'Whiley'
25
23
  url = 'http://whiley.org/'
26
24
  filenames = ['*.whiley']
27
25
  aliases = ['whiley']
28
26
  mimetypes = ['text/x-whiley']
27
+ version_added = '2.2'
29
28
 
30
29
  # See the language specification:
31
30
  # http://whiley.org/download/WhileyLanguageSpec.pdf
@@ -6,7 +6,7 @@
6
6
 
7
7
  TOC files describe game addons.
8
8
 
9
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
9
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
10
10
  :license: BSD, see LICENSE for details.
11
11
  """
12
12
 
@@ -46,13 +46,13 @@ def _create_tag_line_token(inner_pattern, inner_token, ignore_case=False):
46
46
  class WoWTocLexer(RegexLexer):
47
47
  """
48
48
  Lexer for World of Warcraft TOC files.
49
-
50
- .. versionadded:: 2.14
51
49
  """
52
50
 
53
51
  name = "World of Warcraft TOC"
54
52
  aliases = ["wowtoc"]
55
53
  filenames = ["*.toc"]
54
+ url = 'https://wowpedia.fandom.com/wiki/TOC_format'
55
+ version_added = '2.14'
56
56
 
57
57
  tokens = {
58
58
  "root": [
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexer for Wren.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -12,20 +12,19 @@ import re
12
12
 
13
13
  from pygments.lexer import include, RegexLexer, words
14
14
  from pygments.token import Whitespace, Punctuation, Keyword, Name, Comment, \
15
- Operator, Number, String, Error
15
+ Operator, Number, String
16
16
 
17
17
  __all__ = ['WrenLexer']
18
18
 
19
19
  class WrenLexer(RegexLexer):
20
20
  """
21
21
  For Wren source code, version 0.4.0.
22
-
23
- .. versionadded:: 2.14.0
24
22
  """
25
23
  name = 'Wren'
26
24
  url = 'https://wren.io'
27
25
  aliases = ['wren']
28
26
  filenames = ['*.wren']
27
+ version_added = '2.14'
29
28
 
30
29
  flags = re.MULTILINE | re.DOTALL
31
30
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for the X10 programming language.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -17,8 +17,6 @@ __all__ = ['X10Lexer']
17
17
  class X10Lexer(RegexLexer):
18
18
  """
19
19
  For the X10 language.
20
-
21
- .. versionadded:: 2.2
22
20
  """
23
21
 
24
22
  name = 'X10'
@@ -26,6 +24,7 @@ class X10Lexer(RegexLexer):
26
24
  aliases = ['x10', 'xten']
27
25
  filenames = ['*.x10']
28
26
  mimetypes = ['text/x-x10']
27
+ version_added = '2.2'
29
28
 
30
29
  keywords = (
31
30
  'as', 'assert', 'async', 'at', 'athome', 'ateach', 'atomic',
@@ -56,10 +55,10 @@ class X10Lexer(RegexLexer):
56
55
  (r'[^\S\n]+', Text),
57
56
  (r'//.*?\n', Comment.Single),
58
57
  (r'/\*(.|\n)*?\*/', Comment.Multiline),
59
- (r'\b(%s)\b' % '|'.join(keywords), Keyword),
60
- (r'\b(%s)\b' % '|'.join(types), Keyword.Type),
61
- (r'\b(%s)\b' % '|'.join(values), Keyword.Constant),
62
- (r'\b(%s)\b' % '|'.join(modifiers), Keyword.Declaration),
58
+ (r'\b({})\b'.format('|'.join(keywords)), Keyword),
59
+ (r'\b({})\b'.format('|'.join(types)), Keyword.Type),
60
+ (r'\b({})\b'.format('|'.join(values)), Keyword.Constant),
61
+ (r'\b({})\b'.format('|'.join(modifiers)), Keyword.Declaration),
63
62
  (r'"(\\\\|\\[^\\]|[^"\\])*"', String),
64
63
  (r"'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'", String.Char),
65
64
  (r'.', Text)
@@ -4,7 +4,7 @@
4
4
 
5
5
  Lexers for Xorg configs.
6
6
 
7
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
7
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
8
8
  :license: BSD, see LICENSE for details.
9
9
  """
10
10
 
@@ -21,6 +21,7 @@ class XorgLexer(RegexLexer):
21
21
  aliases = ['xorg.conf']
22
22
  filenames = ['xorg.conf']
23
23
  mimetypes = []
24
+ version_added = ''
24
25
 
25
26
  tokens = {
26
27
  'root': [