# HG changeset patch # User Franz Glasner # Date 1778149825 -7200 # Node ID c4f6f5e771b07c22f3c527f61998df30b53626a9 # Parent b616f9645e37473abb34a3c4405e209cc2d2ad38 Also define the :algpseudocode: role globally in the package documentation. More external links. diff -r b616f9645e37 -r c4f6f5e771b0 README.rst --- a/README.rst Thu May 07 12:21:53 2026 +0200 +++ b/README.rst Thu May 07 12:30:25 2026 +0200 @@ -4,7 +4,7 @@ README -- Pseudocode Lexer for Pygments ***************************************** -This package contains Pygments lexers for some basic pseudocode. +This package contains `Pygments`_ lexers for some basic pseudocode. Initially a fork of `pygments-lexer-pseudocode` it has been considerably changed and expanded. @@ -17,7 +17,7 @@ Installation ============ -The lexers are available as a Python wheel package:: +The lexers are available as a `Python`_ wheel package:: pip install pygments-lexer-pseudocode2 @@ -56,4 +56,4 @@ Some code snippets are licensed under the terms of the BSD 2-Clause "Simplified" License as they are taken from the Python -lexer that is included in Pygments. +lexer that is included in `Pygments`_. diff -r b616f9645e37 -r c4f6f5e771b0 docs/conf.py --- a/docs/conf.py Thu May 07 12:21:53 2026 +0200 +++ b/docs/conf.py Thu May 07 12:30:25 2026 +0200 @@ -50,8 +50,13 @@ highlight_language = "none" +rst_prolog = """ +.. role:: algpseudocode(code) +""" rst_epilog = """ +.. _Pygments: https://pygments.org/ .. _Sphinx: https://www.sphinx-doc.org +.. _Python: https://www.python.org/ """ diff -r b616f9645e37 -r c4f6f5e771b0 docs/details-algpseudocode.rst --- a/docs/details-algpseudocode.rst Thu May 07 12:21:53 2026 +0200 +++ b/docs/details-algpseudocode.rst Thu May 07 12:30:25 2026 +0200 @@ -5,10 +5,6 @@ AlgPseudocode *************** -.. role:: algpseudocode(code) - :language: algpseudocode - - Lexer Options ============= @@ -56,7 +52,7 @@ Literals ======== -Strings and numbers as in `Python `_. +Strings and numbers as in `Python`_. To yield non-string-delimiting single- and double-quotes you have to escape them using ``\'`` or ``\"``. This must be used to typeset something as diff -r b616f9645e37 -r c4f6f5e771b0 docs/details-frpseudocode.rst --- a/docs/details-frpseudocode.rst Thu May 07 12:21:53 2026 +0200 +++ b/docs/details-frpseudocode.rst Thu May 07 12:30:25 2026 +0200 @@ -14,7 +14,7 @@ and ``fr-algo`` - changed file extension to ``.fr-algo`` and ``.fr-pseudocode`` - changed some exististing arrows and added some more -- numbers parsing is more flexible by following the Python lexer +- numbers parsing is more flexible by following the `Python`_ lexer - also allow ``!=`` as inequality operator (in addition to ``<>``) It mostly just recognizes some (french) keywords and highlights them.