Skip to content

Commit

Permalink
Merge pull request #2411 from alixander/fix-suspension-fmt
Browse files Browse the repository at this point in the history
Fix suspend value handling in format.go by adding Suspension case
  • Loading branch information
alixander authored Mar 6, 2025
2 parents 95c7182 + 9add2e1 commit 32c14d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions d2format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func (p *printer) node(n d2ast.Node) {
p.blockComment(n)
case *d2ast.Null:
p.sb.WriteString("null")
case *d2ast.Suspension:
if n.Value {
p.sb.WriteString("suspend")
} else {
p.sb.WriteString("unsuspend")
}
case *d2ast.Boolean:
p.sb.WriteString(strconv.FormatBool(n.Value))
case *d2ast.Number:
Expand Down

0 comments on commit 32c14d5

Please sign in to comment.