summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge branch 'not-my-profile-default-style-wcag-aa'Matthäus G. Chajdas2021-11-13128-1472/+864
|\ \ \ \ \
| * | | | | Regenerate HTML test files.Matthäus G. Chajdas2021-11-13128-1472/+864
| | | | | |
* | | | | | Merge branch 'master' of github.com:pygments/pygmentsMatthäus G. Chajdas2021-11-132-0/+217
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Debian control: more regex simplificationGeorg Brandl2021-11-091-131/+39
| | | | | |
| * | | | | Update debian control (#1946)sblondon2021-11-092-0/+309
| | | | | |
* | | | | | Merge branch 'default-style-wcag-aa' of ↵Matthäus G. Chajdas2021-11-131-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | https://github.com/not-my-profile/pygments into not-my-profile-default-style-wcag-aa
| * | | | | Make default style meet WCAG AAMartin Fischer2021-11-021-1/+1
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessibility by default is important. The colors with a too low contrast were adjusted just so much that they match the required contrast of 4.5. Part of #1718.
* | | | | Squashed commit of the following:Matthäus G. Chajdas2021-11-062-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-063-641/+574
| | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge comment tokens.
* | | | | Improve MoonScript lexer.Matthäus G. Chajdas2021-11-061-1434/+785
| | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge literal string tokens
* | | | | Improve Cirru lexer.Matthäus G. Chajdas2021-11-061-134/+16
| | | | | | | | | | | | | | | | | | | | * Merge string literal tokens.
* | | | | Improve Rexx lexer.Matthäus G. Chajdas2021-11-061-145/+25
| | | | | | | | | | | | | | | | | | | | | | | | | * Merge whitespace tokens * Merge string literals
* | | | | Improve XQuery lexer.Matthäus G. Chajdas2021-11-063-1496/+881
| | | | | | | | | | | | | | | | | | | | | | | | | * Merge comment tokens. * Correctly tag whitespace.
* | | | | Improve SgfLexer.Matthäus G. Chajdas2021-11-061-81/+46
| | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace. * Merge punctuation tokens.
* | | | | Improve MuPAD lexer.Matthäus G. Chajdas2021-11-062-1330/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace * Merge multiple whitespace tokens * Merge tokens in comments.
* | | | | Improve SciLab lexer.Matthäus G. Chajdas2021-11-062-124/+47
|/ / / / | | | | | | | | | | | | | | | | | | | | * Correctly tag whitespace * Merge multiple whitespace tokens * Merge multiple punctuation characters into one token
* | | | 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-012-0/+139
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | robotframework: fix empty braces being thrown away after list or dict… (#1921)Leistungsabfall2021-10-241-0/+38
|/ / | | | | | | | | * 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-2320-4383/+4442
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-23118-30294/+30662
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Update test files.Matthäus G. Chajdas2021-10-151-2/+2
| |
* | Refactor identifiers regex to match unicode characters (#1848)amitkummer2021-10-151-0/+146
| |
* | Modernize Whitespace token - regarding #1905 (#1911)Sebastian Engel2021-10-0910-5991/+6017
| | | | | | | | | | | | | | | | | | | | | | * Diff lexer - match whitespace * Make lexer - whitespace token set * Actionscript lexer - whitespace token * Bare lexer - whitespace token * Business(cobol) lexers - whitespace token
* | lexer SQL to use whitespace token - regarding #1905 (#1908)Sebastian Engel2021-10-065-809/+817
| | | | | | | | | | | | | | | | | | * 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-023-1620/+1620
| |
* | Fortran: Change whitespace to Text until Whitespace is used consistently.Matthäus G. Chajdas2021-10-021-1/+1
| |
* | Fix "do concurrent" and "go to" keywords in the Fortran lexer. (#1877)ecasglez2021-10-022-45/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Fix #1237 cpp whitespace token usage expanded (#1904)Sebastian Engel2021-10-0214-100/+100
| | | | | | | | | | * 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-291-0/+15
| |
* | Lexer for new language Maxima (#1885)Robert Dodier2021-09-042-0/+521
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-234-5/+3
| |
* | Merge branch 'feat/ascii-armored' of https://github.com/scop/pygments into ↵Matthäus G. Chajdas2021-08-082-0/+38
|\ \ | | | | | | | | | scop-feat/ascii-armored
| * | fix(asc): use Whitespace instead of Text for whitespaceVille Skyttä2021-05-181-10/+10
| | |
| * | test(asc): add id_ecdsa example fileVille Skyttä2021-05-172-0/+38
| | |
* | | Added lexer for parsing GSQL files (#1866)DanBarkus2021-08-082-0/+1726
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added GSQL lexer * encased keywords in 'words' function added link to language reference * added additional word functions * Added copyright annotation Removed commented out string * re-built test output file * Updated words to Keywords
* | | Merge branch 'master' of https://github.com/cltrudeau/pygments into ↵Matthäus G. Chajdas2021-08-082-0/+132
|\ \ \ | | | | | | | | | | | | cltrudeau-master
| * | | Changes from code review:Christopher Trudeau2021-06-212-2/+2
| | | | | | | | | | | | | | | | | | | | - renamed nodecon to nodejsrepl - removed bad mimetypes
| * | | Add JavaScript Node.js Console LexerChristopher Trudeau2021-05-292-0/+132
| |/ /
* | | Added Smithy Lexer (#1878) (#1879)Immanuel Washington2021-08-082-0/+1571
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added Smithy Lexer (#1878) * Added Smithy Lexer * Added Smithy Lexer auhtor * Documented Smithy as a supported language * Added Smithy test file and output * Updated Smithy Lexer * Added Standard file heading with copyright and license * Used `words` method for optimization, instead of bare regex * Specified whitespace punctuation in root * Updated aliases to only contain lowercase names to pass `test_basic_api` tests * Updated regexes lightly to fit regexlint rules (removing duplicate characters in group `-`) * Fixed regexes with errors in regexlint rules (Escaping brackets, gaps in capture groups) * Ran mapping script to fix build check * Ran mapping to update after changing aliases in previous commit
* | | Java: do not lex whitespace as Label, do not lex "default" as LabelGeorg Brandl2021-07-312-1/+38
| | | | | | | | | | | | Fixes #1851
* | | Only allow tables at line start to fix arrays. (#1872)Erik Moqvist2021-07-311-58/+242
| | | | | | | | | | | | | | | * Only allow tables at line start to fix arrays. * Only allow tables at line start to fix arrays.
* | | Revert "Added GSQL lexer (#1809)"Matthäus G. Chajdas2021-07-182-1726/+0
| | | | | | | | | | | | This reverts commit 710cac79c34412e551a4a92bcd7dd07d5d770922.
* | | Revert "Update golden test output for GSQL."Matthäus G. Chajdas2021-07-181-161/+161
| | | | | | | | | | | | This reverts commit 93e9bf3fc4d5cc6631a510d485096d03a05d3b23.
* | | Fix #1841.Matthäus G. Chajdas2021-07-182-0/+190
| | | | | | | | | | | | Use Comment.Single/Multiline in Mako template lexer.
* | | Update golden test output for GSQL.Matthäus G. Chajdas2021-07-181-161/+161
| | |
* | | Remove test file with unclear license.Matthäus G. Chajdas2021-07-182-21682/+0
| | |
* | | Add support for JSLT (#1821)João Abecasis2021-07-181-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for JSLT JSLT is an open-source JSON query and transformation language, inspired by jq, XPath, and XQuery: https://github.com/schibsted/jslt. * fixup! Add support for JSLT * fixup! Add support for JSLT
* | | Added GSQL lexer (#1809)DanBarkus2021-07-182-0/+1726
| | | | | | | | | | | | | | | | | | | | | | | | * Added GSQL lexer * encased keywords in 'words' function added link to language reference * added additional word functions