summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* Add Terminal Tips Documentation (#2425)Micah Cochran2023-05-072-0/+106
| | | | | | | | | | | * add Terminal Tips Documentation - Issue #2131 * add newlines after ::, typo * Add highlight directive --------- Co-authored-by: Jean Abou Samra <jean@abou-samra.fr>
* Enable Sphinx nitpicky mode and fix warnings (#2403)Jean Abou-Samra2023-04-111-3/+8
|
* Fix page titleJean Abou Samra2023-03-301-0/+1
|
* Use autodoc for pygments.stylesJean Abou Samra2023-03-301-42/+5
|
* Use autodoc for pygments.lexersJean Abou Samra2023-03-301-80/+10
|
* Use autodoc for pygments.utilJean Abou Samra2023-03-301-33/+7
|
* Use autodoc for Formatter classJean Abou Samra2023-03-301-47/+2
|
* Use autodoc a bit moreJean Abou Samra2023-03-301-98/+6
|
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-291-1/+1
|
* Devolve Contributing.md (#2352)Jean Abou-Samra2023-02-234-72/+230
| | | | | | | | | | | | | | * 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.
* Doc: fix markup on styledevelopment pageJean Abou Samra2023-02-232-7/+6
| | | | | | | | 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.
* Replace Makefile with tox (#2331)Jean Abou-Samra2023-02-233-15/+6
| | | | | | | | | | | | | | | 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.
* Fix various documentation references.Matthäus G. Chajdas2023-02-125-13/+16
|
* Fix lots of missing encoding="utf-8" parametersJean Abou Samra2023-01-311-2/+2
| | | | | Some of these are probably unnecessary (ASCII-only content), but it's easier not to think about it.
* styles gallery: Make docstring in example follow PEP 257Martin Fischer2022-12-301-1/+1
| | | | | | 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/.
* Fix doc build warningsJean Abou Samra2022-12-071-1/+3
|
* Update demo.cssMatthäus G. Chajdas2022-12-051-0/+1
| | | Port https://github.com/pygments/pygments.github.io/pull/4/files
* 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.