mirror of https://github.com/k3s-io/k3s
Merge pull request #72137 from YoubingLi/master
Issue 71769: Correctly display '_' in the help messagepull/564/head
commit
bad9f6341a
|
@ -46,9 +46,11 @@ func (r *ASCIIRenderer) NormalText(out *bytes.Buffer, text []byte) {
|
|||
lines := strings.Split(raw, linebreak)
|
||||
for _, line := range lines {
|
||||
trimmed := strings.Trim(line, " \n\t")
|
||||
out.WriteString(trimmed)
|
||||
if len(trimmed) > 0 && trimmed[0] != '_' {
|
||||
out.WriteString(" ")
|
||||
}
|
||||
out.WriteString(trimmed)
|
||||
}
|
||||
}
|
||||
|
||||
// List renders the start and end of a list.
|
||||
|
|
|
@ -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