summaryrefslogtreecommitdiff
path: root/doc/docs
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
|
* Devolve Contributing.md (#2352)Jean Abou-Samra2023-02-233-67/+228
| | | | | | | | | | | | | | * 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-231-4/+4
| | | | | | | | | | | | | | | 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
|
* More documentation fixes.Matthäus G. Chajdas2022-08-202-0/+32
| | | | | | * 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
* Update token docs (#2156)Jean Abou-Samra2022-06-041-14/+6
|
* Rework URL information in lexers.Matthäus G. Chajdas2022-03-202-0/+47
| | | | | | | | 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 notes to Contributing.md about common mistakes in lexers (#2075)Jean Abou-Samra2022-03-021-8/+8
|
* Fix typos (#2030)Kian-Meng Ang2022-01-182-2/+2
|
* 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.
* Fix typo, update CHANGES.Matthäus G. Chajdas2021-12-061-1/+1
|
* Clarifying some documentation (#1928)Arthur Milchior2021-12-064-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NF: adding an example of use of simple filter @simplefilter is great, but also not very intuitive. Indeeds, the syntax seems to indicate that you define a function with four arguments while in reality you define a class whose constructor takes arbitrary keyword arguments. I believe in this case an example to show how to instantiate this filter is really necessary. Regarding simplefilter, I also believe that it could be improved in two simple ways: * accepting any method which takes lexer and stream as a filter. That would be sufficient as long as there is no option * the @simplefilter decorator could deal with `self` so that the user do not have to add it themselves. Probably not worth doing it no, as it would break compatibility with current version, but would be even simpler to use * NF: clarifying get_..._options get_bool_opt's documentation seems to indicate that the key is interpreted as a Boolean. While a quick look at the code shows clearly that the value associated to the key is what is interpreted as a Boolean. I hope I made the code clearer to any people who know python by indicating that it is essentially `.get` but with extra features * NF: clarifying Filter `filter` has already a specific behavior in general python, or for any people used to functional programing (and even if some dom processor). So indicating that a filter is not something that remove some tokens seems really useful to try to explain what is going on. * NF: adding details regarding states in lexer I found the state explanation confusing. I do know what a state machine is. However, reading the code, I first thought that there were two distinct variables: * the current state * the stack that are somehow related but distinct. Explaining that the current state is the top of the stack was lacking in my opinion. That also help explain #push. In particular that if you define in state "s" an operation whose new state is "#push", the behavior can be quite different than if the new state was "s".
* Fix broken link in documentationMartin Fischer2021-11-041-1/+1
| | | | Co-authored-by: Georg Brandl <georg@python.org>
* Add styles gallery to website (#1943)Martin Fischer2021-11-041-2/+2
|
* Add documentation for missing CLI options (#1900)amitkummer2021-10-021-0/+40
| | | Add documentation for the -N, -g, -s and --json command line options.
* Support error locations in Python tracebacks (#1852)Jean-Abou-Samra2021-07-061-0/+6
| | | | | | | | | | Support both single carets for syntax errors (Python 2 and 3) and fine-grained error locations with several carets (Python 3.11+). Previously, the carets were highlighted as operators. This uses a new token, Token.Punctuation.Marker. For now, no style supports it specifically. In the future, styles might start differentiating it from Token.Punctuation. [Closes #1850.]
* uniformize aliases order (#1780)Mestery2021-04-261-1/+1
| | | | | * uniformize aliases order * LighttpdConfLexer: add lighttpd.conf filename
* docs: move style development section to its own doc.Georg Brandl2021-04-163-76/+85
| | | | Reference: #1571
* fix typo (#1762)jgart2021-03-301-1/+1
|
* Update command to indeed include line numbers (#1745)Rafael Rossi2021-03-111-1/+1
| | | Command was not including the line numbers, missing `linenos=1` option.
* Rename "tests/lexers" to "tests/snippets" and update the contributionGeorg Brandl2021-01-201-3/+3
| | | | docs to point to both snippets and examplefiles.
* Also add auto-updatable output-based tests to examplefiles (#1689)Oleh Prypin2021-01-201-4/+6
| | | Co-authored-by: Georg Brandl <georg@python.org>
* update pygments.rb URL to new home (#1669)Marat Radchenko2021-01-081-1/+1
| | | see #1660
* all: use argumentless super()Georg Brandl2020-09-061-1/+1
|
* Spell out that we want lexers in separate files.Matthäus G. Chajdas2020-08-231-1/+5
|
* docs: clarify cmdline invocation in lexer dev sectionGeorg Brandl2020-08-231-3/+6
| | | | closes #1518
* Fix links (#1389)Ofek Lev2020-02-101-1/+1
| | | | | | * Fix link * here too
* Update many links to use HTTPS and skip redirectsKurt McKee2019-12-186-11/+11
|
* Improve docs.Matthäus G. Chajdas2019-12-081-9/+10
| | | | Add a contributing guide for newcomers, and remove references to pygmentize in the development docs. During development, there is no pygmentize.
* fix small issues in the docsGeorg Brandl2019-11-241-8/+3
|
* Update hg/bitbucket -> git/github everywhere.Georg Brandl2019-11-101-3/+3
|
* Fix a few markup problems in the docs.Georg Brandl2018-12-181-26/+24
|
* Update ansi color name change version.Matth?us G. Chajdas2018-12-161-6/+6
|
* Merged in mortenlund/pygments-main (pull request #777)Anteru2018-12-161-8/+41
|\ | | | | | | | | | | | | | | Change ansi color names to more saying names Approved-by: Morten E. Lund <melund@gmail.com> Approved-by: jonathanslenders <jonathan@slenders.be> Approved-by: Anteru <bitbucket@ca.sh13.net>
| * Change ansi color names to more saying namesMorten Enemark Lund2018-08-041-8/+41
| | | | | | | | | | | | The ansi color names are changed to names which are easier to understand and align with color names of other projects and terminals. (e.g. ``#ansifuchsia`` to ``ansibrightmagenta``) This also drops the # prefix to the color names. Hashtag # is usually used for hex colors and the names are already prefixed with `ansi`. Furthermore, it allows the new and old set of names to be exclusive.