prettify :option:--xyz> better

This commit is contained in:
Kovid Goyal
2022-11-14 10:21:08 +05:30
parent 29bde6c72c
commit 59b43ee844

View File

@@ -138,7 +138,7 @@ func (self *Context) Prettify(text string) string {
idx = strings.Index(val, "-") idx = strings.Index(val, "-")
} }
if idx > -1 { if idx > -1 {
val = val[idx:] val = strings.TrimSuffix(val[idx:], ">")
} }
return self.Bold(val) return self.Bold(val)
case "opt": case "opt":