changeset 158:f08d77b8cbf7

Document the default filter "raiseonerror" that is applied by Sphinx by default for lexers
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 08 May 2026 16:44:30 +0200
parents 902147c24f9b
children 4ee0b1536ea6
files docs/details-algpseudocode.rst
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/docs/details-algpseudocode.rst	Fri May 08 16:36:11 2026 +0200
+++ b/docs/details-algpseudocode.rst	Fri May 08 16:44:30 2026 +0200
@@ -414,4 +414,13 @@
 
 Similarily it works for custom styles and filters.
 
+.. note:: Lexers in Sphinx are instantiated with the `raiseonerror` filter
+          applied by default.
+          This is also true for custom lexers that are added by
+          :py:meth:`Sphinx.add_lexer`.
+
+          Lexer *instances* that are added to
+          :py:data:`sphinx.highlighting.lexers` somehow are taken as is by
+          Sphinx and are not augmented with any default filters.
+
 For older Sphinx versions your mileage may vary.