pygments.rb 2.3.1 → 2.4.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 +1 -1
- data/.rubocop.yml +7 -0
- data/CHANGELOG.adoc +4 -0
- data/README.adoc +1 -1
- data/bench.rb +1 -1
- data/lib/pygments/popen.rb +3 -7
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -2
- data/test/test_pygments.rb +0 -19
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/AUTHORS +21 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/LICENSE +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/METADATA +19 -11
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +614 -0
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/WHEEL +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/entry_points.txt +0 -1
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +20 -22
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +74 -8
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +6 -3
- data/vendor/pygments-main/pygments/formatter.py +41 -11
- data/vendor/pygments-main/pygments/formatters/__init__.py +21 -16
- data/vendor/pygments-main/pygments/formatters/_mapping.py +5 -65
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/groff.py +170 -0
- data/vendor/pygments-main/pygments/formatters/html.py +54 -32
- data/vendor/pygments-main/pygments/formatters/img.py +9 -5
- data/vendor/pygments-main/pygments/formatters/irc.py +6 -33
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -14
- data/vendor/pygments-main/pygments/formatters/other.py +1 -1
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +1 -1
- data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
- data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -3
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -4
- data/vendor/pygments-main/pygments/lexer.py +101 -32
- data/vendor/pygments-main/pygments/lexers/__init__.py +50 -29
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +103 -0
- 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 +21 -6
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +558 -0
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +10 -0
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +4932 -0
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +11 -18
- data/vendor/pygments-main/pygments/lexers/_mapping.py +71 -82
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +58 -4
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +408 -1835
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +70 -8
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +666 -0
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1609 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +9 -18
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +185 -94
- 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 +15 -14
- data/vendor/pygments-main/pygments/lexers/ada.py +144 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +72 -9
- data/vendor/pygments-main/pygments/lexers/ambient.py +8 -7
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +4 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +10 -8
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +164 -20
- data/vendor/pygments-main/pygments/lexers/apl.py +6 -5
- data/vendor/pygments-main/pygments/lexers/archetype.py +23 -21
- data/vendor/pygments-main/pygments/lexers/arrow.py +10 -9
- data/vendor/pygments-main/pygments/lexers/arturo.py +250 -0
- data/vendor/pygments-main/pygments/lexers/asc.py +9 -5
- data/vendor/pygments-main/pygments/lexers/asm.py +68 -63
- data/vendor/pygments-main/pygments/lexers/automation.py +7 -5
- data/vendor/pygments-main/pygments/lexers/bare.py +20 -21
- data/vendor/pygments-main/pygments/lexers/basic.py +45 -41
- data/vendor/pygments-main/pygments/lexers/bdd.py +58 -0
- data/vendor/pygments-main/pygments/lexers/berry.py +99 -0
- data/vendor/pygments-main/pygments/lexers/bibtex.py +6 -6
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -8
- data/vendor/pygments-main/pygments/lexers/business.py +18 -18
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +80 -40
- data/vendor/pygments-main/pygments/lexers/c_like.py +21 -19
- data/vendor/pygments-main/pygments/lexers/capnproto.py +6 -8
- data/vendor/pygments-main/pygments/lexers/carbon.py +96 -0
- data/vendor/pygments-main/pygments/lexers/cddl.py +16 -33
- data/vendor/pygments-main/pygments/lexers/chapel.py +14 -9
- data/vendor/pygments-main/pygments/lexers/clean.py +3 -2
- data/vendor/pygments-main/pygments/lexers/comal.py +80 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +3 -2
- data/vendor/pygments-main/pygments/lexers/configs.py +235 -120
- data/vendor/pygments-main/pygments/lexers/console.py +5 -4
- data/vendor/pygments-main/pygments/lexers/cplint.py +44 -0
- data/vendor/pygments-main/pygments/lexers/crystal.py +22 -23
- data/vendor/pygments-main/pygments/lexers/csound.py +19 -17
- data/vendor/pygments-main/pygments/lexers/css.py +67 -159
- data/vendor/pygments-main/pygments/lexers/d.py +15 -12
- data/vendor/pygments-main/pygments/lexers/dalvik.py +14 -11
- data/vendor/pygments-main/pygments/lexers/data.py +119 -49
- data/vendor/pygments-main/pygments/lexers/dax.py +136 -0
- data/vendor/pygments-main/pygments/lexers/devicetree.py +9 -8
- data/vendor/pygments-main/pygments/lexers/diff.py +23 -19
- data/vendor/pygments-main/pygments/lexers/dotnet.py +216 -81
- data/vendor/pygments-main/pygments/lexers/dsls.py +86 -64
- data/vendor/pygments-main/pygments/lexers/dylan.py +16 -15
- data/vendor/pygments-main/pygments/lexers/ecl.py +46 -38
- data/vendor/pygments-main/pygments/lexers/eiffel.py +15 -10
- data/vendor/pygments-main/pygments/lexers/elm.py +12 -8
- data/vendor/pygments-main/pygments/lexers/elpi.py +165 -0
- data/vendor/pygments-main/pygments/lexers/email.py +21 -39
- data/vendor/pygments-main/pygments/lexers/erlang.py +21 -22
- data/vendor/pygments-main/pygments/lexers/esoteric.py +28 -30
- data/vendor/pygments-main/pygments/lexers/ezhil.py +10 -9
- data/vendor/pygments-main/pygments/lexers/factor.py +104 -83
- data/vendor/pygments-main/pygments/lexers/fantom.py +31 -29
- data/vendor/pygments-main/pygments/lexers/felix.py +18 -14
- data/vendor/pygments-main/pygments/lexers/fift.py +67 -0
- data/vendor/pygments-main/pygments/lexers/floscript.py +7 -7
- data/vendor/pygments-main/pygments/lexers/forth.py +8 -6
- data/vendor/pygments-main/pygments/lexers/fortran.py +16 -11
- data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
- data/vendor/pygments-main/pygments/lexers/freefem.py +7 -10
- data/vendor/pygments-main/pygments/lexers/func.py +108 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +12 -17
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +1 -2
- data/vendor/pygments-main/pygments/lexers/gdscript.py +76 -233
- data/vendor/pygments-main/pygments/lexers/go.py +12 -14
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +22 -26
- data/vendor/pygments-main/pygments/lexers/graph.py +36 -15
- data/vendor/pygments-main/pygments/lexers/graphics.py +37 -38
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -1
- data/vendor/pygments-main/pygments/lexers/gsql.py +39 -27
- data/vendor/pygments-main/pygments/lexers/haskell.py +73 -71
- data/vendor/pygments-main/pygments/lexers/haxe.py +13 -11
- data/vendor/pygments-main/pygments/lexers/hdl.py +31 -34
- data/vendor/pygments-main/pygments/lexers/hexdump.py +21 -21
- data/vendor/pygments-main/pygments/lexers/html.py +11 -19
- data/vendor/pygments-main/pygments/lexers/idl.py +10 -5
- data/vendor/pygments-main/pygments/lexers/igor.py +3 -2
- data/vendor/pygments-main/pygments/lexers/inferno.py +9 -8
- data/vendor/pygments-main/pygments/lexers/installers.py +39 -33
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +35 -20
- data/vendor/pygments-main/pygments/lexers/iolang.py +9 -9
- data/vendor/pygments-main/pygments/lexers/j.py +20 -13
- data/vendor/pygments-main/pygments/lexers/javascript.py +183 -149
- data/vendor/pygments-main/pygments/lexers/jmespath.py +68 -0
- data/vendor/pygments-main/pygments/lexers/jslt.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +168 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +44 -32
- data/vendor/pygments-main/pygments/lexers/jvm.py +161 -140
- data/vendor/pygments-main/pygments/lexers/kuin.py +93 -59
- data/vendor/pygments-main/pygments/lexers/lilypond.py +226 -0
- data/vendor/pygments-main/pygments/lexers/lisp.py +244 -107
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +1739 -0
- data/vendor/pygments-main/pygments/lexers/make.py +21 -16
- data/vendor/pygments-main/pygments/lexers/markup.py +752 -11
- data/vendor/pygments-main/pygments/lexers/math.py +1 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +18 -3
- data/vendor/pygments-main/pygments/lexers/maxima.py +85 -0
- data/vendor/pygments-main/pygments/lexers/meson.py +10 -25
- data/vendor/pygments-main/pygments/lexers/mime.py +2 -2
- data/vendor/pygments-main/pygments/lexers/minecraft.py +394 -0
- data/vendor/pygments-main/pygments/lexers/mips.py +128 -0
- data/vendor/pygments-main/pygments/lexers/ml.py +9 -6
- data/vendor/pygments-main/pygments/lexers/modeling.py +12 -8
- data/vendor/pygments-main/pygments/lexers/modula2.py +3 -2
- data/vendor/pygments-main/pygments/lexers/monte.py +3 -2
- data/vendor/pygments-main/pygments/lexers/mosel.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ncl.py +1 -1
- data/vendor/pygments-main/pygments/lexers/nimrod.py +62 -20
- data/vendor/pygments-main/pygments/lexers/nit.py +3 -2
- data/vendor/pygments-main/pygments/lexers/nix.py +5 -5
- data/vendor/pygments-main/pygments/lexers/oberon.py +2 -2
- data/vendor/pygments-main/pygments/lexers/objective.py +6 -4
- data/vendor/pygments-main/pygments/lexers/ooc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/other.py +1 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +3 -2
- data/vendor/pygments-main/pygments/lexers/parsers.py +23 -21
- data/vendor/pygments-main/pygments/lexers/pascal.py +196 -198
- data/vendor/pygments-main/pygments/lexers/pawn.py +1 -1
- data/vendor/pygments-main/pygments/lexers/perl.py +17 -15
- data/vendor/pygments-main/pygments/lexers/phix.py +364 -0
- data/vendor/pygments-main/pygments/lexers/php.py +35 -20
- data/vendor/pygments-main/pygments/lexers/pointless.py +3 -2
- data/vendor/pygments-main/pygments/lexers/pony.py +1 -1
- data/vendor/pygments-main/pygments/lexers/praat.py +41 -38
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +7 -8
- data/vendor/pygments-main/pygments/lexers/promql.py +5 -12
- data/vendor/pygments-main/pygments/lexers/python.py +145 -119
- data/vendor/pygments-main/pygments/lexers/q.py +188 -0
- data/vendor/pygments-main/pygments/lexers/qlik.py +117 -0
- data/vendor/pygments-main/pygments/lexers/qvt.py +1 -1
- data/vendor/pygments-main/pygments/lexers/r.py +4 -4
- data/vendor/pygments-main/pygments/lexers/rdf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/rebol.py +1 -12
- data/vendor/pygments-main/pygments/lexers/resource.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ride.py +3 -2
- data/vendor/pygments-main/pygments/lexers/rita.py +43 -0
- data/vendor/pygments-main/pygments/lexers/rnc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/roboconf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/robotframework.py +6 -5
- data/vendor/pygments-main/pygments/lexers/ruby.py +24 -24
- data/vendor/pygments-main/pygments/lexers/rust.py +3 -2
- data/vendor/pygments-main/pygments/lexers/sas.py +2 -2
- data/vendor/pygments-main/pygments/lexers/savi.py +170 -0
- data/vendor/pygments-main/pygments/lexers/scdoc.py +4 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +24 -21
- data/vendor/pygments-main/pygments/lexers/sgf.py +6 -6
- data/vendor/pygments-main/pygments/lexers/shell.py +29 -21
- data/vendor/pygments-main/pygments/lexers/sieve.py +14 -4
- data/vendor/pygments-main/pygments/lexers/slash.py +1 -1
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +5 -3
- data/vendor/pygments-main/pygments/lexers/smithy.py +5 -6
- data/vendor/pygments-main/pygments/lexers/smv.py +1 -1
- data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -7
- data/vendor/pygments-main/pygments/lexers/sophia.py +103 -0
- data/vendor/pygments-main/pygments/lexers/special.py +2 -5
- data/vendor/pygments-main/pygments/lexers/spice.py +71 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +212 -17
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +62 -0
- data/vendor/pygments-main/pygments/lexers/stata.py +4 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +4 -3
- data/vendor/pygments-main/pygments/lexers/tal.py +74 -0
- data/vendor/pygments-main/pygments/lexers/tcl.py +21 -16
- data/vendor/pygments-main/pygments/lexers/teal.py +9 -8
- data/vendor/pygments-main/pygments/lexers/templates.py +62 -29
- data/vendor/pygments-main/pygments/lexers/teraterm.py +12 -20
- data/vendor/pygments-main/pygments/lexers/testing.py +6 -2
- data/vendor/pygments-main/pygments/lexers/text.py +3 -2
- data/vendor/pygments-main/pygments/lexers/textedit.py +41 -7
- data/vendor/pygments-main/pygments/lexers/textfmts.py +7 -5
- data/vendor/pygments-main/pygments/lexers/theorem.py +42 -36
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +2 -4
- data/vendor/pygments-main/pygments/lexers/tlb.py +57 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +3 -4
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +2 -4
- data/vendor/pygments-main/pygments/lexers/typoscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ul4.py +267 -0
- data/vendor/pygments-main/pygments/lexers/unicon.py +1 -1
- data/vendor/pygments-main/pygments/lexers/urbi.py +4 -4
- data/vendor/pygments-main/pygments/lexers/usd.py +2 -1
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -3
- data/vendor/pygments-main/pygments/lexers/web.py +1 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +5 -5
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webmisc.py +90 -71
- data/vendor/pygments-main/pygments/lexers/wgsl.py +407 -0
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -1
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +120 -0
- data/vendor/pygments-main/pygments/lexers/wren.py +99 -0
- data/vendor/pygments-main/pygments/lexers/x10.py +5 -6
- data/vendor/pygments-main/pygments/lexers/xorg.py +3 -2
- data/vendor/pygments-main/pygments/lexers/yang.py +6 -5
- data/vendor/pygments-main/pygments/lexers/zig.py +3 -2
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +28 -9
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +2 -2
- data/vendor/pygments-main/pygments/sphinxext.py +63 -1
- data/vendor/pygments-main/pygments/style.py +7 -1
- data/vendor/pygments-main/pygments/styles/__init__.py +19 -5
- data/vendor/pygments-main/pygments/styles/abap.py +2 -2
- data/vendor/pygments-main/pygments/styles/algol.py +1 -2
- data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
- data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -3
- data/vendor/pygments-main/pygments/styles/borland.py +1 -3
- data/vendor/pygments-main/pygments/styles/bw.py +1 -2
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -3
- data/vendor/pygments-main/pygments/styles/default.py +13 -14
- data/vendor/pygments-main/pygments/styles/dracula.py +102 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +75 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +107 -0
- data/vendor/pygments-main/pygments/styles/gruvbox.py +4 -2
- data/vendor/pygments-main/pygments/styles/igor.py +1 -2
- data/vendor/pygments-main/pygments/styles/inkpot.py +3 -2
- data/vendor/pygments-main/pygments/styles/lilypond.py +56 -0
- data/vendor/pygments-main/pygments/styles/lovelace.py +1 -3
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/material.py +1 -2
- data/vendor/pygments-main/pygments/styles/monokai.py +3 -3
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -3
- data/vendor/pygments-main/pygments/styles/native.py +11 -11
- data/vendor/pygments-main/pygments/styles/nord.py +150 -0
- data/vendor/pygments-main/pygments/styles/onedark.py +59 -0
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -6
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -6
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -3
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +3 -3
- data/vendor/pygments-main/pygments/styles/rrt.py +3 -2
- data/vendor/pygments-main/pygments/styles/sas.py +2 -4
- data/vendor/pygments-main/pygments/styles/solarized.py +1 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +26 -0
- data/vendor/pygments-main/pygments/styles/stata_dark.py +4 -6
- data/vendor/pygments-main/pygments/styles/stata_light.py +1 -2
- data/vendor/pygments-main/pygments/styles/tango.py +2 -3
- data/vendor/pygments-main/pygments/styles/trac.py +1 -3
- data/vendor/pygments-main/pygments/styles/vim.py +1 -2
- data/vendor/pygments-main/pygments/styles/vs.py +1 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +1 -3
- data/vendor/pygments-main/pygments/styles/zenburn.py +4 -6
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +4 -6
- data/vendor/pygments-main/pygments/util.py +27 -5
- metadata +59 -14
- data/vendor/pygments-main/Pygments-2.10.0.dist-info/RECORD +0 -524
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/top_level.txt +0 -0
@@ -4,12 +4,12 @@
|
|
4
4
|
|
5
5
|
Lexers for hexadecimal dumps.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
from pygments.lexer import RegexLexer, bygroups, include
|
12
|
-
from pygments.token import
|
12
|
+
from pygments.token import Name, Number, String, Punctuation, Whitespace
|
13
13
|
|
14
14
|
__all__ = ['HexdumpLexer']
|
15
15
|
|
@@ -43,22 +43,22 @@ class HexdumpLexer(RegexLexer):
|
|
43
43
|
|
44
44
|
tokens = {
|
45
45
|
'root': [
|
46
|
-
(r'\n',
|
46
|
+
(r'\n', Whitespace),
|
47
47
|
include('offset'),
|
48
48
|
(r'('+hd+r'{2})(\-)('+hd+r'{2})',
|
49
49
|
bygroups(Number.Hex, Punctuation, Number.Hex)),
|
50
50
|
(hd+r'{2}', Number.Hex),
|
51
51
|
(r'(\s{2,3})(\>)(.{16})(\<)$',
|
52
|
-
bygroups(
|
52
|
+
bygroups(Whitespace, Punctuation, String, Punctuation), 'bracket-strings'),
|
53
53
|
(r'(\s{2,3})(\|)(.{16})(\|)$',
|
54
|
-
bygroups(
|
54
|
+
bygroups(Whitespace, Punctuation, String, Punctuation), 'piped-strings'),
|
55
55
|
(r'(\s{2,3})(\>)(.{1,15})(\<)$',
|
56
|
-
bygroups(
|
56
|
+
bygroups(Whitespace, Punctuation, String, Punctuation)),
|
57
57
|
(r'(\s{2,3})(\|)(.{1,15})(\|)$',
|
58
|
-
bygroups(
|
59
|
-
(r'(\s{2,3})(.{1,15})$', bygroups(
|
60
|
-
(r'(\s{2,3})(.{16}|.{20})$', bygroups(
|
61
|
-
(r'\s',
|
58
|
+
bygroups(Whitespace, Punctuation, String, Punctuation)),
|
59
|
+
(r'(\s{2,3})(.{1,15})$', bygroups(Whitespace, String)),
|
60
|
+
(r'(\s{2,3})(.{16}|.{20})$', bygroups(Whitespace, String), 'nonpiped-strings'),
|
61
|
+
(r'\s', Whitespace),
|
62
62
|
(r'^\*', Punctuation),
|
63
63
|
],
|
64
64
|
'offset': [
|
@@ -66,37 +66,37 @@ class HexdumpLexer(RegexLexer):
|
|
66
66
|
(r'^'+hd+'+', Name.Label),
|
67
67
|
],
|
68
68
|
'offset-mode': [
|
69
|
-
(r'\s',
|
69
|
+
(r'\s', Whitespace, '#pop'),
|
70
70
|
(hd+'+', Name.Label),
|
71
71
|
(r':', Punctuation)
|
72
72
|
],
|
73
73
|
'piped-strings': [
|
74
|
-
(r'\n',
|
74
|
+
(r'\n', Whitespace),
|
75
75
|
include('offset'),
|
76
76
|
(hd+r'{2}', Number.Hex),
|
77
77
|
(r'(\s{2,3})(\|)(.{1,16})(\|)$',
|
78
|
-
bygroups(
|
79
|
-
(r'\s',
|
78
|
+
bygroups(Whitespace, Punctuation, String, Punctuation)),
|
79
|
+
(r'\s', Whitespace),
|
80
80
|
(r'^\*', Punctuation),
|
81
81
|
],
|
82
82
|
'bracket-strings': [
|
83
|
-
(r'\n',
|
83
|
+
(r'\n', Whitespace),
|
84
84
|
include('offset'),
|
85
85
|
(hd+r'{2}', Number.Hex),
|
86
86
|
(r'(\s{2,3})(\>)(.{1,16})(\<)$',
|
87
|
-
bygroups(
|
88
|
-
(r'\s',
|
87
|
+
bygroups(Whitespace, Punctuation, String, Punctuation)),
|
88
|
+
(r'\s', Whitespace),
|
89
89
|
(r'^\*', Punctuation),
|
90
90
|
],
|
91
91
|
'nonpiped-strings': [
|
92
|
-
(r'\n',
|
92
|
+
(r'\n', Whitespace),
|
93
93
|
include('offset'),
|
94
94
|
(r'('+hd+r'{2})(\-)('+hd+r'{2})',
|
95
95
|
bygroups(Number.Hex, Punctuation, Number.Hex)),
|
96
96
|
(hd+r'{2}', Number.Hex),
|
97
|
-
(r'(\s{19,})(.{1,20}?)$', bygroups(
|
98
|
-
(r'(\s{2,3})(.{1,20})$', bygroups(
|
99
|
-
(r'\s',
|
97
|
+
(r'(\s{19,})(.{1,20}?)$', bygroups(Whitespace, String)),
|
98
|
+
(r'(\s{2,3})(.{1,20})$', bygroups(Whitespace, String)),
|
99
|
+
(r'\s', Whitespace),
|
100
100
|
(r'^\*', Punctuation),
|
101
101
|
],
|
102
102
|
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for HTML, XML and related markup.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -13,7 +13,7 @@ import re
|
|
13
13
|
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, bygroups, \
|
14
14
|
default, using
|
15
15
|
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
16
|
-
Punctuation
|
16
|
+
Punctuation, Whitespace
|
17
17
|
from pygments.util import looks_like_xml, html_doctype_matches
|
18
18
|
|
19
19
|
from pygments.lexers.javascript import JavascriptLexer
|
@@ -32,6 +32,7 @@ class HtmlLexer(RegexLexer):
|
|
32
32
|
"""
|
33
33
|
|
34
34
|
name = 'HTML'
|
35
|
+
url = 'https://html.spec.whatwg.org/'
|
35
36
|
aliases = ['html']
|
36
37
|
filenames = ['*.html', '*.htm', '*.xhtml', '*.xslt']
|
37
38
|
mimetypes = ['text/html', 'application/xhtml+xml']
|
@@ -42,7 +43,7 @@ class HtmlLexer(RegexLexer):
|
|
42
43
|
('[^<&]+', Text),
|
43
44
|
(r'&\S*?;', Name.Entity),
|
44
45
|
(r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc),
|
45
|
-
('
|
46
|
+
(r'<!--.*?-->', Comment.Multiline),
|
46
47
|
(r'<\?.*?\?>', Comment.Preproc),
|
47
48
|
('<![^>]*>', Comment.Preproc),
|
48
49
|
(r'(<)(\s*)(script)(\s*)',
|
@@ -59,11 +60,6 @@ class HtmlLexer(RegexLexer):
|
|
59
60
|
bygroups(Punctuation, Text, Punctuation, Text, Name.Tag, Text,
|
60
61
|
Punctuation)),
|
61
62
|
],
|
62
|
-
'comment': [
|
63
|
-
('[^-]+', Comment),
|
64
|
-
('-->', Comment, '#pop'),
|
65
|
-
('-', Comment),
|
66
|
-
],
|
67
63
|
'tag': [
|
68
64
|
(r'\s+', Text),
|
69
65
|
(r'([\w:-]+\s*)(=)(\s*)', bygroups(Name.Attribute, Operator, Text),
|
@@ -200,7 +196,7 @@ class XmlLexer(RegexLexer):
|
|
200
196
|
Generic lexer for XML (eXtensible Markup Language).
|
201
197
|
"""
|
202
198
|
|
203
|
-
flags = re.MULTILINE | re.DOTALL
|
199
|
+
flags = re.MULTILINE | re.DOTALL
|
204
200
|
|
205
201
|
name = 'XML'
|
206
202
|
aliases = ['xml']
|
@@ -211,27 +207,23 @@ class XmlLexer(RegexLexer):
|
|
211
207
|
|
212
208
|
tokens = {
|
213
209
|
'root': [
|
214
|
-
('[
|
210
|
+
(r'[^<&\s]+', Text),
|
211
|
+
(r'[^<&\S]+', Whitespace),
|
215
212
|
(r'&\S*?;', Name.Entity),
|
216
213
|
(r'\<\!\[CDATA\[.*?\]\]\>', Comment.Preproc),
|
217
|
-
('
|
214
|
+
(r'<!--.*?-->', Comment.Multiline),
|
218
215
|
(r'<\?.*?\?>', Comment.Preproc),
|
219
216
|
('<![^>]*>', Comment.Preproc),
|
220
217
|
(r'<\s*[\w:.-]+', Name.Tag, 'tag'),
|
221
218
|
(r'<\s*/\s*[\w:.-]+\s*>', Name.Tag),
|
222
219
|
],
|
223
|
-
'comment': [
|
224
|
-
('[^-]+', Comment),
|
225
|
-
('-->', Comment, '#pop'),
|
226
|
-
('-', Comment),
|
227
|
-
],
|
228
220
|
'tag': [
|
229
|
-
(r'\s+',
|
221
|
+
(r'\s+', Whitespace),
|
230
222
|
(r'[\w.:-]+\s*=', Name.Attribute, 'attr'),
|
231
223
|
(r'/?\s*>', Name.Tag, '#pop'),
|
232
224
|
],
|
233
225
|
'attr': [
|
234
|
-
(r'\s+',
|
226
|
+
(r'\s+', Whitespace),
|
235
227
|
('".*?"', String, '#pop'),
|
236
228
|
("'.*?'", String, '#pop'),
|
237
229
|
(r'[^\s>]+', String, '#pop'),
|
@@ -295,7 +287,7 @@ class HamlLexer(ExtendedRegexLexer):
|
|
295
287
|
flags = re.IGNORECASE
|
296
288
|
# Haml can include " |\n" anywhere,
|
297
289
|
# which is ignored and used to wrap long lines.
|
298
|
-
# To
|
290
|
+
# To accommodate this, use this custom faux dot instead.
|
299
291
|
_dot = r'(?: \|\n(?=.* \|)|.)'
|
300
292
|
|
301
293
|
# In certain places, a comma at the end of the line
|
@@ -4,14 +4,15 @@
|
|
4
4
|
|
5
5
|
Lexers for IDL.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
|
-
from pygments.lexer import RegexLexer, words
|
14
|
-
from pygments.token import Text, Comment, Operator, Keyword, Name, Number,
|
13
|
+
from pygments.lexer import RegexLexer, words, bygroups
|
14
|
+
from pygments.token import Text, Comment, Operator, Keyword, Name, Number, \
|
15
|
+
String, Whitespace
|
15
16
|
|
16
17
|
__all__ = ['IDLLexer']
|
17
18
|
|
@@ -23,6 +24,7 @@ class IDLLexer(RegexLexer):
|
|
23
24
|
.. versionadded:: 1.6
|
24
25
|
"""
|
25
26
|
name = 'IDL'
|
27
|
+
url = 'https://www.l3harrisgeospatial.com/Software-Technology/IDL'
|
26
28
|
aliases = ['idl']
|
27
29
|
filenames = ['*.pro']
|
28
30
|
mimetypes = ['text/idl']
|
@@ -248,7 +250,8 @@ class IDLLexer(RegexLexer):
|
|
248
250
|
|
249
251
|
tokens = {
|
250
252
|
'root': [
|
251
|
-
(r'^\s
|
253
|
+
(r'(^\s*)(;.*?)(\n)', bygroups(Whitespace, Comment.Single,
|
254
|
+
Whitespace)),
|
252
255
|
(words(_RESERVED, prefix=r'\b', suffix=r'\b'), Keyword),
|
253
256
|
(words(_BUILTIN_LIB, prefix=r'\b', suffix=r'\b'), Name.Builtin),
|
254
257
|
(r'\+=|-=|\^=|\*=|/=|#=|##=|<=|>=|=', Operator),
|
@@ -264,6 +267,8 @@ class IDLLexer(RegexLexer):
|
|
264
267
|
(r'\b[+\-]?[0-9]+U?L{1,2}\b', Number.Integer.Long),
|
265
268
|
(r'\b[+\-]?[0-9]+U?S?\b', Number.Integer),
|
266
269
|
(r'\b[+\-]?[0-9]+B\b', Number),
|
270
|
+
(r'[ \t]+', Whitespace),
|
271
|
+
(r'\n', Whitespace),
|
267
272
|
(r'.', Text),
|
268
273
|
]
|
269
274
|
}
|
@@ -277,4 +282,4 @@ class IDLLexer(RegexLexer):
|
|
277
282
|
if 'endswitch' in text:
|
278
283
|
result += 0.01
|
279
284
|
|
280
|
-
return result
|
285
|
+
return result
|
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
Lexers for Igor Pro.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, words
|
14
|
-
from pygments.token import Text, Comment, Keyword, Name, String
|
14
|
+
from pygments.token import Text, Comment, Keyword, Name, String, Whitespace
|
15
15
|
|
16
16
|
__all__ = ['IgorLexer']
|
17
17
|
|
@@ -413,6 +413,7 @@ class IgorLexer(RegexLexer):
|
|
413
413
|
# Compiler directives.
|
414
414
|
(r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)',
|
415
415
|
Name.Decorator),
|
416
|
+
(r'\s+', Whitespace),
|
416
417
|
(r'[^a-z"/]+$', Text),
|
417
418
|
(r'.', Text),
|
418
419
|
],
|
@@ -4,22 +4,22 @@
|
|
4
4
|
|
5
5
|
Lexers for Inferno os and all the related stuff.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, include, bygroups, default
|
14
|
-
from pygments.token import Punctuation,
|
15
|
-
Name, String, Number
|
14
|
+
from pygments.token import Punctuation, Comment, Operator, Keyword, \
|
15
|
+
Name, String, Number, Whitespace
|
16
16
|
|
17
17
|
__all__ = ['LimboLexer']
|
18
18
|
|
19
19
|
|
20
20
|
class LimboLexer(RegexLexer):
|
21
21
|
"""
|
22
|
-
Lexer for
|
22
|
+
Lexer for Limbo programming language
|
23
23
|
|
24
24
|
TODO:
|
25
25
|
- maybe implement better var declaration highlighting
|
@@ -28,16 +28,17 @@ class LimboLexer(RegexLexer):
|
|
28
28
|
.. versionadded:: 2.0
|
29
29
|
"""
|
30
30
|
name = 'Limbo'
|
31
|
+
url = 'http://www.vitanuova.com/inferno/limbo.html'
|
31
32
|
aliases = ['limbo']
|
32
33
|
filenames = ['*.b']
|
33
34
|
mimetypes = ['text/limbo']
|
34
35
|
|
35
36
|
tokens = {
|
36
37
|
'whitespace': [
|
37
|
-
(r'^(\s*)([a-zA-Z_]\w*:(\s
|
38
|
-
bygroups(
|
39
|
-
(r'\n',
|
40
|
-
(r'\s+',
|
38
|
+
(r'^(\s*)([a-zA-Z_]\w*:)(\s*\n)',
|
39
|
+
bygroups(Whitespace, Name.Label, Whitespace)),
|
40
|
+
(r'\n', Whitespace),
|
41
|
+
(r'\s+', Whitespace),
|
41
42
|
(r'#(\n|(.|\n)*?[^\\]\n)', Comment.Single),
|
42
43
|
],
|
43
44
|
'string': [
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexers for installer/packager DSLs and formats.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -20,11 +20,12 @@ __all__ = ['NSISLexer', 'RPMSpecLexer', 'SourcesListLexer',
|
|
20
20
|
|
21
21
|
class NSISLexer(RegexLexer):
|
22
22
|
"""
|
23
|
-
For
|
23
|
+
For NSIS scripts.
|
24
24
|
|
25
25
|
.. versionadded:: 1.6
|
26
26
|
"""
|
27
27
|
name = 'NSIS'
|
28
|
+
url = 'http://nsis.sourceforge.net/'
|
28
29
|
aliases = ['nsis', 'nsi', 'nsh']
|
29
30
|
filenames = ['*.nsi', '*.nsh']
|
30
31
|
mimetypes = ['text/x-nsis']
|
@@ -33,7 +34,7 @@ class NSISLexer(RegexLexer):
|
|
33
34
|
|
34
35
|
tokens = {
|
35
36
|
'root': [
|
36
|
-
(r'[;#]
|
37
|
+
(r'([;#].*)(\n)', bygroups(Comment, Whitespace)),
|
37
38
|
(r"'.*?'", String.Single),
|
38
39
|
(r'"', String.Double, 'str_double'),
|
39
40
|
(r'`', String.Backtick, 'str_backtick'),
|
@@ -42,11 +43,12 @@ class NSISLexer(RegexLexer):
|
|
42
43
|
include('basic'),
|
43
44
|
(r'\$\{[a-z_|][\w|]*\}', Keyword.Pseudo),
|
44
45
|
(r'/[a-z_]\w*', Name.Attribute),
|
45
|
-
('
|
46
|
+
(r'\s+', Whitespace),
|
47
|
+
(r'[\w.]+', Text),
|
46
48
|
],
|
47
49
|
'basic': [
|
48
50
|
(r'(\n)(Function)(\s+)([._a-z][.\w]*)\b',
|
49
|
-
bygroups(
|
51
|
+
bygroups(Whitespace, Keyword, Whitespace, Name.Function)),
|
50
52
|
(r'\b([_a-z]\w*)(::)([a-z][a-z0-9]*)\b',
|
51
53
|
bygroups(Keyword.Namespace, Punctuation, Name.Function)),
|
52
54
|
(r'\b([_a-z]\w*)(:)', bygroups(Name.Label, Punctuation)),
|
@@ -128,16 +130,16 @@ class NSISLexer(RegexLexer):
|
|
128
130
|
(r'\$[a-z_]\w*', Name.Variable),
|
129
131
|
],
|
130
132
|
'str_double': [
|
131
|
-
(r'"', String, '#pop'),
|
133
|
+
(r'"', String.Double, '#pop'),
|
132
134
|
(r'\$(\\[nrt"]|\$)', String.Escape),
|
133
135
|
include('interpol'),
|
134
|
-
(r'
|
136
|
+
(r'[^"]+', String.Double),
|
135
137
|
],
|
136
138
|
'str_backtick': [
|
137
|
-
(r'`', String, '#pop'),
|
139
|
+
(r'`', String.Double, '#pop'),
|
138
140
|
(r'\$(\\[nrt"]|\$)', String.Escape),
|
139
141
|
include('interpol'),
|
140
|
-
(r'
|
142
|
+
(r'[^`]+', String.Double),
|
141
143
|
],
|
142
144
|
}
|
143
145
|
|
@@ -159,20 +161,20 @@ class RPMSpecLexer(RegexLexer):
|
|
159
161
|
|
160
162
|
tokens = {
|
161
163
|
'root': [
|
162
|
-
(r'
|
164
|
+
(r'#.*$', Comment),
|
163
165
|
include('basic'),
|
164
166
|
],
|
165
167
|
'description': [
|
166
168
|
(r'^(%' + _directives + ')(.*)$',
|
167
169
|
bygroups(Name.Decorator, Text), '#pop'),
|
168
|
-
(r'\
|
170
|
+
(r'\s+', Whitespace),
|
169
171
|
(r'.', Text),
|
170
172
|
],
|
171
173
|
'changelog': [
|
172
|
-
(r'
|
174
|
+
(r'\*.*$', Generic.Subheading),
|
173
175
|
(r'^(%' + _directives + ')(.*)$',
|
174
176
|
bygroups(Name.Decorator, Text), '#pop'),
|
175
|
-
(r'\
|
177
|
+
(r'\s+', Whitespace),
|
176
178
|
(r'.', Text),
|
177
179
|
],
|
178
180
|
'string': [
|
@@ -197,10 +199,11 @@ class RPMSpecLexer(RegexLexer):
|
|
197
199
|
include('interpol'),
|
198
200
|
(r"'.*?'", String.Single),
|
199
201
|
(r'"', String.Double, 'string'),
|
202
|
+
(r'\s+', Whitespace),
|
200
203
|
(r'.', Text),
|
201
204
|
],
|
202
205
|
'macro': [
|
203
|
-
(r'%define
|
206
|
+
(r'%define.*$', Comment.Preproc),
|
204
207
|
(r'%\{\!\?.*%define.*\}', Comment.Preproc),
|
205
208
|
(r'(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$',
|
206
209
|
bygroups(Comment.Preproc, Text)),
|
@@ -229,10 +232,10 @@ class SourcesListLexer(RegexLexer):
|
|
229
232
|
|
230
233
|
tokens = {
|
231
234
|
'root': [
|
232
|
-
(r'\s+',
|
235
|
+
(r'\s+', Whitespace),
|
233
236
|
(r'#.*?$', Comment),
|
234
237
|
(r'^(deb(?:-src)?)(\s+)',
|
235
|
-
bygroups(Keyword,
|
238
|
+
bygroups(Keyword, Whitespace), 'distribution')
|
236
239
|
],
|
237
240
|
'distribution': [
|
238
241
|
(r'#.*?$', Comment, '#pop'),
|
@@ -240,7 +243,7 @@ class SourcesListLexer(RegexLexer):
|
|
240
243
|
(r'[^\s$[]+', String),
|
241
244
|
(r'\[', String.Other, 'escaped-distribution'),
|
242
245
|
(r'\$', String),
|
243
|
-
(r'\s+',
|
246
|
+
(r'\s+', Whitespace, 'components')
|
244
247
|
],
|
245
248
|
'escaped-distribution': [
|
246
249
|
(r'\]', String.Other, '#pop'),
|
@@ -251,7 +254,7 @@ class SourcesListLexer(RegexLexer):
|
|
251
254
|
'components': [
|
252
255
|
(r'#.*?$', Comment, '#pop:2'),
|
253
256
|
(r'$', Text, '#pop:2'),
|
254
|
-
(r'\s+',
|
257
|
+
(r'\s+', Whitespace),
|
255
258
|
(r'\S+', Keyword.Pseudo),
|
256
259
|
]
|
257
260
|
}
|
@@ -270,14 +273,19 @@ class DebianControlLexer(RegexLexer):
|
|
270
273
|
.. versionadded:: 0.9
|
271
274
|
"""
|
272
275
|
name = 'Debian Control file'
|
276
|
+
url = 'https://www.debian.org/doc/debian-policy/ch-controlfields.html'
|
273
277
|
aliases = ['debcontrol', 'control']
|
274
278
|
filenames = ['control']
|
275
279
|
|
276
280
|
tokens = {
|
277
281
|
'root': [
|
278
282
|
(r'^(Description)', Keyword, 'description'),
|
279
|
-
(r'^(Maintainer)(:\s*)', bygroups(Keyword, Text),
|
280
|
-
|
283
|
+
(r'^(Maintainer|Uploaders)(:\s*)', bygroups(Keyword, Text),
|
284
|
+
'maintainer'),
|
285
|
+
(r'^((?:Build-|Pre-)?Depends(?:-Indep|-Arch)?)(:\s*)',
|
286
|
+
bygroups(Keyword, Text), 'depends'),
|
287
|
+
(r'^(Recommends|Suggests|Enhances)(:\s*)', bygroups(Keyword, Text),
|
288
|
+
'depends'),
|
281
289
|
(r'^((?:Python-)?Version)(:\s*)(\S+)$',
|
282
290
|
bygroups(Keyword, Text, Number)),
|
283
291
|
(r'^((?:Installed-)?Size)(:\s*)(\S+)$',
|
@@ -288,10 +296,11 @@ class DebianControlLexer(RegexLexer):
|
|
288
296
|
bygroups(Keyword, Whitespace, String)),
|
289
297
|
],
|
290
298
|
'maintainer': [
|
291
|
-
(r'<[^>]+>', Generic.Strong),
|
292
299
|
(r'<[^>]+>$', Generic.Strong, '#pop'),
|
300
|
+
(r'<[^>]+>', Generic.Strong),
|
293
301
|
(r',\n?', Text),
|
294
|
-
(r'
|
302
|
+
(r'[^,<]+$', Text, '#pop'),
|
303
|
+
(r'[^,<]+', Text),
|
295
304
|
],
|
296
305
|
'description': [
|
297
306
|
(r'(.*)(Homepage)(: )(\S+)',
|
@@ -301,21 +310,18 @@ class DebianControlLexer(RegexLexer):
|
|
301
310
|
default('#pop'),
|
302
311
|
],
|
303
312
|
'depends': [
|
304
|
-
(r'
|
305
|
-
|
313
|
+
(r'(\$)(\{)(\w+\s*:\s*\w+)(\})',
|
314
|
+
bygroups(Operator, Text, Name.Entity, Text)),
|
306
315
|
(r'\(', Text, 'depend_vers'),
|
307
|
-
(r',', Text),
|
308
316
|
(r'\|', Operator),
|
309
|
-
(r'
|
310
|
-
(r'
|
311
|
-
(r'
|
312
|
-
(r'[
|
313
|
-
(r'([+.a-zA-Z0-9-])(\s*)', bygroups(Name.Function, Text)),
|
317
|
+
(r',\n', Text),
|
318
|
+
(r'\n', Text, '#pop'),
|
319
|
+
(r'[,\s]', Text),
|
320
|
+
(r'[+.a-zA-Z0-9-]+', Name.Function),
|
314
321
|
(r'\[.*?\]', Name.Entity),
|
315
322
|
],
|
316
323
|
'depend_vers': [
|
317
|
-
(r'\)
|
318
|
-
(r'\)[
|
319
|
-
(r'([><=]+)(\s*)([^)]+)', bygroups(Operator, Text, Number))
|
324
|
+
(r'\)', Text, '#pop'),
|
325
|
+
(r'([><=]+)(\s*)([^)]+)', bygroups(Operator, Text, Number)),
|
320
326
|
]
|
321
327
|
}
|