Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
changeset 153:d475f5e252eb
Document an alternate variant to apply options to existing lexers
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 07 May 2026 22:35:53 +0200 |
| parents | 66d49e49b06b |
| children | b38d10ab914a |
| files | docs/details-algpseudocode.rst |
| diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/details-algpseudocode.rst Thu May 07 16:25:54 2026 +0200 +++ b/docs/details-algpseudocode.rst Thu May 07 22:35:53 2026 +0200 @@ -383,7 +383,13 @@ =========================== Defining lexers with non-default options in `Sphinx`_ can be done in its -configuration file :file:`conf.py`: +configuration file :file:`conf.py`. + +The first option is to apply the Sphinx config value ``highlight_options`` +properly. An existing lexer can be customized by options. + +A more flexible alternative is to define a new lexer in the Sphinx +application. The very same lexer class can be used with different options: .. code-block:: python
