Skip to content

Commit aeff8a9

Browse files
author
Miguel Molina
committed
remove empty lines at the start and the end of a block
1 parent e9cc0ec commit aeff8a9

File tree

2 files changed

+4
-131
lines changed

2 files changed

+4
-131
lines changed

generator/template.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,10 @@ func prettyfy(input []byte, wr io.Writer) error {
464464
return err
465465
}
466466

467-
_, err = wr.Write(output)
467+
out := strings.Replace(string(output), "{\n\n", "{\n", -1)
468+
out = strings.Replace(out, "\n\n}", "\n}", -1)
469+
470+
_, err = wr.Write([]byte(out))
468471
return err
469472
}
470473

0 commit comments

Comments
 (0)