summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Initial commit for MCFunction Lexer + tests (#2107)Rit2022-04-2416-0/+3424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit for MCFunction Lexer + tests * Apply suggestions from code review Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> * added docstring info + fix for run ... command * remove string ending Error tokens * not working - refactor in-progress * fixed: generic property * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * apply some fixes from comments * Update pygments/lexers/mcfunction.py Co-authored-by: Georg Brandl <georg@python.org> * spacing * updated tests and applied more suggestions * fixed comment regex, passes tests Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> Co-authored-by: Georg Brandl <georg@python.org>
* Futhark: add missing tokens (#2118)Troels Henriksen2022-04-242-40/+96
| | | | Adds recognition of 'def'/'type^'/'type~' keywords and adds some missing characters to the regexes for identifiers and punctuation.
* Fix #632. (#2101)Matthäus G. Chajdas2022-04-2464-256/+192
| | | | | | | | | | | | | | | | | | * Fix #632. The doc string indicates that the linenos table is wrapped in <div class="highlight">, but the actual implementation puts the <div> inside the table cell containing the code. This seems to cause issues as explained in #632, and given it doesn't match the documentation, this PR restores the original behavior. * Fix sample code in comment. * Update CHANGES. * Refactor the wrapping logic. Instead of calling _wrap_div() at the end of wrap(), _wrap_div() is now called after wrap/_wrap_tablinelinenos. This yields the desired behavior but removes the custom <div> generation code.
* Add lexer for colon-separated value config files like /etc/passwd, ↵Leistungsabfall2022-04-163-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /etc/shadow and /etc/group (#2112) * add PasswdLexer and ShadowLexer for lexing /etc/passwd and /etc/shadow * fix regex * Update pygments/lexers/configs.py Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> * address review comments * update _mapping.py * Create united lexer UnixConfigLexer for config files using colon-separated values, typically used in Unix/Linux system config files. * format docstring * UnixConfigLexer: add whitespace detection * add test snippets for UnixConfigLexer * address review comment Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr> Co-authored-by: Leistungsabfall <–Leistungsabfall@users.noreply.github.com>
* Fix nested type name highlighting in Savi lexer. (#2110)Joe Eli McIlvain2022-04-121-2/+2
| | | | | | | | | | | | | | | | | Nested type names were being highlighted as if they were function names. Now a phrase like `Spec.Process.run` is highlighted properly as: - `Name.Class` - `Punctuation` - `Name.Class` - `Punctuation` - `Name.Function` Instead of wrongly highlighted as it was before this commit: - `Name.Class` - `Punctuation` - `Name.Function` - `Punctuation` - `Name.Function`
* Add string interpolation to the Savi lexer.Joe Eli McIlvain2022-04-042-0/+28
| | | | | | Now the Savi lexer can tokenize string interpolation inside strings, which is a new feature added to Savi since the last time this lexer was updated.
* Fix Savi highlighting for underscore/private identifiers.Joe Eli McIlvain2022-04-042-4/+4
| | | | | | | Prior to this change, every underscore/private identifier in Savi code was being highlighted as if it were a class name. After this change, only those whose first letter is uppercase will be highlighted as such, which is the correct behavior.
* Update Savi language example.Joe Eli McIlvain2022-04-042-65/+23
| | | | | The previous example shows the old usage of the testing framework. Now the example reflects the current usage/API of that framework.
* Add Macaulay2 lexer (#1791)Doug Torrance2022-03-312-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add Macaulay2 lexer * Update symbols for Macaulay2 1.18 * Match whitespace characters in Macaulay2 lexer * Add states for strings/comments in Macaulay2 lexer * Update Macaulay2 lexer tests for string/comment edge cases * Improve comment and string matching in Macaulay2 lexer Instead of matching each character one at a time, we match all characters without special meaning together. * Update Macaulay2 test output * Update Macaulay2 lexer symbols for 1.19 release * Move "auto-generated" comment in Macaulay2 lexer down a few lines * Fix underline length in Macaulay2 lexer docstring * Add url field for Macaulay2 lexer * Bump copyright year for Macaulay2 lexer
* LilyPond: fix 'maybe-subproperties' state for properties containing dashes ↵Jean Abou-Samra2022-03-312-0/+13
| | | | (#2099)
* Terraform: Fix class name lexing (#2097)amitkummer2022-03-279-18/+38
| | | | | | | | | | | | | | * Merge unneeded state with it's parent rule The `blockname` state did not have a `#pop` after it's only rule, which caused outputting errors in #2094. Instead of adding a `#pop`, I merged the `blockname` state with the rule that uses it, to achieve the exact same lexing logic, but without another state in the lexer. * Add test for #2094 * Regenerate tokens for previous tests
* Add more POV-Ray operatorsPetr Zahradník2022-03-262-29/+460
|
* Add lexer for parsing Uxntal assembly code. (#2086)Erik Osheim2022-03-132-0/+5024
| | | | | | | | | | | | Uxn is a virtual machine which represents a personal computing playground, and is described here: https://100r.co/site/uxn.html Uxntal assembly language is described here: https://wiki.xxiivv.com/site/uxntal.html The demo code piano.tal is used with permission.
* CFamily: Lex identifiers after `case` as constants (#2084)amitkummer2022-03-1210-177/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Lex identifiers after `case` as constants Add a state for marking identifiers preceded by a `case` keyword as constants. Additionally, refactor the `label` rule to no longer permit a `case` keyword before a label. Consequentially, identifiers after a `case` keyword (like `foo` in `case foo:`) are no longer wrongly lexed as `Name.Label`, but as `Name.Constant`. In addition, this fixes #2076, as multiple `case` keywords in one line are lexed the same. * Add test for multiple `case` keywords in one line * Fix existing tests * Lex `::` as Operator and not Name.Constant After a `case`, when lexing a namespaced name, like `foo::bar`, lex the namespace operator `::` as Operator, and not Name.Constant. * Regenerate tokens
* LilyPond: fix wrong lexing of name containing builtin name (#2071)Jean Abou-Samra2022-03-072-37/+14
| | | | | Non-builtin names were scanned character by character, possibly causing recognition of a suffix as builtin.
* Added Berry Lexer (#2070)Beormund2022-03-072-0/+3161
|
* Add UL4 lexer. (#2040)Walter Dörwald2022-03-078-0/+963
|
* Add K and Q lexers (#2073)Nick Psaris2022-03-052-0/+1105
|
* Add qlik lexer (#1925)Gemma Down2022-03-042-0/+413
|
* Add nowrap option to LatexFormatterTakeshi KOMIYA2022-03-021-0/+12
|
* Changes per reviewBrian Ward2022-03-012-0/+9
|
* Update Stan to 2.29 standardsBrian Ward2022-02-282-22/+95
|
* Fix catastrophic backtracking in HTML and XML (#2069)Jean Abou-Samra2022-02-242-0/+68
| | | | | | These lexers have re.DOTALL in their flags, so r"(.|\n)" is equivalent to r".", except with catastrophic backtracking properties. Closes #2068
* Merge branch 'fix-elpi' of https://github.com/gares/pygments into gares-fix-elpiMatthäus G. Chajdas2022-02-202-2/+21
|\
| * elpi: fix lexing of -> in ctypeEnrico Tassi2022-01-092-2/+21
| | | | | | | | fix pi8027/algebra-tactics-paper#3
* | Merge branch 'master' of github.com:pygments/pygmentsFabrizio Riguzzi2022-02-20161-53754/+50178
|\ \
| * | Update golen test files.Matthäus G. Chajdas2022-02-204-159/+159
| | |
| * | Merge branch 'master' of github.com:pygments/pygments; branch 'lexers_ijkl' ↵Matthäus G. Chajdas2022-02-20144-53026/+47713
| |\ \ | | | | | | | | | | | | of https://github.com/blu-base/pygments into blu-base-lexers_ijkl
| | * | Whitespace token for lisp lexersSebastian Engel2022-01-0614-24240/+24240
| | | |
| | * | Whitespace token for kuin lexerSebastian Engel2022-01-061-141/+141
| | | |
| | * | Whitespace token for jasmin lexerSebastian Engel2022-01-061-1435/+1435
| | | |
| | * | Whitespace token for golo,pig,xtend lexersSebastian Engel2022-01-064-576/+576
| | | |
| | * | Whitespace token for kotlin lexerSebastian Engel2022-01-0611-451/+452
| | | |
| | * | Whitespace token for scala lexerSebastian Engel2022-01-0655-3857/+3866
| | | |
| | * | Whitespace token for jvm lexerSebastian Engel2022-01-069-1766/+1781
| | | |
| | * | Whitespace token for julia lexerSebastian Engel2022-01-0611-1807/+1819
| | | |
| | * | Whitespace token j lexerSebastian Engel2022-01-063-9272/+3718
| | | |
| | * | Ws token remaining javascript lexersSebastian Engel2022-01-063-380/+436
| | | |
| | * | Ws token coffee lexerSebastian Engel2022-01-065-1555/+1997
| | | |
| | * | Ws token objective-j lexerSebastian Engel2022-01-061-921/+573
| | | |
| | * | Ws token dart,lasso lexerSebastian Engel2022-01-063-1926/+1951
| | | |
| | * | Ws token livescript lexerSebastian Engel2022-01-061-153/+183
| | | |
| | * | Ws token kal lexerSebastian Engel2022-01-061-142/+200
| | | |
| | * | Ws token - typescriptSebastian Engel2022-01-061-1/+2
| | | |
| | * | Modernize Whitespace token in lexer javascriptSebastian Engel2022-01-0618-681/+748
| | | |
| | * | Modernize Whitespace token in lexer intallersSebastian Engel2022-01-063-811/+658
| | | |
| | * | Modernize Whitespace token in lexer infernoSebastian Engel2022-01-061-1729/+1730
| | | |
| | * | Modernize Whitespace token in lexer idlSebastian Engel2022-01-061-163/+188
| | |/
| * | Spice: Update some keywords (#2067)Marc Auberer2022-02-192-1/+3
| | |
| * | Add support for non-idiomatic single line comments in terraform (#2066)Charles Bouchard-Légaré2022-02-091-0/+3
| | |