Commit bd93d90a authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

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.
parent ea69c84b
...@@ -167,7 +167,7 @@ def format_text(text): ...@@ -167,7 +167,7 @@ def format_text(text):
else: else:
text = re.sub(r'\*', r'\*', text) text = re.sub(r'\*', r'\*', text)
# markup option reference # 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) r'\1:option:`\2`', text)
# sphinx does not like markup like ':option:`-f`='. We need # sphinx does not like markup like ':option:`-f`='. We need
# backslash between ` and =. # backslash between ` and =.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment