Improve rendering of :option: in cli docs

This commit is contained in:
Kovid Goyal 2020-03-24 22:03:00 +05:30
parent aa3be0535f
commit 4e58062025
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -96,7 +96,9 @@ def opt(text: str) -> str:
def option(x: str) -> str:
idx = x.find('-')
idx = x.rfind('--')
if idx < 0:
idx = x.find('-')
if idx > -1:
x = x[idx:]
parts = map(bold, x.split())