fix: quote values with '#' in sample aider.conf.yml config

This commit is contained in:
Paul Gauthier (aider) 2025-04-07 08:09:33 +12:00
parent 26d736551d
commit 0da586154d

View file

@ -143,7 +143,10 @@ class YamlHelpFormatter(argparse.HelpFormatter):
default = "true"
if default:
parts.append(f"#{switch}: {default}\n")
if "#" in default:
parts.append(f'#{switch}: "{default}"\n')
else:
parts.append(f"#{switch}: {default}\n")
elif action.nargs in ("*", "+") or isinstance(action, argparse._AppendAction):
parts.append(f"#{switch}: xxx")
parts.append("## Specify multiple values like this:")