Fix suspend value handling in format.go by adding Suspension case

This commit is contained in:
Alexander Wang 2025-03-05 17:25:24 -08:00
parent 95c7182f48
commit 9add2e14f4
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -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: