summaryrefslogtreecommitdiff
path: root/pygments
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'master' into pillow92Matthäus G. Chajdas2022-08-156-102/+203
|\
| * CFamilyLexer: refuse quotes between parentheses for function definitions and ↵Jean Abou-Samra2022-08-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declarations (#2208) Something like id id2("){ ... }"); is no longer wrongly recognized as a "function" id id2(") { ... } "); As the difference in the tests shows, this has the unfortunate side effect that we no longer highlight something like int f(param="default"); as a function declaration, but it is hard to imagine another way to fix this (cf. “most vexing parse” problem). Fixes #2207
| * Fix glitch found by regexlintJean Abou Samra2022-08-151-2/+2
| |
| * Fortran: fix catastrophic backtrackingJean Abou Samra2022-08-151-2/+2
| | | | | | | | \\\\|\\. is like \\. but causes catastrophic backtracking inside (...)* .
| * LilyPond: add 6 missing builtinsJean Abou Samra2022-08-151-72/+155
| | | | | | | | | | | | | | Fix problem reported at https://lists.gnu.org/archive/html/lilypond-user-fr/2022-04/msg00075.html Then update the autogenerated result.
| * Disable highlighting of some escape codes for python bytes literals (#2204)LaurenceWarne2022-08-151-7/+20
| | | | | | | | | | | | | | | | Disable highlighting of unicode escape codes in python bytes literals, as described in https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals. So escape codes of the form "\N{name}", "\uxxxx" and "\Uxxxxxxxx" will no longer be highlighted within bytes literals. Add tests for escape code highlighting in string and bytes literals.
| * Update Spice lexer (#2206)Marc Auberer2022-08-121-17/+19
| |
| * cmdline: silently ignore ``BrokenPipeError``Georg Brandl2022-07-301-0/+3
| | | | | | | | | | | | | | This has come up a few times, and I see no good reason to catch and report this error. Fixes #2193
* | formatters/img: use new API for bounding box for Pillow 9.2Georg Brandl2022-07-301-4/+8
|/
* abap: add missing SUBKEY keywordGeorg Brandl2022-07-301-1/+1
|
* Add GitHub's Dark Style (#2192)Aniket Teredesai2022-07-272-0/+108
|
* Register new style (#2183)flywire2022-07-2632-45/+4
| | | | | | | | | | | * Register new style * Replace default_style with Token #2184 * Remove default_style from styles * Simplify register style code
* Fix some cases in JMESPath lexer (#2182)Álvaro Mondéjar2022-07-201-1/+8
|
* Update `Inform6Lexer` to Inform 6.40 (#2190)David Corbett2022-07-161-3/+14
|
* Nord theme (#2189)Mateus Furquim2022-07-152-0/+163
| | | | Co-authored-by: andy <andy.yu2k@gmail.com> Co-authored-by: Jean-Abou-Samra <jean@abou-samra.fr>
* Added COMAL-80 language highlight. (#2180)Marc Rintsch2022-07-152-0/+80
| | | | | * Added COMAL-80 language highlight. Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
* Add StarOfficeStyle (#2168)flywire2022-07-152-0/+27
| | | | | | | | | StarOffice style is a theme used in the user interface and carries through to OpenOffice and LibreOffice, and the documentation. Reference: * [Color Config Entry](https://github.com/LibreOffice/core/blob/master/svtools/source/config/colorcfg.cxx#L447-L453) * [Color Types](https://github.com/LibreOffice/core/blob/e4a57dcdabc9ae7d381025e008b90635c1b7b10c/include/tools/color.hxx#L448) Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* Reconcile standard token discrepancies in docs and code (#2187)Andrew T. Biehl2022-07-151-0/+1
| | | | | | | * Add Name.Property token missing from docs * Add Comment.PreprocFile token missing from docs * Add Punctuation.Marker token to tokens dict
* Add lexer for JMESPath (#2175)Álvaro Mondéjar2022-07-052-0/+61
| | | | Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* PHP: fix `\"$var\"` inside strings (fixes #2105)Georg Brandl2022-06-301-9/+8
|
* Update dotnet.py with _obas aliases (#2170)flywire2022-06-292-2/+3
| | | | | DotNet lexer works with LibreOffice Basic, OpenOffice Basic, and StarOffice Basic. * Update _mapping.py
* Added cartouche handling for Isabelle lexer (#2159)Dacit2022-06-281-15/+17
| | | Co-authored-by: Fabian Huch <huch@in.tum.de>
* Add 1.18 generics support for go lexer (#2167)Shengyu Zhang2022-06-251-3/+4
| | | | | | - Add new predeclared identifiers: `any` and `comparable` - Add new operator for type parameters: `~` and `|` Ref: https://go.dev/ref/spec
* Matlab session: fix traceback when a line continuation ellipsis appears in ↵Georg Brandl2022-06-231-1/+1
| | | | | | the output Fixes #2166
* Update Tera Term string handlingKurt McKee2022-06-211-15/+6
| | | | | | | * Remove backslash escape lexing in string literals. (Don't know why I added those in the first place!) * Lex strings in their entirety, not one character at a time. * Treat unclosed string literals as errors.
* Modify the Tera Term lexer so it outputs Text.Whitespace tokens correctlyKurt McKee2022-06-211-3/+3
| | | | Related to #1905
* lilypond: fix Whitespace tokenGeorg Brandl2022-06-212-3/+2
|
* Merge branch 'patch-1' of https://github.com/SECtim/pygments into SECtim-patch-1Matthäus G. Chajdas2022-06-191-1/+1
|\
| * Allow C-style line comments to start anywhereSECtim2021-04-061-1/+1
| | | | | | F* actually allows for C-style `//` line comments to start anywhere in a line, not just at the beginning.
* | terraform: accept leading whitespace for << heredoc delimGeorg Brandl2022-06-171-1/+1
| | | | | | | | Fixes #2162
* | configs: style fixesGeorg Brandl2022-06-171-4/+3
| |
* | agda: allow ticks in module namesGeorg Brandl2022-06-171-10/+14
| | | | | | | | Fixes #2163
* | Update CHANGES (with added comment following up on previous commit)Jean Abou Samra2022-06-161-0/+2
| |
* | Ada: fixing highlighting for Ada aspects (#2125)Gustavo A. Hoffmann2022-06-161-1/+1
| |
* | Detect true-color terminal support for pygmentize (#2160)Micah Cochran2022-06-131-2/+4
| | | | | | | | | | | | For the pygmentize command line, this pull request adds detection of true-color support on the terminal and makes that the default formatter. It looks up the COLORTERM environment variable having a value of truecolor or 24bit. If that is the case, it sets the default formatter to use the TerminalTrueColorFormatter. The COLORTERM environment variable is a convention that has been adopted by some terminals for specifying true-color is supported.
* | coq: Add some common keywords and improve recognition of Set and qualified ↵Xia Li-yao2022-06-111-5/+10
| | | | | | | | | | | | | | | | | | identifiers (#2158) . is not an operator in Coq: in this specific usage, it is only meant to build a qualified name, so this rule really corresponds to a proper lexical rule in Coq Unlike most languages, Coq has a large set of special words that are not reserved: they may still be used as identifiers. For example Prop is a special word, which currently gets highlighted as such in Equations.Prop.Equations, but it should be recognized as a regular name there. Because of how flexible the syntax of Coq is, it's not straightforward to disambiguate things with just a bunch of regexes, so we have to rely on heuristics. Skipping qualified names from being recognized as keywords is an easy win.
* | feat: add a new SqlJinjaLexer (#2148)Edgar R. M2022-06-052-1/+36
| |
* | Switch from pkg_resources to importlib.metadata (#2155)Jean Abou-Samra2022-06-041-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch from pkg_resources to importlib.metadata importlib.metadata is a standard library replacement for pkg_resources, available starting with Python 3.8. It is faster than pkg_resources. This lets the plugin interface use it when available, i.e. on Python 3.8 and later. On earlier Python, it uses the importlib_metadata PyPI backport if available, and finally falls back on pkg_resources. setup.cfg gains an extra called plugins, which can allow a project to install "pygments[plugins]" in order to ensure that plugins support is present even if installed with older Python versions. Timings for lexing an empty file with a lexer from a random plugin: Before: real 0m0,238s user 0m0,210s sys 0m0,029s After: real 0m0,141s user 0m0,125s sys 0m0,017s Fixes #2116, #2126
* | tcl: accept variables in ${name} syntaxGeorg Brandl2022-06-041-2/+3
| | | | | | | | Fixes #2145
* | Remove filename pattern caches (#2153)Jean Abou-Samra2022-06-042-28/+8
| | | | | | | | These are irrelevant because the fnmatch module implementation already uses functools.lru_cache.
* | Add FIXME to default code tags (#2150)Jean Abou-Samra2022-06-041-2/+5
| | | | | | It is quite common in my experience, along with 'TODO' and 'XXX'.
* | Fix comments within function declarations in C (#1891) (#2140)lambda-karlculus2022-05-304-20/+37
| | | | | | Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
* | Merge mapping file generation scripts (#2152)Jean Abou-Samra2022-05-292-124/+5
| | | | | | | | | | | | | | | | | | Use a unified script, to reduce code duplication and in preparation for doing a similar thing with styles and filters. The new script also uses a bit more modern Python APIs (e.g., pathlib). Unlike the previous scripts, it does not replace replace CRLF with LF because Git should do that itself.
* | Fix make check (#2151)Jean Abou-Samra2022-05-291-2/+2
| | | | | | | | pyflakes complained about an unused variable due to an oversight in 49c757cab5.
* | Add value modifier for Kotlin (#2142)Derek Ellis2022-05-201-1/+1
| |
* | Update Macaulay2 lexer for version 1.20 (#2139)Doug Torrance2022-05-161-2/+31
| |
* | Fix most warnings in Sphinx build (#2124)Jean Abou-Samra2022-05-133-25/+28
| | | | | | | | | | | | | | | | | | | | | | * Fix most warnings in Sphinx build Note that some invalid references are simply removed because the lexers are all in the same section, so the link is already easy to find and there is no need to repeat it over and over. * fixup: Add orphan languages.rst to allow referencing * Typos
* | nim: types shouldn't be highlighted as keywords (#2136)Miran2022-05-121-6/+7
| | | | | | Use `Name.Builtin`.
* | Improve heuristic to warn about passing lexer/formatter class (#2123)Jean Abou-Samra2022-05-121-7/+6
| | | | | | | | Don't rely on the error message since 'missing 1 required positional argument' can give false positives. Instead, use issubclass().
* | java multiline highlighting based on issue 1858 (#2132)VishalN72022-05-101-0/+6
| | | | | | Co-authored-by: Chung Tai <chungtai456@gmail.com>