Skip to content

Commit c2f2766

Browse files
authored
fix: options formatter for manpages (#50)
The "options" formatter for the manpage generation did not output any option, as the loop used a wrong key in the parser_info dictionary (likely a typo). This patch fixes this, which results in correctly printed parser options in manpage mode.
1 parent 699de12 commit c2f2766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinxarg/ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def _construct_manpage_specific_structure(self, parser_info):
326326
options_section += nodes.subtitle(text='Positional arguments:')
327327
options_section += self._format_positional_arguments(parser_info)
328328
for action_group in parser_info['action_groups']:
329-
if 'options' in parser_info:
329+
if 'options' in action_group:
330330
options_section += nodes.paragraph()
331331
options_section += nodes.subtitle(text=action_group['title'])
332332
options_section += self._format_optional_arguments(action_group)

0 commit comments

Comments
 (0)