From 5b6fd5c4aa9aeebd3f6121f64c3c1b581a3e414c Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Sat, 27 Apr 2024 10:38:15 +0200 Subject: [PATCH] Added information about highlighting python console examples in doc. --- docs/internals/contributing/writing-documentation.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/internals/contributing/writing-documentation.txt b/docs/internals/contributing/writing-documentation.txt index 763039e61a870..4855ca5b7328c 100644 --- a/docs/internals/contributing/writing-documentation.txt +++ b/docs/internals/contributing/writing-documentation.txt @@ -301,6 +301,10 @@ documentation: syntax, it won't be highlighted. Adding ``.. code-block:: python``, for example, will force highlighting despite invalid syntax. +* Use ``.. code-block:: pycon`` to highlight code blocks that show examples of + an interactive Python console session, and make sure to include the ``>>> `` + line prefixes in that case. + * To improve readability, use ``.. admonition:: Descriptive title`` rather than ``.. note::``. Use these boxes sparingly.