Skip to content

Commit

Permalink
Fix doc generation for Gui Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianJacta committed Sep 4, 2024
1 parent 31ddeba commit eeb632a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/_setup_generation/step_viselements.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,17 @@ def __init__(self, [arguments]) -> None:
arguments_doc += doc[1]
# Process short doc
short_doc = desc["short_doc"]
# Link to element doc page
element_md_location = (
"corelements" if desc["prefix"] == "core_" else "generic"
)
if m := re.search(r"(\[`(\w+)`\]\()\2\.md\)", short_doc):
short_doc = (
short_doc[: m.start()]
+ f"{m[1]}../../refmans/gui/viselements/{m[2]}.md)"
+ f"{m[1]}../../refmans/gui/viselements/{element_md_location}/{m[2]}.md)"
+ short_doc[m.end() :]
)
# Link to element doc page
element_md_location = (
"corelements" if desc["prefix"] == "core_" else "generic"
)

element_md_page = f"[`{element_type}`](../../refmans/gui/viselements/{element_md_location}/{element_type}.md)"
buffer.write(
template.replace("[element_type]", element_type)
Expand Down

0 comments on commit eeb632a

Please sign in to comment.