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

Removed unnecessary code-block directives in various docs. #12234

Merged
merged 1 commit into from Dec 23, 2019
Merged

Removed unnecessary code-block directives in various docs. #12234

merged 1 commit into from Dec 23, 2019

Conversation

jdufresne
Copy link
Member

Better follows internal "Writing documentation".

https://docs.djangoproject.com/en/3.0/internals/contributing/writing-documentation/#guidelines-for-restructuredtext-files

Add .. code-block:: <lang> to literal blocks so that they get
highlighted. Prefer relying on automatic highlighting using :: (two
colons). This has the benefit that if the code contains some invalid
syntax, it won’t be highlighted. Adding .. code-block:: python, for
example, will force highlighting despite invalid syntax.

Better follows internal "Writing documentation".

https://docs.djangoproject.com/en/3.0/internals/contributing/writing-documentation/#guidelines-for-restructuredtext-files

> Add `.. code-block:: <lang>` to literal blocks so that they get
> highlighted. Prefer relying on automatic highlighting using :: (two
> colons). This has the benefit that if the code contains some invalid
> syntax, it won’t be highlighted. Adding `.. code-block:: python`, for
> example, will force highlighting despite invalid syntax.
@felixxm felixxm changed the title Removed unnecessary 'code-block:: python' in docs. Removed unnecessary code-block directives in various docs. Dec 23, 2019
@felixxm felixxm merged commit 5e00bd1 into django:master Dec 23, 2019
@felixxm
Copy link
Member

felixxm commented Dec 23, 2019

@jdufresne Thanks 👍

@jdufresne jdufresne deleted the code-block branch March 21, 2020 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants