| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Use special lexer rules for escapes; fixes catastrophic backtracking,
and highlights them too.
Fixes #2356
|
| |
|
|
| |
This PR adds hcl as an option for highlighting HCL syntax as Hashicorp uses HCL for more than just Terraform, like Nomad.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Make it parse comments that are not their own line.
Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
|
| |
|
|
| |
Fixes #2162
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
* Only allow tables at line start to fix arrays.
|
| |
|
|
|
|
|
|
|
| |
* 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
* Use \S instead of [^\s]
|
| |
|
|
|
| |
* uniformize aliases order
* LighttpdConfLexer: add lighttpd.conf filename
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* Add NestedText lexer
* Add NestedText to list of supported languages
* Add some more test cases
* Update tests.
|
| |
|
| |
cahce_replacement_policy -> cache_replacement_policy
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| | |
|
| |
|
| |
Co-authored-by: Bryton Hall <email@bryton.io>
|
| |
|
|
|
|
| |
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 for directives like Include.
* removing unnecessary escaping.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Includes:
- module
- data
- output
- terraform
- config
- backend
- tags
Also includes example.tf with usage of these keywords.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Lexer fixes
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Fix lexer to support this:
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
|
| | |
| |
| |
| |
| | |
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.
|
| |\ \
| | |
| | |
| | |
| | | |
The PR on Bitbucket did not update correctly; pulling this in manually to get
the much better TOML example file.
|
| | | | |
|
| | /
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16
alias.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|