mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
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:
@@ -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 */
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user