Skip to content

Commit

Permalink
julefmt: minor improvement for structure formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed May 5, 2024
1 parent 9623ee9 commit e2ec322
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,9 @@ impl formatter {
if d.Directives.len != 0 {
self.directives(d.Directives)
} else {
self.writeComments(d.Token.Row)
if d.Token.Row-self.writeComments(d.Token.Row) > 1 {
self.write("\n")
}
}
if d.CppLinked {
self.write("cpp ")
Expand Down

0 comments on commit e2ec322

Please sign in to comment.