# HG changeset patch # User Franz Glasner # Date 1778186153 -7200 # Node ID d475f5e252eb2016b707108e3f45b90837617477 # Parent 66d49e49b06b36891e6ac4f6a50a1c9bc1b60ba9 Document an alternate variant to apply options to existing lexers diff -r 66d49e49b06b -r d475f5e252eb docs/details-algpseudocode.rst --- 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