Replace 'code' directives with 'code-block' directives.

The `code` directive highlights all sources as GDScript. Other languages are
highlighted incorrectly at the moment, even if `.. code:: [language]` is
specified.

It does, however, work with the `code-block` directive. The reason seems to be
that this directive is Sphinx specific.
This commit is contained in:
asynts
2020-01-12 20:08:42 +01:00
parent 3dede275f4
commit 53f878bdaf
14 changed files with 84 additions and 85 deletions

View File

@@ -149,7 +149,7 @@ ones, the following rules should be followed:
Example:
.. code:: cpp
.. code-block:: cpp
/*************************************************************************/
/* my_new_file.h */
@@ -194,7 +194,7 @@ Example:
#endif // MY_NEW_FILE_H
.. code:: cpp
.. code-block:: cpp
/*************************************************************************/
/* my_new_file.cpp */

View File

@@ -182,7 +182,7 @@ Write in a clear and simple language. Always follow the :ref:`writing guidelines
Here's how a class looks like in XML:
.. code:: xml
.. code-block:: xml
<class name="Node2D" inherits="CanvasItem" category="Core">
<brief_description>
@@ -255,7 +255,7 @@ Godot's class reference supports BBcode-like tags. They add nice formatting to t
Use ``[codeblock]`` for pre-formatted code blocks. Inside ``[codeblock]``, always use **four spaces** for indentation (the parser will delete tabs). Example:
.. code:: xml
.. code-block:: xml
[codeblock]
func _ready():