Skip to content

Commit

Permalink
julefmt: minor fix for structure literal formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed May 17, 2024
1 parent e30e7ce commit 90105c0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1683,9 +1683,11 @@ impl exprFormatter {
self.fmt.addIndent()
for (i, mut expr) in lit.Exprs {
let diff = len(lit.Exprs) - i
if newline && !self.ibc {
self.fmt.addGlobalPaddingForComment(expr.Token.Row)
self.fmt.writeCommentsExcept(expr.Token.Row)
if newline {
if !self.ibc {
self.fmt.addGlobalPaddingForComment(expr.Token.Row)
self.fmt.writeCommentsExcept(expr.Token.Row)
}
self.write(self.fmt.indent)
}
self.fmt.popRowCommentsByC(expr.Token.Row, expr.Token.Column)
Expand Down

0 comments on commit 90105c0

Please sign in to comment.