Don't treat text as option if it matches -[0-9]
-[0-9] is valid option, but we don't use them so far and don't want to mark integer -1 as option.
This commit is contained in:
parent
ea69c84b33
commit
bd93d90a89
|
@ -167,7 +167,7 @@ def format_text(text):
|
|||
else:
|
||||
text = re.sub(r'\*', r'\*', text)
|
||||
# markup option reference
|
||||
text = re.sub(r'(^|\s)(-[a-zA-Z0-9]|--[a-zA-Z0-9-]+)',
|
||||
text = re.sub(r'(^|\s)(-[a-zA-Z]|--[a-zA-Z0-9-]+)',
|
||||
r'\1:option:`\2`', text)
|
||||
# sphinx does not like markup like ':option:`-f`='. We need
|
||||
# backslash between ` and =.
|
||||
|
|
Loading…
Reference in New Issue