Sfoglia il codice sorgente

Use literal blocks for code samples with GDScript.

GDScript is already the default, it's redundant to specify it explicitly.
A [literal block][1] is already enough.

  [1]: https://www.sphinx-doc.org/en/1.8/usage/restructuredtext/basics.html#rst-literal-blocks
asynts 5 anni fa
parent
commit
3dede275f4

+ 1 - 1
development/cpp/custom_godot_servers.rst

@@ -481,7 +481,7 @@ Summing it up
 
 Here is the GDScript sample code:
 
-.. code::
+::
 
     extends Node
 

+ 1 - 1
development/cpp/custom_resource_format_loaders.rst

@@ -265,7 +265,7 @@ Loading it on GDScript
       ]
     }
 
-.. code::
+::
 
     extends Node
 

+ 3 - 3
getting_started/scripting/cross_language_scripting.rst

@@ -75,7 +75,7 @@ Using C# from GDScript doesn't need much work. Once loaded
 (see :ref:`doc_gdscript_classes_as_resources`) the script can be instantiated
 with :ref:`new() <class_CSharpScript_method_new>`.
 
-.. code-block:: gdscript
+::
 
     var my_csharp_script = load("res://path_to_cs_file.cs")
     var my_csharp_node = my_csharp_script.new()
@@ -116,7 +116,7 @@ Accessing C# fields from GDScript
 Accessing C# fields from GDScript is straightforward, you shouldn't have
 anything to worry about.
 
-.. code-block:: gdscript
+::
 
     print(my_csharp_node.str1) # bar
     my_csharp_node.str1 = "BAR"
@@ -160,7 +160,7 @@ marshalling process will do its best to cast your the arguments to match
 function signatures.
 If that's impossible you'll see the following error: ``Invalid call. Nonexistent function `FunctionName```.
 
-.. code-block:: gdscript
+::
 
     my_csharp_node.PrintNodeName(self) # myGDScriptNode
     # my_csharp_node.PrintNodeName() # This line will fail.

+ 1 - 1
tutorials/plugins/android/android_plugin.rst

@@ -264,7 +264,7 @@ The module should include the full Java path. For our example: ``org/godotengine
 
 Then, from your script:
 
-.. code::
+::
 
     if Engine.has_singleton("MySingleton"):
         var singleton = Engine.get_singleton("MySingleton")