summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Squashed commit of the following:Matthäus G. Chajdas2021-11-064-4/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c339afa51bac82515e90da90df3d2a428c612e20 Author: Matthäus G. Chajdas <dev@anteru.net> Date: Sat Nov 6 22:10:22 2021 +0100 Update tests. commit b60cf209ad93bc9176581f4a77ece58da4e1212a Merge: 7f000b4e cf7a978a Author: Matthäus G. Chajdas <Anteru@users.noreply.github.com> Date: Sat Nov 6 17:35:34 2021 +0100 Merge branch 'master' into feature-terraform-heredoc commit 7f000b4ef8930817f4c1249c242d95a9c191f4eb Author: Chris Rose <offline@offby1.net> Date: Mon Oct 11 07:47:36 2021 -0700 Eliminate pathological regex case I updated the terraform lexer to use the ExtendedRegexLexer and to handle heredocs with a callback, instead of with a regexp for the whole shebang. commit 0a1fa1b139b9249f210cd9450dafa8a1ee1715f8 Author: Chris Rose <offline@offby1.net> Date: Sat Oct 9 20:16:51 2021 -0700 Add support for the `set` type in HCL commit 18ad21300bb890fc9014a66c7ba2c195429b4d16 Author: Chris Rose <offline@offby1.net> Date: Sat Oct 9 19:14:27 2021 -0700 Support HCL's heredoc syntax Fixes #1909
* | | | | | | | | Improve Dylan lexer.Matthäus G. Chajdas2021-11-064-646/+579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge comment tokens.
* | | | | | | | | Improve MoonScript lexer.Matthäus G. Chajdas2021-11-062-1437/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge literal string tokens
* | | | | | | | | Improve Cirru lexer.Matthäus G. Chajdas2021-11-062-135/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge string literal tokens.
* | | | | | | | | Improve Rexx lexer.Matthäus G. Chajdas2021-11-062-147/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge whitespace tokens * Merge string literals
* | | | | | | | | Improve XQuery lexer.Matthäus G. Chajdas2021-11-064-1502/+887
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge comment tokens. * Correctly tag whitespace.
* | | | | | | | | Improve SgfLexer.Matthäus G. Chajdas2021-11-062-84/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge punctuation tokens.
* | | | | | | | | Improve MuPAD lexer.Matthäus G. Chajdas2021-11-063-1332/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace * Merge multiple whitespace tokens * Merge tokens in comments.
* | | | | | | | | Improve SciLab lexer.Matthäus G. Chajdas2021-11-063-125/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace * Merge multiple whitespace tokens * Merge multiple punctuation characters into one token
* | | | | | | | | Formatting fixes only.Matthäus G. Chajdas2021-11-061-1/+1
| | | | | | | | |
* | | | | | | | | Add a script to check for repeated tokens.Matthäus G. Chajdas2021-11-061-0/+103
| | | | | | | | |
* | | | | | | | | Restore pre background color on websiteMartin Fischer2021-11-042-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was removed in 5a987b8af8dcbddcbd5cade37adebed5b5dd99f1 but that introduced unintended changes.
* | | | | | | | | Fix broken link in documentationMartin Fischer2021-11-042-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Georg Brandl <georg@python.org>
* | | | | | | | | Add styles gallery to website (#1943)Martin Fischer2021-11-046-6/+72
| | | | | | | | |
* | | | | | | | | yield keyword in Java (#1941)xtay22021-11-031-1/+1
| |_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | Added the yield keyword from Java 13. https://docs.oracle.com/javase/specs/jls/se13/preview/switch-expressions.html
* | | | | | | | Make pygments.org website responsive (#1942)Martin Fischer2021-11-036-12/+83
|/ / / / / / /
* | | | | | | Make test_contrasts.py ignore token.Whitespace (#1938)Martin Fischer2021-11-022-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the VisibleWhitespaceFilter Pygments can be configured to replace whitespace characters like spaces, tabs and newlines with Unicode characters like ·, » and ¶ respectively. The min_contrast metric is meant to represent the readability of a style. Increasing it should mean that the style becomes more readable. This commit therefore excludes the token.Whitespace contrast from the min_contrast calculation, since giving whitespace characters a high contrast would make them so intrusive that they would actually hinder the readability of the source code.
* | | | | | | Make test_contrats.py account for bgcolor (#1937)Martin Fischer2021-11-022-12/+11
| | | | | | |
* | | | | | | Prohibit contrast degradation for styles via test (#1919)Martin Fischer2021-11-016-0/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Web accessibility is important. Unfortunately currently many pygments styles have rules with poor contrasts. This commit introduces a test case that fails if the minimum contrast of a style gets worse, e.g: E AssertionError: contrast degradation for style 'borland' E The following rules have a contrast lower than the required 2.9: E E * 1.90 Token.Text.Whitespace E * 2.80 Token.Generic.Heading E * 2.30 Token.Generic.Subheading E E assert not 1.9 < 2.9 This is accomplished by storing the current minimum contrasts in ./tests/contrast/min_contrasts.json. When you improve a minimum contrast the test fails with: E AssertionError: congrats, you improved a contrast! please run ./scripts/update_contrasts.py E assert not 1.9 > 0.9 Running the script as instructed updates the JSON file, making the test pass. New styles are required to meet the WCAG AA contrast minimum of 4.5. First commit to address #1718.
* | | | | | | Remove unnecessary assignments in Paraiso style (#1934)Tom Tan2021-11-012-6/+0
| |/ / / / / |/| | | | |
* | | | | | Add .editorconfig to IniLexer (#1932)Jawira Portugal2021-10-282-2/+2
| | | | | |
* | | | | | robotframework: fix empty braces being thrown away after list or dict… (#1921)Leistungsabfall2021-10-242-1/+39
|/ / / / / | | | | | | | | | | | | | | | | | | | | * robotframework: fix empty braces being thrown away after list or dict variable * robotframework: add test cases to ensure correct behaviour
* | | | | Whitespace token modernization - a* lexers - regarding #1905 (#1914)Sebastian Engel2021-10-2327-4467/+4526
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Whitespace token modernization - ambient lexer * Whitespace token modernization - ampl lexer * Whitespace token modernization - apdlexer lexer * Whitespace token modernization - apl lexer * Whitespace token modernization - adl lexer * Whitespace token modernization - arrow lexer * Whitespace token modernization - asm lexer
* | | | | Whitespace token modernization - [bc] lexers - regarding #1905 (#1923)Sebastian Engel2021-10-23130-30492/+30869
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Modernize Whitespace token: basic lexer * Modernize Whitespace token: bibtex lexer * Modernize Whitespace token: boa lexer * Modernize Whitespace token: capnproto lexer + new example * Modernize Whitespace token: cddl lexer * Modernize Whitespace token: chapel lexer * Modernize Whitespace token: c_like lexer * Modernize Whitespace token: configs lexer * Modernize Whitespace token: console lexer * Modernize Whitespace token: crystal lexer * Modernize Whitespace token: csound lexer * Modernize Whitespace token: css lexer * Revert a change in basic lexer
* | | | | Add support for Python 3.10 (#1917)Hugo van Kemenade2021-10-234-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | * Add support for Python 3.10 * Drop the dot https://twitter.com/pytestdotorg/status/753767547866972160
* | | | | Python: add "breakpoint" builtin.Georg Brandl2021-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes #1918
* | | | | Update test files.Matthäus G. Chajdas2021-10-151-2/+2
| | | | |
* | | | | Refactor identifiers regex to match unicode characters (#1848)amitkummer2021-10-152-2/+148
| | | | |
* | | | | Add URLs to project metadata (#1906)Remi Rampin2021-10-121-1/+6
| | | | |
* | | | | New pull request for dracula theme. (#1796)Daniel Vilar2021-10-122-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * adding dracula theme * Added highlight and line colours * fixed module name underline
* | | | | Modernize Whitespace token - regarding #1905 (#1911)Sebastian Engel2021-10-0915-6037/+6063
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Diff lexer - match whitespace * Make lexer - whitespace token set * Actionscript lexer - whitespace token * Bare lexer - whitespace token * Business(cobol) lexers - whitespace token
* | | | | Un in unexport keyword of Makefile correctly lexed (#1898)Sebastian Engel2021-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out by Issue #1860 the keyword unexport was not correctly matched. Only the part `export' had been matched. This commit adds an optional group to the regex of the `export` keyword to match `unexport` as well.
* | | | | lexer SQL to use whitespace token - regarding #1905 (#1908)Sebastian Engel2021-10-066-818/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SQL whitespaces - regarding #1905 * Sqlite prompt ungrouped from trailing space * sqlite prompt with Explicit trailing whitespace token * Fix insertion of sqlite trail space token
* | | | | Improve whitespace handling in Fortran.Matthäus G. Chajdas2021-10-024-1625/+1625
| | | | |
* | | | | Fortran: Change whitespace to Text until Whitespace is used consistently.Matthäus G. Chajdas2021-10-022-3/+3
| | | | |
* | | | | Fix "do concurrent" and "go to" keywords in the Fortran lexer. (#1877)ecasglez2021-10-023-47/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix "do concurrent" and "go to" keywords in the Fortran lexer. * "Go to" statement was only highlighted if there was no space between "go" and "to". * "Concurrent" keyword in the "Do Concurrent" statement was never highlighted because of a typo. It has been fixed. In addition, it now highlights them only if "Concurrent" is right after the "Do" keyword. * I had to put the "do concurrent" changes before the already available list of keywords. Otherwise it won't highlight "Concurrent" because it finds first the "Do" keyword in the other list and stops searching for more keywords. * Fix a bug while parsing Fortran files with go to and do concurrent statements causing wrong highlighting. * For example, in the variable name "gotoErr", "goto" was highlighted but it shouldn't. * Update Fortran tests to the changes for the "go to statements" * Use Text.Whitespace to distinguish Fortran multiword keywords Co-authored-by: ecasglez <ecasglez@protonmail.com>
* | | | | Add documentation for missing CLI options (#1900)amitkummer2021-10-021-0/+40
| | | | | | | | | | | | | | | Add documentation for the -N, -g, -s and --json command line options.
* | | | | Fix #1237 cpp whitespace token usage expanded (#1904)Sebastian Engel2021-10-0215-104/+104
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix #1237 cpp whitespace token usage expanded * Adapt tests change to 3eff56f5
* | | | | Add new Java syntax: sealed classes and record types. (#1902)Benjamin Peterson2021-09-292-2/+17
| | | | |
* | | | | Allow printing lists as JSON. (#1890)Matthäus G. Chajdas2021-09-111-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow printing lists as JSON. * Fix failing tests. * Address review feedback. * Don't pretty-print the JSON output.
* | | | | Update CHANGES.Matthäus G. Chajdas2021-09-042-0/+8
| | | | |
* | | | | Lexer for new language Maxima (#1885)Robert Dodier2021-09-044-0/+604
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New lexer for Maxima computer algebra system * New lexer class MaximaLexer * Update _mapping.py to include Maxima lexer * New test input file maxima/foo.mac I find that the commands $ python3 -m pygments -O full -f html -o /tmp/foo.html tests/examplefiles/maxima/foo.mac $ python3 -m pygments -x -l pygments/lexers/maxima.py:MaximaLexer tests/examplefiles/maxima/foo.mac both produce expected output. * Commit output from pytest --update-goldens for Maxima example file Commit output from pytest tests/examplefiles/maxima --update-goldens as obtained by Cameron Smith. * Rename output file for test of Maxima lexer. * In Maxima lexer, capture content of comment all at once, instead of capturing each character separately. Update expected output for example input file, as produce by: $ pytest tests/examplefiles/maxima --update-goldens * In lexer for Maxima language, identify whitespace characters as such instead of just calling them Text. * In lexer for Maxima language, identify comma, semicolon, and dollar sign as Punctuation instead of Text. * In lexer for Maxima language, cut encoding comment, and put in license statement. * In lexer for Maxima language, identify keywords and other fixed strings such as operators via the words function, instead of a long regex with alternation. Incidentally update the example output, for which one symbol (namely "done") has changed classification. * In lexer for Maxima language, include additional test input and update output accordingly. * In lexer for Maxima language, relax pattern for integers, so integers are more accurately identified. Update test example output accordingly. * In lexer for Maxima language, adjust pattern for float numbers. Include additional test input for floats and update expected output. * In lexer for Maxima language, define analyse_text function. * In lexer for Maxima language, correct errors identified by make check (1) adjust package name underline (2) put in copyright notice Co-authored-by: Robert Dodier <robert_dodier@users.sourceforge.net>
* | | | | Clean-up unused imports (#1887)Mickaël Schoentgen2021-08-2320-33/+12
| | | | |
* | | | | Update CHANGES.Matthäus G. Chajdas2021-08-171-2/+2
| | | | |
* | | | | Improve checks. (#1884)Matthäus G. Chajdas2021-08-1716-22/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve checks. * Fix lots of small errors. * Remove the line length check. * Add an option to skip lexers with no alias * Run checks in make check * Add a new CI target.
* | | | | Reserve next entry in CHANGES.Matthäus G. Chajdas2021-08-151-0/+4
| | | | |
* | | | | Prepare 2.10.0 release.2.10.0Matthäus G. Chajdas2021-08-152-2/+2
| | | | |
* | | | | Fix a few make check failures.Matthäus G. Chajdas2021-08-154-5/+5
| | | | |
* | | | | Update mapfiles & CHANGES.Matthäus G. Chajdas2021-08-152-2/+3
| | | | |
* | | | | Add `pwsh` alias for “PowerShell” lexers (#1876)ExE Boss2021-08-151-2/+2
| | | | |