Skip to content

Commit

Permalink
fix: formatting was eating the space in pair after the ,
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Apr 29, 2024
1 parent c9bc54b commit 04f87d5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/aiken-lang/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -984,9 +984,10 @@ impl<'comments> Formatter<'comments> {
.to_doc()
.append("(")
.append(self.expr(fst, false))
.append(",")
.append(break_(",", ", "))
.append(self.expr(snd, false))
.append(")"),
.append(")")
.group(),

UntypedExpr::TupleIndex { index, tuple, .. } => {
let suffix = Ordinal(*index + 1).suffix().to_doc();
Expand Down Expand Up @@ -1791,9 +1792,10 @@ impl<'comments> Formatter<'comments> {
.to_doc()
.append("(")
.append(self.pattern(fst))
.append(",")
.append(break_(",", ", "))
.append(self.pattern(snd))
.append(")"),
.append(")")
.group(),

Pattern::List { elements, tail, .. } => {
let elements_document =
Expand Down

0 comments on commit 04f87d5

Please sign in to comment.