Skip to content

Commit

Permalink
doc: Generate link for sub commands
Browse files Browse the repository at this point in the history
  • Loading branch information
olethanh committed Oct 23, 2024
1 parent 4a0f2a8 commit 1865179
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/gendoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ def get_docs_for_click(
for command in commands:
command_obj = group.get_command(ctx, command)
assert command_obj
docs += f"* `{command_obj.name}`"
anchor_name = f"{command_name.replace(' ', '-')}-{command_obj.name}"
docs += f"* [`{command_obj.name}`](#{anchor_name})"
command_help = command_obj.get_short_help_str(limit=1000)
if command_help:
docs += f": {command_help}"
Expand Down

0 comments on commit 1865179

Please sign in to comment.