| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
|
|
|
|
| |
DotNet lexer works with LibreOffice Basic, OpenOffice Basic, and StarOffice Basic.
* Update _mapping.py
|
| |
|
| |
|
|
|
| |
Co-authored-by: Fabian Huch <huch@in.tum.de>
|
| |
|
|
|
|
|
|
| |
- Add new predeclared identifiers: `any` and `comparable`
- Add new operator for type parameters: `~` and `|`
Ref: https://go.dev/ref/spec
|
|
|
|
|
|
| |
the output
Fixes #2166
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Remove backslash escape lexing in string literals.
(Don't know why I added those in the first place!)
* Lex strings in their entirety, not one character at a time.
* Treat unclosed string literals as errors.
|
|
|
|
| |
Related to #1905
|
| |
|
| |
|
|\ |
|
| | |
|
| |\
|/ / |
|
| |
| |
| | |
F* actually allows for C-style `//` line comments to start anywhere in a line, not just at the beginning.
|
| | |
|
| |
| |
| |
| | |
Fixes #2162
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes #2163
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
For the pygmentize command line, this pull request adds detection of true-color support on the terminal and makes that the default formatter. It looks up the COLORTERM environment variable having a value of truecolor or 24bit. If that is the case, it sets the default formatter to use the TerminalTrueColorFormatter.
The COLORTERM environment variable is a convention that has been adopted by some terminals for specifying true-color is supported.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
identifiers (#2158)
. is not an operator in Coq: in this specific usage, it is only meant to build a qualified name, so this rule really corresponds to a proper lexical rule in Coq
Unlike most languages, Coq has a large set of special words that are not reserved: they may still be used as identifiers. For example Prop is a special word, which currently gets highlighted as such in Equations.Prop.Equations, but it should be recognized as a regular name there. Because of how flexible the syntax of Coq is, it's not straightforward to disambiguate things with just a bunch of regexes, so we have to rely on heuristics. Skipping qualified names from being recognized as keywords is an easy win.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Switch from pkg_resources to importlib.metadata
importlib.metadata is a standard library replacement for
pkg_resources, available starting with Python 3.8. It is faster than
pkg_resources. This lets the plugin interface use it when available,
i.e. on Python 3.8 and later. On earlier Python, it uses the
importlib_metadata PyPI backport if available, and finally falls back
on pkg_resources. setup.cfg gains an extra called plugins, which can
allow a project to install "pygments[plugins]" in order to ensure that
plugins support is present even if installed with older Python
versions.
Timings for lexing an empty file with a lexer from a random plugin:
Before:
real 0m0,238s
user 0m0,210s
sys 0m0,029s
After:
real 0m0,141s
user 0m0,125s
sys 0m0,017s
Fixes #2116, #2126
|
| |
| |
| |
| | |
Fixes #2145
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Support building docs when some plugins are installed
Pass plugins=False to get_all_lexers, otherwise we try to document
them, which fail. For styles, use STYLE_MAP directly; given that I'm
trying to introduce a new plugin interface, I'd rather not change
get_all_styles to support plugins=False right now.
* Add comment (and a fix)
|
| | |
|
| |
| |
| |
| | |
These are irrelevant because the fnmatch module implementation already
uses functools.lru_cache.
|
| |
| |
| | |
It is quite common in my experience, along with 'TODO' and 'XXX'.
|
| | |
|
| |
| |
| | |
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a unified script, to reduce code duplication and in preparation
for doing a similar thing with styles and filters. The new script
also uses a bit more modern Python APIs (e.g., pathlib).
Unlike the previous scripts, it does not replace replace CRLF with LF
because Git should do that itself.
|
| |
| |
| |
| | |
pyflakes complained about an unused variable due to an oversight in
49c757cab5.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add Make target for building Pyodide with currently checked out Pygments
Add a target to the documentation's Makefile to make Pyodide with
Pygments from the current checkout.
Additionally, use this target when building the documentation with
the demo page.
The new target works by building Pyodide on a Docker container, and
then exporting the build artifacts back to the host.
The Dockerfile used by the new target is based on the Dockerfile which
was used for building Pyodide on the CI:
https://github.com/pygments/pyodide-artifacts/blob/master/container/Dockerfile
The main difference between the two is that the new Dockerfile uses the
newest Pyodide base image, which is built by a repository which is actively
maintained (the Iodide project is no longer maintained).
The purpose of this change is to allow running the demo locally,
which was not possible previously, as Pyodide was only built by the
CI when deploying to Github Pages.
* Add instructions on how to run the demo locally to the README
* Update demo to work with Pyodide v0.20
Remove usage of Pyodide functionality which was deprecated in Pyodide v0.17:
- Loading Pyodide using `languagePluginURL` and `languagePluginLoader`.
- Access to globals via `pyodide.globals.x` has changed to `pyodide.globals.get("x")`.
Source:
https://pyodide.org/en/stable/project/release-notes/v0.17.0.html?highlight=languageplugin#api-changes
* Fix #2137
* Fix use of `styles` variable before it's defined
The `styles` variable was being used before it's value was set (which
is done when Pyodide finishes loading).
* Remove GitHub action for building Pyodide
This action is obsolete, as building Pyodide is now done using `make pyodide`.
* Upgrade Pages deployment action version
* Add to .dockerignore all files in .gitignore
* Change `pyodide` target to be a phony target
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix most warnings in Sphinx build
Note that some invalid references are simply removed because the
lexers are all in the same section, so the link is already easy to
find and there is no need to repeat it over and over.
* fixup: Add orphan languages.rst to allow referencing
* Typos
|
| |
| |
| | |
Use `Name.Builtin`.
|
| |
| |
| |
| | |
Don't rely on the error message since 'missing 1 required positional
argument' can give false positives. Instead, use issubclass().
|