Skip to content

Commit

Permalink
julefmt: fix comment formatting of structure fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed May 8, 2024
1 parent 7c58569 commit c837f12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,10 @@ impl exprFormatter {
if newline {
self.write(",")
if diff < 2 || lit.Exprs[i+1].Token.Row != self.fmt.row {
self.fmt.popRowCommentsByC(self.fmt.row, -1)
self.fmt.popRowCommentsByF(self.fmt.row, -1, fn(c: &comment) {
self.write(" ")
self.fmt.writeComment(c)
})
}
self.write("\n")
} else if diff > 1 {
Expand Down

0 comments on commit c837f12

Please sign in to comment.