Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Python code-blocks with double colons #6958

Merged
merged 2 commits into from
Feb 25, 2023

Conversation

radarhere
Copy link
Member

#6754 has pointed out that sometimes we use .. code-block:: python and sometimes we use ::.

Because :: is rendered as a single colon, perhaps .. code-block:: python is used where we don't want to show a colon to the reader. This PR replaces .. code-block:: python with :: if it is already following a colon, making the documentation syntax consistent.

@hugovk
Copy link
Member

hugovk commented Feb 23, 2023

We can also use :: in other cases too, when there is no colon.

For example:

Some header
-----------

::

    a = 1

Some more text. ::

    a = 1

Renders as:

image

@radarhere radarhere changed the title If following colon, replace Python code-blocks with double colons Replace Python code-blocks with double colons Feb 23, 2023
@radarhere
Copy link
Member Author

Ok, I've replaced all instances of .. code-block:: python

@hugovk hugovk merged commit 7d8a08b into python-pillow:main Feb 25, 2023
@radarhere radarhere deleted the codeblock branch February 25, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants