Use program directives to namespace options

This commit is contained in:
Kovid Goyal
2018-05-30 15:32:50 +05:30
parent a3e4c74f5d
commit f8fa76d77e
4 changed files with 5 additions and 3 deletions

View File

@@ -416,7 +416,7 @@ def seq_as_rst(seq, usage, message, appname):
t = re.sub(r':$', '::', t, flags=re.MULTILINE)
t = t.replace('::\n\n\t ', '::\n \n ')
t = t.replace('\n\n\t ', '\n \n')
t = re.sub(r'(--[a-zA-Z0-9-]+)', r':option:`\1` ', t)
t = re.sub(r'(--[a-zA-Z0-9-]+)', r':option:`{} \1` '.format(appname), t)
t = re.sub('"(.+?)"', r'``\1``', t)
a(textwrap.indent(prettify_rst(t), ' ' * 4))
if defval is not None: