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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +8 -8
- data/.github/workflows/release.yml +5 -5
- data/.gitignore +2 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.adoc +12 -0
- data/README.adoc +2 -2
- data/lib/pygments/popen.rb +2 -2
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +3 -3
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +2 -2
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +12 -12
- data/vendor/pygments-main/pygments/console.py +5 -5
- data/vendor/pygments-main/pygments/filter.py +2 -3
- data/vendor/pygments-main/pygments/filters/__init__.py +4 -4
- data/vendor/pygments-main/pygments/formatter.py +6 -1
- data/vendor/pygments-main/pygments/formatters/__init__.py +7 -8
- data/vendor/pygments-main/pygments/formatters/_mapping.py +0 -0
- data/vendor/pygments-main/pygments/formatters/bbcode.py +2 -2
- data/vendor/pygments-main/pygments/formatters/groff.py +3 -3
- data/vendor/pygments-main/pygments/formatters/html.py +38 -40
- data/vendor/pygments-main/pygments/formatters/img.py +51 -11
- data/vendor/pygments-main/pygments/formatters/irc.py +1 -1
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -27
- data/vendor/pygments-main/pygments/formatters/other.py +3 -4
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +2 -2
- data/vendor/pygments-main/pygments/formatters/rtf.py +228 -25
- data/vendor/pygments-main/pygments/formatters/svg.py +17 -20
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
- data/vendor/pygments-main/pygments/lexer.py +51 -33
- data/vendor/pygments-main/pygments/lexers/__init__.py +12 -12
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_luau_builtins.py +62 -0
- data/vendor/pygments-main/pygments/lexers/_mapping.py +41 -11
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +5 -5
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +4 -4
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/actionscript.py +6 -8
- data/vendor/pygments-main/pygments/lexers/ada.py +3 -3
- data/vendor/pygments-main/pygments/lexers/agile.py +3 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +9 -13
- data/vendor/pygments-main/pygments/lexers/ambient.py +2 -3
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +4 -3
- data/vendor/pygments-main/pygments/lexers/apl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/archetype.py +8 -12
- data/vendor/pygments-main/pygments/lexers/arrow.py +2 -3
- data/vendor/pygments-main/pygments/lexers/arturo.py +2 -3
- data/vendor/pygments-main/pygments/lexers/asc.py +4 -4
- data/vendor/pygments-main/pygments/lexers/asm.py +28 -15
- data/vendor/pygments-main/pygments/lexers/asn1.py +178 -0
- data/vendor/pygments-main/pygments/lexers/automation.py +6 -8
- data/vendor/pygments-main/pygments/lexers/bare.py +2 -3
- data/vendor/pygments-main/pygments/lexers/basic.py +48 -57
- data/vendor/pygments-main/pygments/lexers/bdd.py +3 -4
- data/vendor/pygments-main/pygments/lexers/berry.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bibtex.py +5 -5
- data/vendor/pygments-main/pygments/lexers/blueprint.py +173 -0
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -4
- data/vendor/pygments-main/pygments/lexers/bqn.py +109 -0
- data/vendor/pygments-main/pygments/lexers/business.py +21 -22
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +9 -4
- data/vendor/pygments-main/pygments/lexers/c_like.py +99 -27
- data/vendor/pygments-main/pygments/lexers/capnproto.py +2 -3
- data/vendor/pygments-main/pygments/lexers/carbon.py +10 -11
- data/vendor/pygments-main/pygments/lexers/cddl.py +8 -9
- data/vendor/pygments-main/pygments/lexers/chapel.py +2 -3
- data/vendor/pygments-main/pygments/lexers/clean.py +2 -1
- data/vendor/pygments-main/pygments/lexers/comal.py +2 -1
- data/vendor/pygments-main/pygments/lexers/compiled.py +2 -1
- data/vendor/pygments-main/pygments/lexers/configs.py +342 -108
- data/vendor/pygments-main/pygments/lexers/console.py +5 -5
- data/vendor/pygments-main/pygments/lexers/cplint.py +2 -3
- data/vendor/pygments-main/pygments/lexers/crystal.py +4 -5
- data/vendor/pygments-main/pygments/lexers/csound.py +6 -8
- data/vendor/pygments-main/pygments/lexers/css.py +5 -5
- data/vendor/pygments-main/pygments/lexers/d.py +4 -3
- data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -3
- data/vendor/pygments-main/pygments/lexers/data.py +8 -12
- data/vendor/pygments-main/pygments/lexers/dax.py +2 -3
- data/vendor/pygments-main/pygments/lexers/devicetree.py +2 -3
- data/vendor/pygments-main/pygments/lexers/diff.py +7 -6
- data/vendor/pygments-main/pygments/lexers/dns.py +109 -0
- data/vendor/pygments-main/pygments/lexers/dotnet.py +19 -14
- data/vendor/pygments-main/pygments/lexers/dsls.py +24 -35
- data/vendor/pygments-main/pygments/lexers/dylan.py +8 -16
- data/vendor/pygments-main/pygments/lexers/ecl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/eiffel.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elm.py +3 -4
- data/vendor/pygments-main/pygments/lexers/elpi.py +28 -21
- data/vendor/pygments-main/pygments/lexers/email.py +3 -3
- data/vendor/pygments-main/pygments/lexers/erlang.py +22 -24
- data/vendor/pygments-main/pygments/lexers/esoteric.py +11 -12
- data/vendor/pygments-main/pygments/lexers/ezhil.py +2 -3
- data/vendor/pygments-main/pygments/lexers/factor.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fantom.py +3 -3
- data/vendor/pygments-main/pygments/lexers/felix.py +9 -10
- data/vendor/pygments-main/pygments/lexers/fift.py +2 -1
- data/vendor/pygments-main/pygments/lexers/floscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/forth.py +2 -3
- data/vendor/pygments-main/pygments/lexers/fortran.py +6 -7
- data/vendor/pygments-main/pygments/lexers/foxpro.py +3 -3
- data/vendor/pygments-main/pygments/lexers/freefem.py +2 -3
- data/vendor/pygments-main/pygments/lexers/func.py +3 -1
- data/vendor/pygments-main/pygments/lexers/functional.py +2 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +6 -7
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +3 -3
- data/vendor/pygments-main/pygments/lexers/gdscript.py +2 -1
- data/vendor/pygments-main/pygments/lexers/go.py +3 -4
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +6 -9
- data/vendor/pygments-main/pygments/lexers/graph.py +12 -9
- data/vendor/pygments-main/pygments/lexers/graphics.py +13 -17
- data/vendor/pygments-main/pygments/lexers/graphql.py +176 -0
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -3
- data/vendor/pygments-main/pygments/lexers/gsql.py +2 -3
- data/vendor/pygments-main/pygments/lexers/haskell.py +27 -32
- data/vendor/pygments-main/pygments/lexers/haxe.py +3 -5
- data/vendor/pygments-main/pygments/lexers/hdl.py +8 -7
- data/vendor/pygments-main/pygments/lexers/hexdump.py +3 -3
- data/vendor/pygments-main/pygments/lexers/html.py +34 -13
- data/vendor/pygments-main/pygments/lexers/idl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/igor.py +305 -290
- data/vendor/pygments-main/pygments/lexers/inferno.py +2 -3
- data/vendor/pygments-main/pygments/lexers/installers.py +7 -9
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +150 -162
- data/vendor/pygments-main/pygments/lexers/iolang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/j.py +2 -3
- data/vendor/pygments-main/pygments/lexers/javascript.py +18 -19
- data/vendor/pygments-main/pygments/lexers/jmespath.py +2 -1
- data/vendor/pygments-main/pygments/lexers/jslt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsx.py +75 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +4 -5
- data/vendor/pygments-main/pygments/lexers/jvm.py +98 -116
- data/vendor/pygments-main/pygments/lexers/kuin.py +2 -3
- data/vendor/pygments-main/pygments/lexers/kusto.py +93 -0
- data/vendor/pygments-main/pygments/lexers/ldap.py +155 -0
- data/vendor/pygments-main/pygments/lexers/lean.py +241 -0
- data/vendor/pygments-main/pygments/lexers/lilypond.py +2 -3
- data/vendor/pygments-main/pygments/lexers/lisp.py +373 -65
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +53 -4
- data/vendor/pygments-main/pygments/lexers/make.py +7 -5
- data/vendor/pygments-main/pygments/lexers/markup.py +242 -91
- data/vendor/pygments-main/pygments/lexers/math.py +2 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +10 -12
- data/vendor/pygments-main/pygments/lexers/maxima.py +2 -3
- data/vendor/pygments-main/pygments/lexers/meson.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mime.py +4 -4
- data/vendor/pygments-main/pygments/lexers/minecraft.py +24 -27
- data/vendor/pygments-main/pygments/lexers/mips.py +3 -1
- data/vendor/pygments-main/pygments/lexers/ml.py +59 -61
- data/vendor/pygments-main/pygments/lexers/modeling.py +19 -22
- data/vendor/pygments-main/pygments/lexers/modula2.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mojo.py +704 -0
- data/vendor/pygments-main/pygments/lexers/monte.py +2 -3
- data/vendor/pygments-main/pygments/lexers/mosel.py +3 -3
- data/vendor/pygments-main/pygments/lexers/ncl.py +4 -3
- data/vendor/pygments-main/pygments/lexers/nimrod.py +7 -8
- data/vendor/pygments-main/pygments/lexers/nit.py +2 -3
- data/vendor/pygments-main/pygments/lexers/nix.py +40 -31
- data/vendor/pygments-main/pygments/lexers/oberon.py +3 -3
- data/vendor/pygments-main/pygments/lexers/objective.py +14 -6
- data/vendor/pygments-main/pygments/lexers/ooc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/openscad.py +96 -0
- data/vendor/pygments-main/pygments/lexers/other.py +2 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +2 -3
- data/vendor/pygments-main/pygments/lexers/parsers.py +41 -44
- data/vendor/pygments-main/pygments/lexers/pascal.py +6 -3
- data/vendor/pygments-main/pygments/lexers/pawn.py +5 -5
- data/vendor/pygments-main/pygments/lexers/perl.py +3 -3
- data/vendor/pygments-main/pygments/lexers/phix.py +2 -3
- data/vendor/pygments-main/pygments/lexers/php.py +4 -5
- data/vendor/pygments-main/pygments/lexers/pointless.py +2 -3
- data/vendor/pygments-main/pygments/lexers/pony.py +3 -3
- data/vendor/pygments-main/pygments/lexers/praat.py +2 -3
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +23 -9
- data/vendor/pygments-main/pygments/lexers/promql.py +2 -1
- data/vendor/pygments-main/pygments/lexers/prql.py +251 -0
- data/vendor/pygments-main/pygments/lexers/ptx.py +119 -0
- data/vendor/pygments-main/pygments/lexers/python.py +24 -24
- data/vendor/pygments-main/pygments/lexers/q.py +5 -6
- data/vendor/pygments-main/pygments/lexers/qlik.py +3 -3
- data/vendor/pygments-main/pygments/lexers/qvt.py +5 -3
- data/vendor/pygments-main/pygments/lexers/r.py +8 -6
- data/vendor/pygments-main/pygments/lexers/rdf.py +19 -13
- data/vendor/pygments-main/pygments/lexers/rebol.py +7 -7
- data/vendor/pygments-main/pygments/lexers/resource.py +5 -6
- data/vendor/pygments-main/pygments/lexers/ride.py +4 -5
- data/vendor/pygments-main/pygments/lexers/rita.py +2 -3
- data/vendor/pygments-main/pygments/lexers/rnc.py +2 -3
- data/vendor/pygments-main/pygments/lexers/roboconf.py +5 -5
- data/vendor/pygments-main/pygments/lexers/robotframework.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ruby.py +8 -13
- data/vendor/pygments-main/pygments/lexers/rust.py +9 -10
- data/vendor/pygments-main/pygments/lexers/sas.py +3 -3
- data/vendor/pygments-main/pygments/lexers/savi.py +131 -130
- data/vendor/pygments-main/pygments/lexers/scdoc.py +13 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +354 -42
- data/vendor/pygments-main/pygments/lexers/sgf.py +2 -3
- data/vendor/pygments-main/pygments/lexers/shell.py +107 -129
- data/vendor/pygments-main/pygments/lexers/sieve.py +3 -3
- data/vendor/pygments-main/pygments/lexers/slash.py +4 -5
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +3 -5
- data/vendor/pygments-main/pygments/lexers/smithy.py +2 -3
- data/vendor/pygments-main/pygments/lexers/smv.py +3 -3
- data/vendor/pygments-main/pygments/lexers/snobol.py +3 -3
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -3
- data/vendor/pygments-main/pygments/lexers/soong.py +78 -0
- data/vendor/pygments-main/pygments/lexers/sophia.py +3 -4
- data/vendor/pygments-main/pygments/lexers/special.py +8 -3
- data/vendor/pygments-main/pygments/lexers/spice.py +15 -16
- data/vendor/pygments-main/pygments/lexers/sql.py +24 -18
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +3 -3
- data/vendor/pygments-main/pygments/lexers/stata.py +2 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +2 -3
- data/vendor/pygments-main/pygments/lexers/tact.py +303 -0
- data/vendor/pygments-main/pygments/lexers/tal.py +13 -10
- data/vendor/pygments-main/pygments/lexers/tcl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/teal.py +2 -3
- data/vendor/pygments-main/pygments/lexers/templates.py +131 -72
- data/vendor/pygments-main/pygments/lexers/teraterm.py +2 -3
- data/vendor/pygments-main/pygments/lexers/testing.py +4 -5
- data/vendor/pygments-main/pygments/lexers/text.py +2 -1
- data/vendor/pygments-main/pygments/lexers/textedit.py +9 -6
- data/vendor/pygments-main/pygments/lexers/textfmts.py +20 -15
- data/vendor/pygments-main/pygments/lexers/theorem.py +41 -115
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +50 -26
- data/vendor/pygments-main/pygments/lexers/tlb.py +3 -1
- data/vendor/pygments-main/pygments/lexers/tls.py +54 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +2 -3
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +3 -3
- data/vendor/pygments-main/pygments/lexers/typoscript.py +6 -7
- data/vendor/pygments-main/pygments/lexers/typst.py +104 -0
- data/vendor/pygments-main/pygments/lexers/ul4.py +47 -5
- data/vendor/pygments-main/pygments/lexers/unicon.py +9 -7
- data/vendor/pygments-main/pygments/lexers/urbi.py +3 -3
- data/vendor/pygments-main/pygments/lexers/usd.py +6 -11
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -5
- data/vendor/pygments-main/pygments/lexers/verifpal.py +65 -0
- data/vendor/pygments-main/pygments/lexers/vip.py +150 -0
- data/vendor/pygments-main/pygments/lexers/vyper.py +140 -0
- data/vendor/pygments-main/pygments/lexers/web.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -3
- data/vendor/pygments-main/pygments/lexers/webmisc.py +11 -15
- data/vendor/pygments-main/pygments/lexers/wgsl.py +6 -7
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -3
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +3 -3
- data/vendor/pygments-main/pygments/lexers/wren.py +3 -4
- data/vendor/pygments-main/pygments/lexers/x10.py +6 -7
- data/vendor/pygments-main/pygments/lexers/xorg.py +2 -1
- data/vendor/pygments-main/pygments/lexers/yang.py +2 -3
- data/vendor/pygments-main/pygments/lexers/yara.py +69 -0
- data/vendor/pygments-main/pygments/lexers/zig.py +2 -1
- data/vendor/pygments-main/pygments/modeline.py +4 -4
- data/vendor/pygments-main/pygments/plugin.py +3 -19
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +1 -1
- data/vendor/pygments-main/pygments/sphinxext.py +38 -8
- data/vendor/pygments-main/pygments/style.py +8 -2
- data/vendor/pygments-main/pygments/styles/__init__.py +17 -59
- data/vendor/pygments-main/pygments/styles/_mapping.py +54 -0
- data/vendor/pygments-main/pygments/styles/abap.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol.py +5 -1
- data/vendor/pygments-main/pygments/styles/algol_nu.py +5 -1
- data/vendor/pygments-main/pygments/styles/arduino.py +76 -72
- data/vendor/pygments-main/pygments/styles/autumn.py +6 -1
- data/vendor/pygments-main/pygments/styles/borland.py +6 -1
- data/vendor/pygments-main/pygments/styles/bw.py +6 -1
- data/vendor/pygments-main/pygments/styles/coffee.py +80 -0
- data/vendor/pygments-main/pygments/styles/colorful.py +6 -1
- data/vendor/pygments-main/pygments/styles/default.py +6 -1
- data/vendor/pygments-main/pygments/styles/dracula.py +68 -80
- data/vendor/pygments-main/pygments/styles/emacs.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly.py +6 -1
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +6 -1
- data/vendor/pygments-main/pygments/styles/fruity.py +7 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +7 -1
- data/vendor/pygments-main/pygments/styles/gruvbox.py +10 -1
- data/vendor/pygments-main/pygments/styles/igor.py +6 -1
- data/vendor/pygments-main/pygments/styles/inkpot.py +7 -2
- data/vendor/pygments-main/pygments/styles/lightbulb.py +110 -0
- data/vendor/pygments-main/pygments/styles/lilypond.py +8 -2
- data/vendor/pygments-main/pygments/styles/lovelace.py +16 -10
- data/vendor/pygments-main/pygments/styles/manni.py +7 -2
- data/vendor/pygments-main/pygments/styles/material.py +21 -14
- data/vendor/pygments-main/pygments/styles/monokai.py +16 -10
- data/vendor/pygments-main/pygments/styles/murphy.py +7 -2
- data/vendor/pygments-main/pygments/styles/native.py +10 -5
- data/vendor/pygments-main/pygments/styles/nord.py +9 -3
- data/vendor/pygments-main/pygments/styles/onedark.py +6 -2
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +7 -2
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +7 -2
- data/vendor/pygments-main/pygments/styles/pastie.py +7 -1
- data/vendor/pygments-main/pygments/styles/perldoc.py +7 -1
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +26 -19
- data/vendor/pygments-main/pygments/styles/rrt.py +8 -2
- data/vendor/pygments-main/pygments/styles/sas.py +6 -1
- data/vendor/pygments-main/pygments/styles/solarized.py +9 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +6 -1
- data/vendor/pygments-main/pygments/styles/stata_dark.py +6 -2
- data/vendor/pygments-main/pygments/styles/stata_light.py +6 -1
- data/vendor/pygments-main/pygments/styles/tango.py +7 -3
- data/vendor/pygments-main/pygments/styles/trac.py +7 -1
- data/vendor/pygments-main/pygments/styles/vim.py +7 -1
- data/vendor/pygments-main/pygments/styles/vs.py +7 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +6 -1
- data/vendor/pygments-main/pygments/styles/zenburn.py +6 -1
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +5 -5
- data/vendor/pygments-main/pygments/util.py +13 -19
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/METADATA +14 -13
- data/vendor/pygments-main/pygments-2.18.0.dist-info/RECORD +663 -0
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/WHEEL +1 -2
- data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/AUTHORS +13 -0
- metadata +41 -17
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +0 -614
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/top_level.txt +0 -1
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info}/entry_points.txt +0 -0
- /data/vendor/pygments-main/{Pygments-2.15.1.dist-info → pygments-2.18.0.dist-info/licenses}/LICENSE +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3ae31d18e15cd98c6832a2f2cde3b5bbf96c6a5dd23a91c425e990389dadcf
|
4
|
+
data.tar.gz: 6940996fda2e470a0204b4c48086aa2829abb4e59118bc41473384d4c0924bb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4e8bf20e67061d3c630ce1b659c22edaa9af08bca7245480a3592fac77ba617fa57b2f15e75222d1fd3d4ffa1315170d07279a6f0af3820dcae598a48e59d5
|
7
|
+
data.tar.gz: 634a4c6ed46960cb8e8a65283191b74ce8701b3e741692f9231e128f8ab7c632591d7e0d599d4ca6b2acc4f47f8d3339b93070cfc3c382335074627dcfc9e4af
|
data/.github/workflows/ci.yml
CHANGED
@@ -6,34 +6,34 @@ on:
|
|
6
6
|
pull_request:
|
7
7
|
jobs:
|
8
8
|
rubocop:
|
9
|
-
runs-on: ubuntu-
|
9
|
+
runs-on: ubuntu-22.04
|
10
10
|
steps:
|
11
11
|
- name: Checkout
|
12
|
-
uses: actions/checkout@
|
12
|
+
uses: actions/checkout@v4
|
13
13
|
- name: Set up Ruby
|
14
14
|
uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
|
-
ruby-version: '3.
|
16
|
+
ruby-version: '3.3'
|
17
17
|
bundler-cache: true
|
18
18
|
- name: Rubocop
|
19
19
|
run: bundle exec rubocop
|
20
20
|
build:
|
21
21
|
strategy:
|
22
22
|
matrix:
|
23
|
-
ruby: [ 'jruby-9.
|
24
|
-
python: [ '3.
|
25
|
-
platform: [ ubuntu-
|
23
|
+
ruby: [ 'jruby-9.3', 'jruby-9.4', '2.6', '3.3' ]
|
24
|
+
python: [ '3.8', '3.12' ]
|
25
|
+
platform: [ ubuntu-22.04, macos-12, windows-2019 ]
|
26
26
|
runs-on: ${{ matrix.platform }}
|
27
27
|
steps:
|
28
28
|
- name: Checkout
|
29
|
-
uses: actions/checkout@
|
29
|
+
uses: actions/checkout@v4
|
30
30
|
- name: Setup Ruby
|
31
31
|
uses: ruby/setup-ruby@v1
|
32
32
|
with:
|
33
33
|
ruby-version: ${{ matrix.ruby }}
|
34
34
|
bundler-cache: true
|
35
35
|
- name: Setup Python
|
36
|
-
uses: actions/setup-python@
|
36
|
+
uses: actions/setup-python@v5
|
37
37
|
with:
|
38
38
|
python-version: ${{ matrix.python }}
|
39
39
|
- name: Run Tests
|
@@ -4,18 +4,18 @@ on:
|
|
4
4
|
tags: [ '*' ]
|
5
5
|
jobs:
|
6
6
|
build:
|
7
|
-
runs-on: ubuntu-
|
7
|
+
runs-on: ubuntu-22.04
|
8
8
|
steps:
|
9
|
-
- uses: actions/checkout@
|
9
|
+
- uses: actions/checkout@v4
|
10
10
|
- name: Set up Ruby
|
11
11
|
uses: ruby/setup-ruby@v1
|
12
12
|
with:
|
13
|
-
ruby-version: '3.
|
13
|
+
ruby-version: '3.3'
|
14
14
|
bundler-cache: true
|
15
15
|
- name: Setup Python
|
16
|
-
uses: actions/setup-python@
|
16
|
+
uses: actions/setup-python@v5
|
17
17
|
with:
|
18
|
-
python-version: '3.
|
18
|
+
python-version: '3.12'
|
19
19
|
- name: Build
|
20
20
|
run: bundle exec rake build
|
21
21
|
- name: Publish to RubyGems.org
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGELOG.adoc
CHANGED
@@ -5,6 +5,18 @@
|
|
5
5
|
This document provides a high-level view of the changes to the {project-name} by release.
|
6
6
|
For a detailed view of what has changed, refer to the {uri-repo}/commits/master[commit history] on GitHub.
|
7
7
|
|
8
|
+
== 3.0.0 (2024-05-14) - @slonopotamus
|
9
|
+
|
10
|
+
* Drop support for Ruby 2.5.
|
11
|
+
The oldest supported is 3.6 now.
|
12
|
+
* Drop support for Python 3.6 and 3.7.
|
13
|
+
The oldest supported is 3.8 now.
|
14
|
+
* Update Pygments to 2.18.0
|
15
|
+
|
16
|
+
== 2.4.1 (2023-11-13) - @slonopotamus
|
17
|
+
|
18
|
+
* Fix handling of Python virtual environments on Windows ({uri-repo})/issues/256[#256])
|
19
|
+
|
8
20
|
== 2.4.0
|
9
21
|
|
10
22
|
* Update Pygments to 2.15.1
|
data/README.adoc
CHANGED
data/lib/pygments/popen.rb
CHANGED
@@ -196,9 +196,9 @@ module Pygments
|
|
196
196
|
# Detect a suitable Python binary to use.
|
197
197
|
def find_python_binary
|
198
198
|
if Gem.win_platform?
|
199
|
+
return 'python3' if which('python3')
|
200
|
+
return 'python' if which('python')
|
199
201
|
return %w[py -3] if which('py')
|
200
|
-
|
201
|
-
return [%w[python3 python].find { |py| !which(py).nil? }]
|
202
202
|
end
|
203
203
|
|
204
204
|
# On non-Windows platforms, we simply rely on shebang
|
data/lib/pygments/version.rb
CHANGED
data/pygments.rb.gemspec
CHANGED
@@ -22,11 +22,11 @@ Gem::Specification.new do |s|
|
|
22
22
|
'source_code_uri' => s.homepage
|
23
23
|
}
|
24
24
|
|
25
|
-
s.required_ruby_version = '>= 2.
|
25
|
+
s.required_ruby_version = '>= 2.6.0'
|
26
26
|
|
27
|
-
s.add_development_dependency 'rake', '~> 13.
|
27
|
+
s.add_development_dependency 'rake', '~> 13.2.0'
|
28
28
|
s.add_development_dependency 'rubocop', '~> 1.28.2'
|
29
|
-
s.add_development_dependency 'test-unit', '~> 3.
|
29
|
+
s.add_development_dependency 'test-unit', '~> 3.6.0'
|
30
30
|
|
31
31
|
s.files = `git ls-files -z`.split("\0").reject { |f| File.symlink?(f) }
|
32
32
|
end
|
@@ -21,12 +21,12 @@
|
|
21
21
|
.. _Pygments master branch:
|
22
22
|
https://github.com/pygments/pygments/archive/master.zip#egg=Pygments-dev
|
23
23
|
|
24
|
-
:copyright: Copyright 2006-
|
24
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
25
25
|
:license: BSD, see LICENSE for details.
|
26
26
|
"""
|
27
27
|
from io import StringIO, BytesIO
|
28
28
|
|
29
|
-
__version__ = '2.
|
29
|
+
__version__ = '2.18.0'
|
30
30
|
__docformat__ = 'restructuredtext'
|
31
31
|
|
32
32
|
__all__ = ['lex', 'format', 'highlight']
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Command line interface.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -68,19 +68,19 @@ def _print_help(what, name):
|
|
68
68
|
try:
|
69
69
|
if what == 'lexer':
|
70
70
|
cls = get_lexer_by_name(name)
|
71
|
-
print("Help on the
|
71
|
+
print(f"Help on the {cls.name} lexer:")
|
72
72
|
print(dedent(cls.__doc__))
|
73
73
|
elif what == 'formatter':
|
74
74
|
cls = find_formatter_class(name)
|
75
|
-
print("Help on the
|
75
|
+
print(f"Help on the {cls.name} formatter:")
|
76
76
|
print(dedent(cls.__doc__))
|
77
77
|
elif what == 'filter':
|
78
78
|
cls = find_filter_class(name)
|
79
|
-
print("Help on the
|
79
|
+
print(f"Help on the {name} filter:")
|
80
80
|
print(dedent(cls.__doc__))
|
81
81
|
return 0
|
82
82
|
except (AttributeError, ValueError):
|
83
|
-
print("
|
83
|
+
print(f"{what} not found!", file=sys.stderr)
|
84
84
|
return 1
|
85
85
|
|
86
86
|
|
@@ -97,7 +97,7 @@ def _print_list(what):
|
|
97
97
|
info.append(tup)
|
98
98
|
info.sort()
|
99
99
|
for i in info:
|
100
|
-
print(('*
|
100
|
+
print(('* {}\n {} {}').format(*i))
|
101
101
|
|
102
102
|
elif what == 'formatter':
|
103
103
|
print()
|
@@ -112,7 +112,7 @@ def _print_list(what):
|
|
112
112
|
info.append(tup)
|
113
113
|
info.sort()
|
114
114
|
for i in info:
|
115
|
-
print(('*
|
115
|
+
print(('* {}\n {} {}').format(*i))
|
116
116
|
|
117
117
|
elif what == 'filter':
|
118
118
|
print()
|
@@ -122,7 +122,7 @@ def _print_list(what):
|
|
122
122
|
for name in get_all_filters():
|
123
123
|
cls = find_filter_class(name)
|
124
124
|
print("* " + name + ':')
|
125
|
-
print("
|
125
|
+
print(f" {docstring_headline(cls)}")
|
126
126
|
|
127
127
|
elif what == 'style':
|
128
128
|
print()
|
@@ -132,7 +132,7 @@ def _print_list(what):
|
|
132
132
|
for name in get_all_styles():
|
133
133
|
cls = get_style_by_name(name)
|
134
134
|
print("* " + name + ':')
|
135
|
-
print("
|
135
|
+
print(f" {docstring_headline(cls)}")
|
136
136
|
|
137
137
|
|
138
138
|
def _print_list_as_json(requested_items):
|
@@ -185,8 +185,8 @@ def main_inner(parser, argns):
|
|
185
185
|
return 0
|
186
186
|
|
187
187
|
if argns.V:
|
188
|
-
print('Pygments version
|
189
|
-
'Chajdas and contributors.'
|
188
|
+
print(f'Pygments version {__version__}, (c) 2006-2024 by Georg Brandl, Matthäus '
|
189
|
+
'Chajdas and contributors.')
|
190
190
|
return 0
|
191
191
|
|
192
192
|
def is_only_option(opt):
|
@@ -659,7 +659,7 @@ def main(args=sys.argv):
|
|
659
659
|
msg = info[-1].strip()
|
660
660
|
if len(info) >= 3:
|
661
661
|
# extract relevant file and position info
|
662
|
-
msg += '\n (f
|
662
|
+
msg += '\n (f{})'.format(info[-2].split('\n')[0].strip()[1:])
|
663
663
|
print(file=sys.stderr)
|
664
664
|
print('*** Error while highlighting:', file=sys.stderr)
|
665
665
|
print(msg, file=sys.stderr)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Format colored console output.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -27,12 +27,12 @@ light_colors = ["brightblack", "brightred", "brightgreen", "brightyellow", "brig
|
|
27
27
|
"brightmagenta", "brightcyan", "white"]
|
28
28
|
|
29
29
|
x = 30
|
30
|
-
for
|
31
|
-
codes[
|
32
|
-
codes[
|
30
|
+
for dark, light in zip(dark_colors, light_colors):
|
31
|
+
codes[dark] = esc + "%im" % x
|
32
|
+
codes[light] = esc + "%im" % (60 + x)
|
33
33
|
x += 1
|
34
34
|
|
35
|
-
del
|
35
|
+
del dark, light, x
|
36
36
|
|
37
37
|
codes["white"] = codes["bold"]
|
38
38
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Module that implements the default filter.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -62,8 +62,7 @@ class FunctionFilter(Filter):
|
|
62
62
|
|
63
63
|
def __init__(self, **options):
|
64
64
|
if not hasattr(self, 'function'):
|
65
|
-
raise TypeError('
|
66
|
-
self.__class__.__name__)
|
65
|
+
raise TypeError(f'{self.__class__.__name__!r} used without bound function')
|
67
66
|
Filter.__init__(self, **options)
|
68
67
|
|
69
68
|
def filter(self, lexer, stream):
|
@@ -5,7 +5,7 @@
|
|
5
5
|
Module containing filter lookup functions and default
|
6
6
|
filters.
|
7
7
|
|
8
|
-
:copyright: Copyright 2006-
|
8
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
9
9
|
:license: BSD, see LICENSE for details.
|
10
10
|
"""
|
11
11
|
|
@@ -39,7 +39,7 @@ def get_filter_by_name(filtername, **options):
|
|
39
39
|
if cls:
|
40
40
|
return cls(**options)
|
41
41
|
else:
|
42
|
-
raise ClassNotFound('filter
|
42
|
+
raise ClassNotFound(f'filter {filtername!r} not found')
|
43
43
|
|
44
44
|
|
45
45
|
def get_all_filters():
|
@@ -79,9 +79,9 @@ class CodeTagFilter(Filter):
|
|
79
79
|
Filter.__init__(self, **options)
|
80
80
|
tags = get_list_opt(options, 'codetags',
|
81
81
|
['XXX', 'TODO', 'FIXME', 'BUG', 'NOTE'])
|
82
|
-
self.tag_re = re.compile(r'\b(
|
82
|
+
self.tag_re = re.compile(r'\b({})\b'.format('|'.join([
|
83
83
|
re.escape(tag) for tag in tags if tag
|
84
|
-
]))
|
84
|
+
])))
|
85
85
|
|
86
86
|
def filter(self, lexer, stream):
|
87
87
|
regex = self.tag_re
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Base formatter class.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -122,3 +122,8 @@ class Formatter:
|
|
122
122
|
# wrap the outfile in a StreamWriter
|
123
123
|
outfile = codecs.lookup(self.encoding)[3](outfile)
|
124
124
|
return self.format_unencoded(tokensource, outfile)
|
125
|
+
|
126
|
+
# Allow writing Formatter[str] or Formatter[bytes]. That's equivalent to
|
127
|
+
# Formatter. This helps when using third-party type stubs from typeshed.
|
128
|
+
def __class_getitem__(cls, name):
|
129
|
+
return cls
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Pygments formatters.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -77,7 +77,7 @@ def get_formatter_by_name(_alias, **options):
|
|
77
77
|
"""
|
78
78
|
cls = find_formatter_class(_alias)
|
79
79
|
if cls is None:
|
80
|
-
raise ClassNotFound("no formatter found for name
|
80
|
+
raise ClassNotFound(f"no formatter found for name {_alias!r}")
|
81
81
|
return cls(**options)
|
82
82
|
|
83
83
|
|
@@ -103,17 +103,16 @@ def load_formatter_from_file(filename, formattername="CustomFormatter", **option
|
|
103
103
|
exec(f.read(), custom_namespace)
|
104
104
|
# Retrieve the class `formattername` from that namespace
|
105
105
|
if formattername not in custom_namespace:
|
106
|
-
raise ClassNotFound('no valid
|
107
|
-
(formattername, filename))
|
106
|
+
raise ClassNotFound(f'no valid {formattername} class found in {filename}')
|
108
107
|
formatter_class = custom_namespace[formattername]
|
109
108
|
# And finally instantiate it with the options
|
110
109
|
return formatter_class(**options)
|
111
110
|
except OSError as err:
|
112
|
-
raise ClassNotFound('cannot read
|
111
|
+
raise ClassNotFound(f'cannot read {filename}: {err}')
|
113
112
|
except ClassNotFound:
|
114
113
|
raise
|
115
114
|
except Exception as err:
|
116
|
-
raise ClassNotFound('error when loading custom formatter:
|
115
|
+
raise ClassNotFound(f'error when loading custom formatter: {err}')
|
117
116
|
|
118
117
|
|
119
118
|
def get_formatter_for_filename(fn, **options):
|
@@ -131,11 +130,11 @@ def get_formatter_for_filename(fn, **options):
|
|
131
130
|
if name not in _formatter_cache:
|
132
131
|
_load_formatters(modname)
|
133
132
|
return _formatter_cache[name](**options)
|
134
|
-
for cls in find_plugin_formatters():
|
133
|
+
for _name, cls in find_plugin_formatters():
|
135
134
|
for filename in cls.filenames:
|
136
135
|
if _fn_matches(fn, filename):
|
137
136
|
return cls(**options)
|
138
|
-
raise ClassNotFound("no formatter found for file name
|
137
|
+
raise ClassNotFound(f"no formatter found for file name {fn!r}")
|
139
138
|
|
140
139
|
|
141
140
|
class _automodule(types.ModuleType):
|
File without changes
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
BBcode formatter.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -60,7 +60,7 @@ class BBCodeFormatter(Formatter):
|
|
60
60
|
for ttype, ndef in self.style:
|
61
61
|
start = end = ''
|
62
62
|
if ndef['color']:
|
63
|
-
start += '[color
|
63
|
+
start += '[color=#{}]'.format(ndef['color'])
|
64
64
|
end = '[/color]' + end
|
65
65
|
if ndef['bold']:
|
66
66
|
start += '[b]'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Formatter for groff output.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -63,7 +63,7 @@ class GroffFormatter(Formatter):
|
|
63
63
|
for ttype, ndef in self.style:
|
64
64
|
start = end = ''
|
65
65
|
if ndef['color']:
|
66
|
-
start += '\\m[
|
66
|
+
start += '\\m[{}]'.format(ndef['color'])
|
67
67
|
end = '\\m[]' + end
|
68
68
|
if ndef['bold']:
|
69
69
|
start += bold
|
@@ -72,7 +72,7 @@ class GroffFormatter(Formatter):
|
|
72
72
|
start += italic
|
73
73
|
end = regular + end
|
74
74
|
if ndef['bgcolor']:
|
75
|
-
start += '\\M[
|
75
|
+
start += '\\M[{}]'.format(ndef['bgcolor'])
|
76
76
|
end = '\\M[]' + end
|
77
77
|
|
78
78
|
self.styles[ttype] = start, end
|