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-10-20 22:56:19 +02:00
parent 8b65c55711
commit 9a17b32b5d
4 changed files with 10 additions and 4 deletions
+1 -1
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)"
}