summaryrefslogtreecommitdiffstats
path: root/doc/tools/make_rst.py
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-11-18 17:39:17 +0100
committerGitHub <noreply@github.com>2021-11-18 17:39:17 +0100
commit4a4b363da1f0b2d870ea4d8893379d73d099e4bc (patch)
tree46ad751301590f63d801405c6bdc9966aee08d59 /doc/tools/make_rst.py
parent3f9c24a8d7d6fcc958744f33e7bb1b8b60440e19 (diff)
parent6f929395d961fed8ce44848d69fdd32fd029ec9c (diff)
downloadredot-engine-4a4b363da1f0b2d870ea4d8893379d73d099e4bc.tar.gz
Merge pull request #55092 from KoBeWi/thelp_item
Add [theme_item] tag to editor help
Diffstat (limited to 'doc/tools/make_rst.py')
-rwxr-xr-xdoc/tools/make_rst.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 5d3167a773..0d88ce4998 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -328,7 +328,7 @@ class State:
theme_item.text,
default_value,
)
- class_def.theme_items[theme_item_id] = theme_item_def
+ class_def.theme_items[theme_item_name] = theme_item_def
tutorials = class_root.find("tutorials")
if tutorials is not None:
@@ -905,6 +905,7 @@ def rstize_text(text, state): # type: (str, State) -> str
or cmd.startswith("member")
or cmd.startswith("signal")
or cmd.startswith("constant")
+ or cmd.startswith("theme_item")
):
param = tag_text[space_pos + 1 :]
@@ -941,6 +942,13 @@ def rstize_text(text, state): # type: (str, State) -> str
print_error("Unresolved member '{}', file: {}".format(param, state.current_class), state)
ref_type = "_property"
+ elif cmd.startswith("theme_item"):
+ if method_param not in class_def.theme_items:
+ print_error(
+ "Unresolved theme item '{}', file: {}".format(param, state.current_class), state
+ )
+ ref_type = "_theme_item"
+
elif cmd.startswith("signal"):
if method_param not in class_def.signals:
print_error("Unresolved signal '{}', file: {}".format(param, state.current_class), state)