docs: automatically remove ending punctuation from first line of backend option help string when used for flag usage

See #5538
This commit is contained in:
albertony 2021-08-16 14:50:03 +02:00
parent 8b65c55711
commit 9a17b32b5d
4 changed files with 10 additions and 4 deletions

View file

@ -523,7 +523,7 @@ func AddBackendFlags() {
if nl := strings.IndexRune(help, '\n'); nl >= 0 {
help = help[:nl]
}
help = strings.TrimSpace(help)
help = strings.TrimRight(strings.TrimSpace(help), ".!?")
if opt.IsPassword {
help += " (obscured)"
}