Merge pull request #2411 from alixander/fix-suspension-fmt

Fix suspend value handling in format.go by adding Suspension case
This commit is contained in:
Alexander Wang 2025-03-05 17:33:34 -08:00 committed by GitHub
commit 32c14d586c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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: