changeset 145:c4f6f5e771b0

Also define the :algpseudocode: role globally in the package documentation. More external links.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 07 May 2026 12:30:25 +0200
parents b616f9645e37
children ca5b31a30cea
files README.rst docs/conf.py docs/details-algpseudocode.rst docs/details-frpseudocode.rst
diffstat 4 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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`_.
--- 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/
 """
 
 
--- 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 <https://www.python.org>`_.
+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
--- 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.