cmd/d2: Avoid duplicate newlines in help output
This commit is contained in:
parent
6128f1102f
commit
c3f155a67f
1 changed files with 4 additions and 2 deletions
|
|
@ -85,10 +85,12 @@ func longLayoutHelp(ctx context.Context, ms *xmain.State) error {
|
|||
return err
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(pluginInfo.LongHelp, "\n") {
|
||||
pluginInfo.LongHelp += "\n"
|
||||
}
|
||||
fmt.Fprintf(ms.Stdout, `%s (%s):
|
||||
|
||||
%s
|
||||
`, pluginInfo.Name, pluginLocation, pluginInfo.LongHelp)
|
||||
%s`, pluginInfo.Name, pluginLocation, pluginInfo.LongHelp)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue