We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb452eb commit 9926affCopy full SHA for 9926aff
tldr.py
@@ -481,9 +481,9 @@ def emphasise_example(x: str) -> str:
481
# Extract long or short options from placeholders
482
if not (shortform and longform):
483
if shortform:
484
- line = re.sub(r'{{(-.)\|--[^|]+?}}', r'{{\1}}', line)
+ line = re.sub(r'{{(-[^|]+)\|--[^|]+?}}', r'{{\1}}', line)
485
elif longform:
486
- line = re.sub(r'{{-.\|(--[^|]+?)}}', r'{{\1}}', line)
+ line = re.sub(r'{{-[^|]+\|(--[^|]+?)}}', r'{{\1}}', line)
487
488
elements = [' ' * 2 * LEADING_SPACES_NUM]
489
for item in COMMAND_SPLIT_REGEX.split(line):
0 commit comments