From 3e702942790a18205df07033e78ab3b4734f2929 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 May 2017 17:34:51 +0530 Subject: [PATCH] ... --- manual/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/custom.py b/manual/custom.py index 737cdcb5c0..1e137d6dc2 100644 --- a/manual/custom.py +++ b/manual/custom.py @@ -196,7 +196,7 @@ def render_options(cmd, groups, options_header=True, add_program=True, header_le if desc: lines.extend([desc, '']) for opt in sorted(options, key=lambda x: x.get_opt_string()): - help = opt.help if opt.help else '' + help = opt.help or '' help = help.replace('\n', ' ').replace('*', '\\*').replace('%default', str(opt.default)) help = help.replace('"', r'\ ``"``\ ') help = help.replace("'", r"\ ``'``\ ") @@ -214,7 +214,7 @@ def mark_options(raw): opt = m.group() a, b = opt.partition('=')[::2] if a in ('--option1', '--option2'): - return m.group() + return '``' + m.group() + '``' a = ':option:`' + a + '`' b = (' = ``' + b + '``') if b else '' return a + b