| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* "Try out Pygments!" is more descriptive than "Try it out!"
* Moved the description of the implementation to the end.
* Added a <noscript> tag suggesting `pip install` and pygmentize.
* Added a <label> for the textarea.
* Disable spell checking for the textarea.
* Reduced the scope of the reset button to the file input.
* Added autofocus for the language select.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Use the modern navigator.clipboard API instead.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously highlighting a large file with a complex lexer just hung the
whole browser tab (meaning you couldn't interact with the page anymore).
This commit outsources the higlighting to another thread by using a web
worker. Depending on web workers shouldn't reduce browser compatability
since the page already depends on WASM (and according to caniuse.com any
browser that supports WASM also supports web workers).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously the form could only be filled out after Pyodide finished
loading (since the <select> options were generated via Pyodide).
This commit changes this, so that the <select> options are already
in the static HTML. The "Loading Python..." form overlay is removed,
instead just the Highlight button is disabled, letting users fill
out the form while Pyodide is loading.
When a ?code query parameter is given a "Loading Python..." message
is displayed below the form, since in that case users probably want
to wait for the highlighted code (instead of filling out the form).
|
| | |
|
| | |
|
| | |
|