summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* languages page: fix leftover HTML syntaxGeorg Brandl2022-10-251-1/+1
|
* Improve the languages list.Matthäus G. Chajdas2022-10-243-46/+16
| | | | | | * 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.
* More documentation fixes.Matthäus G. Chajdas2022-08-203-2/+33
| | | | | | * Copy the security paragraph to security.rst * Fix missing maintainer in docs/index.rst * Fix incorrect emphasis markup
* Improve documentation.Matthäus G. Chajdas2022-07-261-0/+7
| | | | | Explain that adding styles to the source tree directly is something that should be only used by contributors.
* Register new style (#2183)flywire2022-07-261-12/+18
| | | | | | | | | | | * Register new style * Replace default_style with Token #2184 * Remove default_style from styles * Simplify register style code
* Reconcile standard token discrepancies in docs and code (#2187)Andrew T. Biehl2022-07-151-0/+6
| | | | | | | * Add Name.Property token missing from docs * Add Comment.PreprocFile token missing from docs * Add Punctuation.Marker token to tokens dict
* Fix reST markup mistake (#2176)Álvaro Mondéjar2022-07-051-1/+1
|
* Slight doc clarification about 'make mapfiles'Jean Abou Samra2022-06-291-1/+2
|
* Detect true-color terminal support for pygmentize (#2160)Micah Cochran2022-06-131-0/+12
| | | | | | 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 (#2155)Jean Abou-Samra2022-06-041-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 (#2154)Jean Abou-Samra2022-06-041-6/+8
| | | | | | | | | | * 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)
* Update token docs (#2156)Jean Abou-Samra2022-06-041-14/+6
|
* Overhaul demo and support running it locally (#2141)amitkummer2022-05-216-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 (#2124)Jean Abou-Samra2022-05-131-0/+5
| | | | | | | | | | | * 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
* Rework URL information in lexers.Matthäus G. Chajdas2022-03-205-382/+90
| | | | | | | | 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 lexer for parsing Uxntal assembly code. (#2086)Erik Osheim2022-03-131-0/+1
| | | | | | | | | | | | 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.
* Added Berry Lexer (#2070)Beormund2022-03-071-0/+1
|
* Add UL4 lexer. (#2040)Walter Dörwald2022-03-071-0/+1
|
* Add K and Q lexers (#2073)Nick Psaris2022-03-051-0/+2
|
* Add qlik lexer (#1925)Gemma Down2022-03-041-0/+1
|
* Add notes to Contributing.md about common mistakes in lexers (#2075)Jean Abou-Samra2022-03-022-8/+11
|
* Update CHANGES, language list, versionadded.Matthäus G. Chajdas2022-02-201-0/+1
|
* Bump to Python 3.6 (closes #2059.)Matthäus G. Chajdas2022-02-011-1/+1
|
* Happy new year.Georg Brandl2022-01-253-3/+3
|
* Fix typos (#2030)Kian-Meng Ang2022-01-182-2/+2
|
* Doc: remove mention of Python 2 (#2039)Jean Abou-Samra2022-01-181-2/+2
|
* Provide an accurate count instead of "over 500".Matthäus G. Chajdas2021-12-292-1/+2
|
* Add link to changelog in sidebar.Matthäus G. Chajdas2021-12-291-10/+1
|
* Add a tooltips option to HtmlFormatter. (#1822)Walter Dörwald2021-12-281-3/+11
| | | | | | | | | | | | | * 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.
* Merge branch 'master' of github.com:pygments/pygments; branch 'master' of ↵Matthäus G. Chajdas2021-12-281-0/+1
|\ | | | | | | https://github.com/zaibacu/pygments into zaibacu-master
| * Add to languages listŠarūnas Navickas2020-09-081-0/+1
| |
* | demo: remove Highlight button (update automatically)Martin Fischer2021-12-263-22/+53
| |
* | demo: limit height of formatted code (overflow)Martin Fischer2021-12-261-2/+15
| | | | | | | | | | | | 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.
* | demo: display warning for styles with poor contrastsMartin Fischer2021-12-263-1/+13
| |
* | demo: support tokens formatterMartin Fischer2021-12-264-7/+66
| |
* | demo: save and load style to/from URLMartin Fischer2021-12-261-16/+24
| |
* | demo: streamline interface (and improve accessibility)Martin Fischer2021-12-262-27/+46
| | | | | | | | | | | | | | | | | | | | * "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.
* | demo: fix lexer guessing based on filenameMartin Fischer2021-12-263-15/+11
| |
* | demo: use URLSearchParams browser APIMartin Fischer2021-12-261-19/+8
| |
* | demo: clean up markupMartin Fischer2021-12-262-16/+24
| |
* | demo: instantly apply style changes by avoiding re-lexingMartin Fischer2021-12-264-17/+42
| |
* | demo: promote styles with a good contrastMartin Fischer2021-12-262-6/+14
| |
* | demo: guess lexer if none selectedMartin Fischer2021-12-264-42/+74
| |
* | demo: disable copy link when URI too long for web serverMartin Fischer2021-12-262-3/+16
| |
* | demo: stop using deprecated Document.execCommand()Martin Fischer2021-12-262-11/+9
| | | | | | | | Use the modern navigator.clipboard API instead.
* | demo: stop blocking main thread by using web workerMartin Fischer2021-12-263-43/+60
| | | | | | | | | | | | | | | | | | | | 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).
* | demo: make form usable while Pyodide is loadingMartin Fischer2021-12-264-49/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | Linkify GitHub issue/PR numbers in changelog (#1998)Martin Fischer2021-12-231-1/+18
| |
* | Update CHANGES, language list.Matthäus G. Chajdas2021-12-121-0/+1
| |
* | Fix typo, update CHANGES.Matthäus G. Chajdas2021-12-061-1/+1
| |