| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* add Terminal Tips Documentation - Issue #2131
* add newlines after ::, typo
* Add highlight directive
---------
Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Devolve Contributing.md
Move the content to the docs and website so it is displayed on
pygments.org, to make it easier to find.
- Regex dos and don'ts go to lexerdevelopment.rst
- The rest goes to a new file contributing.rst
- That makes the explanation of how lexers are tested in
lexerdevelopment.rst redundant, so remove it. The bit on how to add a
lexer goes to contributing.rst.
|
|
|
|
|
|
|
|
| |
Due to a wrong reST header, there were two top-level headers on that
page, leading to the subtitle “Style rules” being displayed on
https://pygments.org/docs/ as if it were a separate section.
Also harmonize the title.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Porting notes:
- tox handles Python environments automatically. Remove a bit of PYTHONPATH
manipulation (that was using Python 2 code which always failed!)
- No `clean` target: `git clean -xdf` should fit the bill.
- No `reindent` target: the `reindent.py` script it was using does not
exist (anymore?).
- No equivalent of tox-test-coverage, which was an artifact of the past,
using nose. Instead, the test-coverage target only is ported, which
uses pytest, and works.
|
| |
|
|
|
|
|
| |
Some of these are probably unnecessary (ASCII-only content), but it's
easier not to think about it.
|
|
|
|
|
|
| |
The example is displayed multiple times at https://pygments.org/styles/.
Code displayed on the Pygments website should follow best practices,
such as https://peps.python.org/pep-0257/.
|
| |
|
|
|
| |
Port https://github.com/pygments/pygments.github.io/pull/4/files
|
| |
|
|
|
|
|
|
| |
* Move the generation into sphinext, similar to other overviews we have.
* Generate a table instead of the plain list. This table contains links
to the lexer class now.
|
|
|
|
|
|
| |
* Copy the security paragraph to security.rst
* Fix missing maintainer in docs/index.rst
* Fix incorrect emphasis markup
|
|
|
|
|
| |
Explain that adding styles to the source tree directly is something that
should be only used by contributors.
|
|
|
|
|
|
|
|
|
|
|
| |
* Register new style
* Replace default_style with Token
#2184
* Remove default_style from styles
* Simplify register style code
|
|
|
|
|
|
|
| |
* Add Name.Property token missing from docs
* Add Comment.PreprocFile token missing from docs
* Add Punctuation.Marker token to tokens dict
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a tooltips option to HtmlFormmater.
* Rename option tooltips to debug_token_types.
* Use explicit if block.
* Fix check.
* Document how to use the new debug_token_types option for the HTML formatter.
* Remove output redirection from example call.
|
|\
| |
| |
| | |
https://github.com/zaibacu/pygments into zaibacu-master
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
For large files it's better to have a viewport because
then you can view both the form as well as the part of
the output you are interested in at the same time.
|