Skip to content

Commit

Permalink
Minor update to gen.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshaw committed Dec 22, 2024
1 parent 9aebd86 commit ee784b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _examples/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ func (cmd *command) parse(ctx context.Context) error {
}
logger(" aliases: %v", cmd.aliases)
case sectExample:
cmd.example = strings.TrimLeft(trimRight(s), "\n")
if strings.HasPrefix(s, "\n\n") {
s = strings.TrimPrefix(s, "\n")
}
cmd.example = trimRight(s)
case sectFooter:
cmd.footer += strings.TrimLeft(trimRight(s), "\n")
case sectFlags:
Expand Down

0 comments on commit ee784b9

Please sign in to comment.