diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/HTTPClient.xml | 2 | ||||
-rw-r--r-- | doc/classes/Mutex.xml | 1 | ||||
-rw-r--r-- | doc/classes/SceneTree.xml | 6 | ||||
-rw-r--r-- | doc/classes/Semaphore.xml | 1 | ||||
-rw-r--r-- | doc/classes/Thread.xml | 1 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 5 |
6 files changed, 12 insertions, 4 deletions
diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index c91ddccaa4..1a2d5cab81 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -69,7 +69,7 @@ [codeblock] { "content-length": 12, - "Content-Type": "application/json; charset=UTF-8", + "Content-Type": "application/json; charset=UTF-8", } [/codeblock] </description> diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 793696321b..8a294425e6 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -7,6 +7,7 @@ A synchronization mutex (mutual exclusion). This is used to synchronize multiple [Thread]s, and is equivalent to a binary [Semaphore]. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> </tutorials> <methods> <method name="lock"> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index ed43f83f05..bd81a48ff5 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -69,9 +69,9 @@ Commonly used to create a one-shot delay timer as in the following example: [codeblock] func some_function(): - print("start") - yield(get_tree().create_timer(1.0), "timeout") - print("end") + print("start") + yield(get_tree().create_timer(1.0), "timeout") + print("end") [/codeblock] </description> </method> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index 7aee5c2951..74970be8b4 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -7,6 +7,7 @@ A synchronization semaphore which can be used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex]. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> </tutorials> <methods> <method name="post"> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 8f96ab0aed..25e40d4c1f 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -7,6 +7,7 @@ A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex] or [Semaphore] is advised if working with shared objects. </description> <tutorials> + <link>https://docs.godotengine.org/en/latest/tutorials/threads/using_multiple_threads.html</link> </tutorials> <methods> <method name="get_id" qualifiers="const"> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 8eddc35352..1b27e4a35a 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -608,8 +608,10 @@ def rstize_text(text, state): # type: (str, State) -> str break pre_text = text[:pos] + indent_level = 0 while text[pos + 1] == '\t': pos += 1 + indent_level += 1 post_text = text[pos + 1:] # Handle codeblocks @@ -633,6 +635,9 @@ def rstize_text(text, state): # type: (str, State) -> str while code_pos + to_skip + 1 < len(code_text) and code_text[code_pos + to_skip + 1] == '\t': to_skip += 1 + if to_skip > indent_level: + print_error("Four spaces should be used for indentation within [codeblock], file: {}".format(state.current_class), state) + if len(code_text[code_pos + to_skip + 1:]) == 0: code_text = code_text[:code_pos] + "\n" code_pos += 1 |