Skip to content

Commit 2158e4c

Browse files
authored
Ensure that the tittle id is unique on the same page with different subcommand
1 parent 2a2a202 commit 2158e4c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sphinxarg/ext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ def print_action_groups(
113113
# Every action group is composed of a section, holding
114114
# a title, the description, and the option group (members)
115115
title_as_id = action_group['title'].replace(' ', '-').lower()
116+
if data['name']:
117+
title_as_id = f'{data["name"]}-{title_as_id}'
116118
if id_prefix:
117119
title_as_id = f'{id_prefix}-{title_as_id}'
118120
section = nodes.section(ids=[title_as_id])

0 commit comments

Comments
 (0)