summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/base/classes.xml24
-rw-r--r--doc/tools/makerst.py25
2 files changed, 32 insertions, 17 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index fa93d7ece7..3c8da424a5 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -4737,7 +4737,13 @@
<argument index="0" name="value" type="var">
</argument>
<description>
- Return true if the array contains given value. [code][ "inside", 7 ].has("inside") == true, [ "inside", 7 ].has("outside") == false, [ "inside", 7 ].has(7) == true, [ "inside", 7 ].has("7") == false[/code]
+ Return true if the array contains given value.
+ [codeblock]
+ [ "inside", 7 ].has("inside") == true
+ [ "inside", 7 ].has("outside") == false
+ [ "inside", 7 ].has(7) == true
+ [ "inside", 7 ].has("7") == false
+ [/codeblock]
</description>
</method>
<method name="hash">
@@ -11470,7 +11476,7 @@
<return type="Vector2">
</return>
<description>
- Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by [method get_minimum_size][/b]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
+ Returns the size of the Control, computed from all margins, however the size returned will [b]never be smaller than the minimum size reported by[/b] [method get_minimum_size]. This means that even if end position of the Control rectangle is smaller than the begin position, the Control will still display and interact correctly. (see description, [method get_minimum_size], [method set_margin], [method set_anchor]).
</description>
</method>
<method name="get_stretch_ratio" qualifiers="const">
@@ -28651,7 +28657,7 @@
UDP packet peer.
</brief_description>
<description>
- UDP packet peer. Can be used to send raw UDP packets as well as [Variant]s.
+ UDP packet peer. Can be used to send raw UDP packets as well as [Variant]\ s.
</description>
<methods>
<method name="close">
@@ -30577,7 +30583,7 @@
collider_id: Id of the object the point is in.
collider: Object the point is inside of.
rid: [RID] of the object the point is in.
- Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
</description>
</method>
<method name="intersect_ray">
@@ -30603,7 +30609,7 @@
collider: Object against which the ray was stopped.
rid: [RID] of the object against which the ray was stopped.
If the ray did not intersect anything, then an empty dictionary (dir.empty()==true) is returned instead.
- Additionally, the method can take an array of objects or [RID]s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
+ Additionally, the method can take an array of objects or [RID]\ s that are to be excluded from collisions, a bitmask representing the physics layers to check in, and another bitmask for the types of objects to check (see TYPE_MASK_* constants).
</description>
</method>
<method name="intersect_shape">
@@ -31694,7 +31700,7 @@
<return type="Array">
</return>
<description>
- Return the list of objects, or object [RID]s, that will be excluded from collisions.
+ Return the list of objects, or object [RID]\ s, that will be excluded from collisions.
</description>
</method>
<method name="get_margin" qualifiers="const">
@@ -31743,7 +31749,7 @@
<argument index="0" name="exclude" type="Array">
</argument>
<description>
- Set the list of objects, or object [RID]s, that will be excluded from collisions.
+ Set the list of objects, or object [RID]\ s, that will be excluded from collisions.
</description>
</method>
<method name="set_margin">
@@ -46288,7 +46294,7 @@
A unit of execution in a process.
</brief_description>
<description>
- A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
+ A unit of execution in a process. Can run methods on [Object]\ s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects.
</description>
<methods>
<method name="get_id" qualifiers="const">
@@ -50713,7 +50719,7 @@ do_property].
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
- Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport.
+ Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport.
</description>
</method>
<method name="set_clear_on_new_frame">
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 8a117f6450..696e3c9c78 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -172,6 +172,7 @@ def rstize_text(text, cclass):
pos += 1
# Handle [tags]
+ inside_code = False
pos = 0
while True:
pos = text.find('[', pos)
@@ -191,7 +192,18 @@ def rstize_text(text, cclass):
else: # command
cmd = tag_text
space_pos = tag_text.find(' ')
- if cmd.find('html') == 0:
+ if cmd == '/codeblock':
+ tag_text = ''
+ inside_code = False
+ # Strip newline if the tag was alone on one
+ if pre_text[-1] == '\n':
+ pre_text = pre_text[:-1]
+ elif cmd == '/code':
+ tag_text = '``'
+ inside_code = False
+ elif inside_code:
+ tag_text = '[' + tag_text + ']'
+ elif cmd.find('html') == 0:
cmd = tag_text[:space_pos]
param = tag_text[space_pos + 1:]
tag_text = param
@@ -216,11 +228,7 @@ def rstize_text(text, cclass):
tag_text = ''
elif cmd == 'codeblock':
tag_text = '\n::\n'
- elif cmd == '/codeblock':
- tag_text = ''
- # Strip newline if the tag was alone on one
- if pre_text[-1] == '\n':
- pre_text = pre_text[:-1]
+ inside_code = True
elif cmd == 'br':
# Make a new paragraph instead of a linebreak, rst is not so linebreak friendly
tag_text = '\n\n'
@@ -233,10 +241,11 @@ def rstize_text(text, cclass):
tag_text = '**'
elif cmd == 'u' or cmd == '/u':
tag_text = ''
- elif cmd == 'code' or cmd == '/code':
+ elif cmd == 'code':
tag_text = '``'
+ inside_code = True
else:
- tag_text = ':ref:`' + tag_text + '<class_' + tag_text.lower() + '>`'
+ tag_text = make_type(tag_text)
text = pre_text + tag_text + post_text
pos = len(pre_text) + len(tag_text)