mirror of https://github.com/k3s-io/k3s
Issue 71769: Correctly display '_' in the help message
parent
698db70879
commit
373c42d1c5
|
@ -46,8 +46,10 @@ func (r *ASCIIRenderer) NormalText(out *bytes.Buffer, text []byte) {
|
|||
lines := strings.Split(raw, linebreak)
|
||||
for _, line := range lines {
|
||||
trimmed := strings.Trim(line, " \n\t")
|
||||
if len(trimmed) > 0 && trimmed[0] != '_' {
|
||||
out.WriteString(" ")
|
||||
}
|
||||
out.WriteString(trimmed)
|
||||
out.WriteString(" ")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ type normalizer struct {
|
|||
|
||||
func (s normalizer) markdown() normalizer {
|
||||
bytes := []byte(s.string)
|
||||
formatted := blackfriday.Markdown(bytes, &ASCIIRenderer{Indentation: Indentation}, 0)
|
||||
formatted := blackfriday.Markdown(bytes, &ASCIIRenderer{Indentation: Indentation}, blackfriday.EXTENSION_NO_INTRA_EMPHASIS)
|
||||
s.string = string(formatted)
|
||||
return s
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue