summaryrefslogtreecommitdiff
path: root/tests/snippets
Commit message (Collapse)AuthorAgeFilesLines
* css: fix lexing numbers inside function calls2382-fixGeorg Brandl2023-03-191-0/+51
| | | | Fixes #2382
* Improve lexing PHP attributes (#2360)Richard van Velzen2023-03-011-0/+38
|
* Fix lexing PHP anonymous classes with no parameters (#2359)Richard van Velzen2023-03-011-0/+28
|
* Improve lexing PHP's variable variable syntax (#2358)Richard van Velzen2023-03-011-0/+45
|
* Improve bash math expansion lexing (#2353)Richard van Velzen2023-02-241-0/+672
|
* More tests moved to snippets/ (#2351)Jean Abou-Samra2023-02-2325-0/+1429
|
* Python console: make traceback handling more robustGeorg Brandl2023-02-031-0/+97
| | | | | Fixes #2329 Fixes #2226
* Add support for normal diff syntax (#2321)CosmicHorror2023-01-292-0/+82
|
* Improve whitespace handling in MesonLexer/PerlLexer.Matthäus G. Chajdas2022-12-111-19/+19
|
* Improve whitespace handling in SLexer.Matthäus G. Chajdas2022-12-118-13/+13
|
* Improve whitespace handling in Python.Matthäus G. Chajdas2022-12-1181-129/+129
| | | | | | | | | This triggers a new case in the HtmlFormatter, which emits an empty span at the end of the line for a new line, as those are removed by the split-by-parts code. This requires separate post-processing. Doesn't fix all whitespace issues with Python either, but we're done to 360 failing examples with that, from previously >400.
* Improve whitespace handling in PraatLexer.Matthäus G. Chajdas2022-12-112-2/+2
|
* Improve whitespace handling in PraatLexer.Matthäus G. Chajdas2022-12-0414-34/+34
|
* Improve whitespace handling in TealLexer.Matthäus G. Chajdas2022-12-043-7/+7
|
* Improve whitespace handling in XmlLexer.Matthäus G. Chajdas2022-12-043-3/+25
|
* Improve whitespace handling in CMake/RegexLexer.Matthäus G. Chajdas2022-12-0432-84/+84
|
* Improve whitespace handling in the BashLexer.Matthäus G. Chajdas2022-12-0414-30/+30
|
* Improve whitespace handling in Markdown.Matthäus G. Chajdas2022-12-047-16/+16
|
* Fix whitespace handling in Ruby.Matthäus G. Chajdas2022-12-046-20/+20
|
* Add support for Wren language (#2271)PureFox482022-11-291-0/+10
| | | Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
* Accept colon(s) in YAML key namesGreg Dubicki2022-11-143-0/+33
| | | | | as it's ok according to the YAML specs and is widely used in the real world, f.e. in Puppet's Hiera (https://puppet.com/docs/puppet/7/hiera_quick.html#values_common_data)
* shell session: allow continuation without marker for PowerShellGeorg Brandl2022-10-281-0/+124
| | | | Fixes #2262
* Fix: Issues with .properties format using whitespace delimited key (#2241)jmzambon2022-09-253-4/+5
| | | | | | | | | Added: - support for space delimitor in every case, included multiline value - check for odd number of backslash escapes - "!" as comment start - support for escape of spaces and separators Dropped: - undocumented ";" and "//" comment start
* Adding MIPS Lexer (#2228)davisrichard4372022-09-213-0/+390
|
* CFamilyLexer: refuse quotes between parentheses for function definitions and ↵Jean Abou-Samra2022-08-151-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Fortran: fix catastrophic backtrackingJean Abou Samra2022-08-151-0/+112
| | | | \\\\|\\. is like \\. but causes catastrophic backtracking inside (...)* .
* Disable highlighting of some escape codes for python bytes literals (#2204)LaurenceWarne2022-08-152-0/+44
| | | | | | | | 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.
* PHP: fix `\"$var\"` inside strings (fixes #2105)Georg Brandl2022-06-301-0/+28
|
* Matlab session: fix traceback when a line continuation ellipsis appears in ↵Georg Brandl2022-06-231-0/+18
| | | | | | the output Fixes #2166
* terraform: accept leading whitespace for << heredoc delimGeorg Brandl2022-06-171-0/+33
| | | | Fixes #2162
* tcl: accept variables in ${name} syntaxGeorg Brandl2022-06-041-0/+17
| | | | Fixes #2145
* Fix comments within function declarations in C (#1891) (#2140)lambda-karlculus2022-05-301-0/+409
| | | Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
* java multiline highlighting based on issue 1858 (#2132)VishalN72022-05-102-0/+231
| | | Co-authored-by: Chung Tai <chungtai456@gmail.com>
* Initial commit for MCFunction Lexer + tests (#2107)Rit2022-04-2412-0/+1018
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* 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>
* 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
* CFamily: Lex identifiers after `case` as constants (#2084)amitkummer2022-03-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* 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
* | Update golen test files.Matthäus G. Chajdas2022-02-203-56/+56
| |
* | Merge branch 'master' of github.com:pygments/pygments; branch 'lexers_ijkl' ↵Matthäus G. Chajdas2022-02-2045-493/+577
|\ \ | | | | | | | | | of https://github.com/blu-base/pygments into blu-base-lexers_ijkl
| * | Whitespace token for kotlin lexerSebastian Engel2022-01-068-36/+36
| | |
| * | Whitespace token for scala lexerSebastian Engel2022-01-0617-54/+54
| | |
| * | Whitespace token for jvm lexerSebastian Engel2022-01-064-47/+47
| | |
| * | Whitespace token for julia lexerSebastian Engel2022-01-0610-347/+359
| | |
| * | Whitespace token j lexerSebastian Engel2022-01-062-2/+2
| | |
| * | Ws token coffee lexerSebastian Engel2022-01-062-2/+2
| | |
| * | Modernize Whitespace token in lexer javascriptSebastian Engel2022-01-062-5/+77
| |/
* | Add support for non-idiomatic single line comments in terraform (#2066)Charles Bouchard-Légaré2022-02-091-0/+3
| |