Consistent use of "rst" for syntax highlight

This commit is contained in:
Juan Luis Cano Rodríguez 2021-07-05 09:25:05 +02:00
parent 50bd1c3967
commit f303a4a9ed
2 changed files with 11 additions and 11 deletions

View File

@ -36,7 +36,7 @@ Setting up your project and development environment
In a new directory, create a file called ``README.rst`` with the following In a new directory, create a file called ``README.rst`` with the following
content. content.
.. code-block:: rest .. code-block:: rst
:caption: README.rst :caption: README.rst
Lumache Lumache
@ -159,7 +159,7 @@ is written in reStructuredText, a powerful markup language.
Modify the file as follows: Modify the file as follows:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/index.rst :caption: docs/source/index.rst
Welcome to Lumache's documentation! Welcome to Lumache's documentation!
@ -330,7 +330,7 @@ grows.
As an example, create a new file ``docs/source/usage.rst`` (next to As an example, create a new file ``docs/source/usage.rst`` (next to
``index.rst``) with these contents: ``index.rst``) with these contents:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/usage.rst :caption: docs/source/usage.rst
Usage Usage
@ -358,7 +358,7 @@ be a *subsection* of "Usage".
To complete the process, add a ``toctree`` :ref:`directive <rst-directives>` at To complete the process, add a ``toctree`` :ref:`directive <rst-directives>` at
the end of ``index.rst`` including the document you just created, as follows: the end of ``index.rst`` including the document you just created, as follows:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/index.rst :caption: docs/source/index.rst
Contents Contents
@ -397,7 +397,7 @@ them!
To add a cross-reference, write this sentence right after the To add a cross-reference, write this sentence right after the
introduction paragraph in ``index.rst``: introduction paragraph in ``index.rst``:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/index.rst :caption: docs/source/index.rst
Check out the :doc:`usage` section for further information. Check out the :doc:`usage` section for further information.
@ -412,7 +412,7 @@ explicit *label* that can act as a target.
For example, to reference the "Installation" subsection, add a label right For example, to reference the "Installation" subsection, add a label right
before the heading, as follows: before the heading, as follows:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/usage.rst :caption: docs/source/usage.rst
:emphasize-lines: 4 :emphasize-lines: 4
@ -428,7 +428,7 @@ before the heading, as follows:
And make the sentence you added in ``index.rst`` look like this: And make the sentence you added in ``index.rst`` look like this:
.. code-block:: rest .. code-block:: rst
:caption: docs/source/index.rst :caption: docs/source/index.rst
Check out the :doc:`usage` section for further information, including how to Check out the :doc:`usage` section for further information, including how to

View File

@ -74,14 +74,14 @@ multiple files to a single hierarchy of documents.
The ``toctree`` directive initially is empty, and looks like so: The ``toctree`` directive initially is empty, and looks like so:
.. code-block:: rest .. code-block:: rst
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
You add documents listing them in the *content* of the directive: You add documents listing them in the *content* of the directive:
.. code-block:: rest .. code-block:: rst
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
@ -172,7 +172,7 @@ The most prominent domain is the Python domain. For example, to document
Python's built-in function ``enumerate()``, you would add this to one of your Python's built-in function ``enumerate()``, you would add this to one of your
source files. source files.
.. code-block:: restructuredtext .. code-block:: rst
.. py:function:: enumerate(sequence[, start=0]) .. py:function:: enumerate(sequence[, start=0])
@ -193,7 +193,7 @@ given, each in its own line.
The Python domain also happens to be the default domain, so you don't need to The Python domain also happens to be the default domain, so you don't need to
prefix the markup with the domain name. prefix the markup with the domain name.
.. code-block:: restructuredtext .. code-block:: rst
.. function:: enumerate(sequence[, start=0]) .. function:: enumerate(sequence[, start=0])