From 0f11b322b3448b213059de6927a94ce5aab6915e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 7 Feb 2016 18:30:12 +0100 Subject: [PATCH] Improve parsing of [method ...] tags Also improve some code display. --- doc/base/classes.xml | 42 +++++++++++++++++------------------------- doc/tools/makerst.py | 4 ++-- 2 files changed, 19 insertions(+), 27 deletions(-) diff --git a/doc/base/classes.xml b/doc/base/classes.xml index c59ed36c7d8..efe3ca4ecee 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -1780,7 +1780,7 @@ - Return the intersection between two [AABB]s. An empty AABB (size 0,0,0) is returned on failure. + Return the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure. @@ -2102,7 +2102,7 @@ An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. - Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. + Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. @@ -5925,7 +5925,7 @@ - Return true of this is the current camera (see [method Camera2D.make_current]). + Return true of this is the current camera (see [method make_current]). @@ -7339,7 +7339,7 @@ Set the array of points forming the polygon. - When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode[/code]=0), or a list of lines (for [code]build_mode[/code]=1). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point. + When editing the point list via the editor, depending on [method get_build_mode], it has to be a list of points (for [code]build_mode==0[/code]), or a list of lines (for [code]build_mode==1[/code]). In the second case, the even elements of the array define the start point of the line, and the odd elements the end point. @@ -7353,14 +7353,14 @@ - Set whether the polygon is to be a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1). + Set whether the polygon is to be a [ConvexPolygon2D] ([code]build_mode==0[/code]), or a [ConcavePolygon2D] ([code]build_mode==1[/code]). - Return whether the polygon is a [ConvexPolygon2D] ([code]build_mode[/code]=0), or a [ConcavePolygon2D] ([code]build_mode[/code]=1). + Return whether the polygon is a [ConvexPolygon2D] ([code]build_mode==0[/code]), or a [ConcavePolygon2D] ([code]build_mode==1[/code]). @@ -12909,19 +12909,13 @@ verify_host will check the SSL identity of the host if set to true. - Sends a request to the connected host. The url is the what is normally behind the hostname, i.e: -http://somehost.com/index.php -url would be "index.php" - -Headers are HTTP request headers - -To create a POST request with query strings to push to the server, do: -var fields = {"username" : "user", - "password" : "pass"} -var queryString = httpClient.query_string_from_dict(fields) -var headers = ["Content-Type: application/x-www-form-urlencoded", - "Content-Length: " + str(queryString.length())] -var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) + Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php". + Headers are HTTP request headers. + To create a POST request with query strings to push to the server, do:: + var fields = {"username" : "user", "password" : "pass"} + var queryString = httpClient.query_string_from_dict(fields) + var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(queryString.length())] + var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, queryString) @@ -13028,12 +13022,10 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu - Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary. - -var fields = {"username": "user", "password": "pass"} -String queryString = httpClient.query_string_from_dict(fields) - -returns:= "username=user&password=pass" + Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.:: + var fields = {"username": "user", "password": "pass"} + String queryString = httpClient.query_string_from_dict(fields) + returns:= "username=user&password=pass" diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index a31b7134f13..1e2d276fb34 100644 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -166,9 +166,9 @@ def rstize_text(text,cclass): if param.find('.') != -1: (class_param, method_param) = param.split('.') - tag_text = ':ref:`'+class_param+'.'+method_param+'<' + class_param.lower() + '_' + method_param + '>`' + tag_text = ':ref:`'+class_param+'.'+method_param+'`' else: - tag_text = ':ref:`' + param + '<' + cclass +"_"+ param + '>`' + tag_text = ':ref:`' + param + '`' elif cmd.find('image=') == 0: tag_text = "" #'![](' + cmd[6:] + ')' elif cmd.find('url=') == 0: