summaryrefslogtreecommitdiff
path: root/pygments/lexers/configs.py
Commit message (Collapse)AuthorAgeFilesLines
* Improve Java properties lexer (#2404)Jean Abou-Samra2023-04-171-18/+34
| | | | | | Use special lexer rules for escapes; fixes catastrophic backtracking, and highlights them too. Fixes #2356
* adds hcl alias for terraform syntax (#2375)Christopher Baklid2023-03-291-2/+2
| | | | This PR adds hcl as an option for highlighting HCL syntax as Hashicorp uses HCL for more than just Terraform, like Nomad.
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-291-1/+1
|
* all: move often-used "line_re" to pygments.lexerGeorg Brandl2022-10-271-2/+1
|
* all: style fixesGeorg Brandl2022-10-271-6/+5
|
* Fix: Issues with .properties format using whitespace delimited key (#2241)jmzambon2022-09-251-8/+20
| | | | | | | | | 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
* Fix syntax highlighting of INI language (#2217)jmzambon2022-09-151-2/+11
| | | | | Make it parse comments that are not their own line. Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
* terraform: accept leading whitespace for << heredoc delimGeorg Brandl2022-06-171-1/+1
| | | | Fixes #2162
* configs: style fixesGeorg Brandl2022-06-171-4/+3
|
* Add lexer for colon-separated value config files like /etc/passwd, ↵Leistungsabfall2022-04-161-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /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-271-7/+2
| | | | | | | | | | | | | | * 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
* Rework URL information in lexers.Matthäus G. Chajdas2022-03-201-18/+26
| | | | | | | | This commit adds a new url field to a lexer, which can be used to link to the language website, instead of relying on having the link in either languages.rst or the docstring of the lexer. Additionally, it changes the languages.rst file to auto-generate the list of lexers from the actual source code, using the provided URL.
* Add support for non-idiomatic single line comments in terraform (#2066)Charles Bouchard-Légaré2022-02-091-5/+5
|
* Happy new year.Georg Brandl2022-01-251-1/+1
|
* Squashed commit of the following:Matthäus G. Chajdas2021-11-061-4/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add .editorconfig to IniLexer (#1932)Jawira Portugal2021-10-281-1/+1
|
* Whitespace token modernization - [bc] lexers - regarding #1905 (#1923)Sebastian Engel2021-10-231-77/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Only allow tables at line start to fix arrays. (#1872)Erik Moqvist2021-07-311-2/+4
| | | | | * Only allow tables at line start to fix arrays. * Only allow tables at line start to fix arrays.
* use ini lexer for systemd service files (#1849)Akuli2021-07-181-1/+7
| | | | | | | | | * use ini lexer for systemd service files * add more unit file names * make mapfiles Co-authored-by: Aku Viljanen <aku.viljanen@puheet.com>
* Support Terraform 0.14 syntax (#1756)Leonardo Giordani2021-05-021-36/+93
| | | | | * Support Terraform 0.14 syntax * Use \S instead of [^\s]
* uniformize aliases order (#1780)Mestery2021-04-261-2/+2
| | | | | * uniformize aliases order * LighttpdConfLexer: add lighttpd.conf filename
* Update CHANGES.Matthäus G. Chajdas2021-03-211-0/+2
|
* Add NestedText lexer (#1578)Kale Kundert2021-03-211-1/+24
| | | | | | | | | * Add NestedText lexer * Add NestedText to list of supported languages * Add some more test cases * Update tests.
* Fix typo in keywords of SquidConfLexer. (#1730)Sardorbek Imomaliev2021-03-031-1/+1
| | | cahce_replacement_policy -> cache_replacement_policy
* Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Detect malformed closing tags as errors. (#1656)Catatonic2021-01-061-1/+3
|
* support indented entries in IniLexer (#1624)Leistungsabfall2021-01-041-1/+1
|
* Bump copyright year.Matthäus G. Chajdas2021-01-031-1/+1
|
* all: weed out more backtracking string regexesGeorg Brandl2020-12-251-1/+1
|
* Add analyze_text to make make check happy. (#1549)Matthäus G. Chajdas2020-09-231-0/+12
| | | | | | | | | | | | | | | | | | | * Add analyze_text to make make check happy. This also fixes a few small bugs: * Slash uses *.sla as the file ending, not *.sl * IDL has endelse, not elseelse * Improve various analyse_text methods. * Improve various analyse_text methods. * Make Perl less confident in presence of :=. * Improve brainfuck check to not parse the whole input. * Improve Unicon by matching \self, /self * Fix Ezhil not matching against the input text * Simplify Modula2::analyse_text.
* all: fixup remaining regexlint warningsGeorg Brandl2020-09-061-2/+2
|
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-221-1/+1
|
* add Singularity lexer (#1285)Georg Brandl2020-06-011-2/+35
| | | Co-authored-by: Bryton Hall <email@bryton.io>
* Configs lexer: Allow Kconfig derivate names (#1458)Maxime Chretien2020-05-201-1/+1
| | | | | | In the linux source code a lot of files are named Kconfig.debug and there are also other derivatives like Kconfig.x86 or Kconfig-nommu Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
* Fix glob patterns when absolute paths are used (#1378)Catatonic2020-02-021-1/+1
| | | | | | * Fix glob patterns for directives like Include. * removing unnecessary escaping.
* add filename for pipenv & poetrytzing2020-02-011-1/+1
|
* Fix directives that have 0 argumentscatatonicprime2019-12-191-2/+1
|
* Add terraform keywords module, data, output, and othersGeoffrey Grosenbach2019-11-281-18/+22
| | | | | | | | | | | | | Includes: - module - data - output - terraform - config - backend - tags Also includes example.tf with usage of these keywords.
* Dockerfile: accept FROM...AS syntax (bitbucket PR #810)Georg Brandl2019-11-241-2/+4
|
* Support multiline comments & multiline argumentscatatonicprime2019-11-111-2/+2
|
* Fixup all headers and some more minor problems.2.4.2Georg Brandl2019-05-281-1/+1
|
* Merged in 6wind/pygments-main/lexer-fixes (pull request #766)Anteru2019-04-301-1/+1
|\ | | | | | | Lexer fixes
| * lexers/apache: allow '>' characters in tagsRobin Jarry2018-06-191-1/+1
| | | | | | | | | | | | | | | | Fix lexer to support this: <IfVersion >= 2.4> ErrorLogFormat "%{cu}t %M" </IfVersion>
* | Improve TOML lexer.Matth?us G. Chajdas2019-04-301-8/+11
| | | | | | | | | | The last found a few shortcomings in the TOML around float parsing. These get fixed in this commit; additionally, I simplified a bunch of regex.
* | Merge ssh://hg@bitbucket.org/Freso/pygments-main manually.Matth?us G. Chajdas2019-04-301-1/+0
|\ \ | | | | | | | | | | | | The PR on Bitbucket did not update correctly; pulling this in manually to get the much better TOML example file.
| * | Add `versionadded` to new lexer classesFrederik ?Freso? S. Olesen2019-04-011-0/+7
| | |
| * | Add lexers for DASM16, Augeas, TOML, and SlashFrederik ?Freso? S. Olesen2019-03-311-0/+917
| / | | | | | | | | | | | | | | | | Lexers copied unmodified from https://github.com/liluo/pygments-github-lexers which is available under a 2-clause BSD license (same as pygments), copyright 2012 to GitHub, Inc. Fixes #1391 and #1150.
* | Various fixes and cleanups to the last batch of new languages.Matth?us G. Chajdas2019-04-281-1/+9
| | | | | | | | | | Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16 alias.
* | Add TOML example file and improve the lexer a bit.Matth?us G. Chajdas2019-04-281-1/+8
| |
* | Add lexers for DASM16, Augeas, TOML, and SlashFrederik ?Freso? S. Olesen2019-03-311-1/+78
| | | | | | | | | | | | | | | | | | Lexers copied unmodified from https://github.com/liluo/pygments-github-lexers which is available under a 2-clause BSD license (same as pygments), copyright 2012 to GitHub, Inc. Fixes #1391 and #1150.