summaryrefslogtreecommitdiff
path: root/pygments
Commit message (Collapse)AuthorAgeFilesLines
...
* | | linenos support for terminal256 (#1674)Jiamin Shen2021-02-061-1/+23
| | |
* | | Merge branch 'master' of https://github.com/mathiasertl/pygments into ↵Matthäus G. Chajdas2021-01-301-6/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mathiasertl-master Resolve conflicts, move tests to snippets, regenerate example files. # Conflicts: # tests/test_shell.py
| * | | only print PS2 prompt if backslash continuation is enabledMathias Ertl2021-01-101-5/+1
| | | |
| * | | make PS2 contain a spaceMathias Ertl2021-01-101-1/+1
| | | |
* | | | AMDGPU ISA Lexer (#1626)Thomas Symalla2021-01-302-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This commit implements a basic lexer for the AMDGPU ISA definition. * Updated comment. * Updated comment. * Tried to fix case-sensitive issue. * Updated AUTHORS file. * Added shader unit test for the AMD ISA Parser. * Renamed AMDGCN lexer to AMDGPU. * Renamed example file. * Renames. Co-authored-by: Thomas Symalla <root@SEUCHOMAT.localdomain>
* | | | cmdline: port to argparse (#1693)Georg Brandl2021-01-301-163/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmdline: port to argparse * cmdline: adapt the argparse help formatter to actually take terminal width into account * Update based on review feedback. * Extract "is_only_option" method * Check -L argument to be a "known good" argument Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
* | | | Updated OpenEdge keywords (#1696)movedoa2021-01-291-384/+438
| | | | | | | | | | | | Co-authored-by: Alexander Dobetsberger <alexander.dobetsberger@moveit.at>
* | | | Fix mishandling '*/' in C/C++ and related (fixes #1695)Georg Brandl2021-01-294-11/+4
| | | |
* | | | tests: code style fixupsGeorg Brandl2021-01-201-2/+2
| | | |
* | | | Matlab class properties (#1466)Dan2021-01-181-34/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP: Add failing test for a matlab class with properties. * Add some missing keywords * Add leading \s* matchers to things above the command form regex, as it tends to swallow keywords otherwise. * Add support for the special 'properties' block syntax. * Fix apparent infinite loop when given garbage input. * Use includes to clean up some of my copypasta. * Fix negative lookahead when there's more than one space between operators. * Use Whitespace not Text for spaces; combine adjacent whitespace. * Add support for declarative property constraints.
* | | | update the mapMestery2021-01-181-1/+1
| | | |
* | | | add markdown to aliasesMestery2021-01-181-1/+1
| | | |
* | | | Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-17236-245/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* | | | Fix for lexing Python raw f-strings with backslashes (#1683)Jeppe Dakin2021-01-171-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * introduce and apply rfstringescape * add unit test for raw f-strings * add further tests * fix comment
* | | | fix escape in TypeScript templates literalsMestery2021-01-171-2/+1
| | | |
* | | | Added `pygmentize -C` option to guess a lexer from contentGeorg Brandl2021-01-171-2/+18
| | | |
* | | | Do not guess MIME or SQL without reasonGeorg Brandl2021-01-172-4/+1
| | | | | | | | | | | | | | | | constant returns from analyse_text are not useful.
* | | | Make guessing prefer Python 3 lexerGeorg Brandl2021-01-171-5/+6
| | | |
* | | | Fix escapes in JavaScript backtick stringsGeorg Brandl2021-01-171-2/+1
| | | | | | | | | | | | | | | | fixes #1679
* | | | Bump version to 2.7.4.2.7.4Matthäus G. Chajdas2021-01-121-1/+1
| | | |
* | | | Revert "Added dracula theme style (#1636)"Matthäus G. Chajdas2021-01-122-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit bd378d0ef57a6bc53e9079c9363a6eab0d54f0dc. The license terms in dracula.py don't match. We'll add it back once the author places it under the correct license.
* | | | Fix several exponential/cubic complexity regexes found by Ben Caller/DoyensecGeorg Brandl2021-01-117-11/+10
| | | |
* | | | xquery: fix pop from empty stackGeorg Brandl2021-01-111-1/+2
| | | |
* | | | Added 'ERROR STOP' to fortran.py keywords. (#1665)ecasglez2021-01-101-2/+2
|/ / / | | | | | | Maybe close #931
* | | support added for css variables (#1633)zjeffer2021-01-101-0/+3
| | | | | | | | | | | | | | | * support added for css variables * [-]+ instead of [-]*
* | | (sql.py): fix errors in keywords (#1668)0xflotus2021-01-101-6/+6
| | |
* | | Add __END_LINE__ to Crystal syntax highlighting (#1670)Linda_pp2021-01-091-0/+1
| | | | | | | | | I found `__END_LINE__` magic constant is missing in syntax highlighting for Crystal language.
* | | Detect malformed closing tags as errors. (#1656)Catatonic2021-01-061-1/+3
| | |
* | | Markdown lexer improvements (#1623)Leistungsabfall2021-01-061-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | * improve fenced code recognition for markdown lexer * improve inline code detection * improve detection of some Markdown keywords * remove Markdown recognition of code indented by 4 spaces as reliable detection is not possible with regex
* | | support indented entries in IniLexer (#1624)Leistungsabfall2021-01-041-1/+1
| | |
* | | Update Crystal lexer (#1650)Oleh Prypin2021-01-041-74/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * crystal: drop all classes from builtins; these aren't normally highlighted ("normally" meaning all other highlighter tools) * crystal: fix percent-strings, drop Ruby-specific arbitrary delimiters It seems that Ruby supports strings such as `%*text*` where `*` can be anything. But Crystal never had anything like that. It does, however, keep `%|text|`, so add a case for that. * crystal: update keywords and builtins * crystal: fix string literals and escape sequences Update list of escapes. Support Unicode escape sequences. Also remove the Ruby-specific `:@foo` symbol syntax, Crystal doesn't have it. * crystal: uppercase identifiers aren't always constants Make `FOO::Bar` be highlighted like `Foo::Bar` would be, rather than like `FOO` * crystal: annotations can be namespaced Highlight the entire inside part of `@[Foo::Bar]`, not just the `Foo` part (these used to be named 'attributes' but the official name is 'annotations' now, so I also change that) * fixup! crystal: fix percent-strings, drop Ruby-specific arbitrary delimiters
* | | Fix Coq-related bug #678 (#1648)Maximilian Wuttke2021-01-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Unicode support for Coq Catch-all lexing for `Name.Builtin.Pseudo`, as in the lean lexer. This fixes #678. * Coq lexer: improve `analyse_text` * Add a test for Coq
* | | Merge branch 'master' of https://github.com/felixhao28/pygments into ↵Matthäus G. Chajdas2021-01-041-1/+1
|\ \ \ | | | | | | | | | | | | felixhao28-master
| * | | fix punctuation not labeled in function definition in TypeScriptYiyang Hao2020-08-161-1/+1
| | | |
* | | | Bump copyright year.Matthäus G. Chajdas2021-01-03234-237/+237
| | | |
* | | | Update keywords for JS and its variants (#1651)Mestery2021-01-021-37/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the keywords are missing for JavaScript and TypeScript. And some of reserved keywords have been moved to `keywords` and `declarations keywords`. There are also non-existent builtins that I removed. Added missing builtins.
* | | | Revert a private API in the HTML formatter (#1655)Kurt McKee2020-12-301-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | This should revert the behavior of the function without losing the overall caching behavior that was intended. Closes #1644
* | | | Fix #1652.Matthäus G. Chajdas2020-12-291-1/+1
| | | | | | | | | | | | | | | | in is a keyword in Bash, ZSH, and KSH.
* | | | feat: added 'ONLY' to fortran.py Keywords0xflotus2020-12-281-3/+3
| | | | | | | | | | | | maybe close #1543
* | | | add support for LiveScript and CoffeeScriptMestery2020-12-281-4/+4
| | | |
* | | | Fix regexs to support somes flagsMestery2020-12-281-4/+4
| | | | | | | | | | | | Resolves #1646
* | | | Merge github.com:mathiasertl/pygmentsGeorg Brandl2020-12-281-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | fixes #1645
| * | | | consider trailing whitespace a part of the prompt, making copy/paste more ↵Mathias Ertl2020-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | straight forward
* | | | | do_insertions: do not emit empty tokensGeorg Brandl2020-12-281-4/+6
|/ / / /
* | | | all: weed out more backtracking string regexesGeorg Brandl2020-12-2525-107/+107
| | | |
* | | | fix a lot more backtracking string regexesGeorg Brandl2020-12-2510-70/+40
| | | |
* | | | sarl: fix indentationGeorg Brandl2020-12-251-51/+56
| | | |
* | | | Added dracula theme style (#1636)Daniel Vilar2020-12-242-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added dracula theme style * added dracula style to init * corrected misspell * Update __init__.py
* | | | Fix backtracking Modula2 string regexes.Georg Brandl2020-12-241-2/+12
| | | |
* | | | Fix raw token lexer w.r.t. Unicode.Georg Brandl2020-12-241-18/+18
| | | | | | | | | | | | | | | | fixes #1616