comparison docs/lexer-algpseudocode.rst @ 294:a094305c5708

Docs. More cross-refs.
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 23 May 2026 11:43:21 +0200
parents 3e2f7ca64894
children
comparison
equal deleted inserted replaced
293:6d5d630506e4 294:a094305c5708
1 .. -*- coding: utf-8; indent-tabs-mode: nil; -*- 1 .. -*- coding: utf-8; indent-tabs-mode: nil; -*-
2 2
3 .. _lexer-algpseudocode:
3 4
4 ************************************* 5 *************************************
5 AlgPseudocode and Language Variants 6 AlgPseudocode and Language Variants
6 ************************************* 7 *************************************
7 8
632 # here. 633 # here.
633 # 634 #
634 app.add_lexer("noend-algpseudocode", 635 app.add_lexer("noend-algpseudocode",
635 partial(AlgPseudocodeLexer, no_end=True)) 636 partial(AlgPseudocodeLexer, no_end=True))
636 637
637 Similarily it works for custom styles and filters. 638 .. _note-raiseonerror-filter:
638 639
639 .. note:: Lexers in Sphinx are instantiated with the `raiseonerror` filter 640 .. note:: Lexers in Sphinx are instantiated with the `raiseonerror` filter
640 applied by default. 641 applied by default.
641 This is also true for custom lexers that are added by 642 This is also true for custom lexers that are added by
642 :py:meth:`Sphinx.add_lexer`. 643 :py:meth:`Sphinx.add_lexer`.
647 648
648 Lexer *instances* that are added to 649 Lexer *instances* that are added to
649 :py:data:`sphinx.highlighting.lexers` somehow are taken as is by 650 :py:data:`sphinx.highlighting.lexers` somehow are taken as is by
650 Sphinx and are not augmented with any default filters. 651 Sphinx and are not augmented with any default filters.
651 652
652 For more details see chapter :ref:`filters`. 653 See also chapter :ref:`filters`.
653 654
654 For older Sphinx versions your mileage may vary. 655 For older Sphinx versions your mileage may vary.
655 656
656 657
657 Some Examples 658 Some Examples