From 6f920731d9335980d7d5ed0039c440a77b4e7d81 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Fri, 28 Feb 2025 15:23:55 -0700 Subject: [PATCH] change to unsuspend --- d2ast/d2ast.go | 2 +- d2parser/parse.go | 2 +- e2etests/txtar.txt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/d2ast/d2ast.go b/d2ast/d2ast.go index ca81d95f8..0d923d228 100644 --- a/d2ast/d2ast.go +++ b/d2ast/d2ast.go @@ -1585,7 +1585,7 @@ func RawString(s string, inKey bool) String { return &SingleQuotedString{Value: s} } } - } else if s == "null" || s == "suspend" || s == "restore" || strings.ContainsAny(s, UnquotedValueSpecials) { + } else if s == "null" || s == "suspend" || s == "unsuspend" || strings.ContainsAny(s, UnquotedValueSpecials) { if !strings.ContainsRune(s, '"') && !strings.ContainsRune(s, '$') { return FlatDoubleQuotedString(s) } diff --git a/d2parser/parse.go b/d2parser/parse.go index 2f38652ce..e9d57b0ec 100644 --- a/d2parser/parse.go +++ b/d2parser/parse.go @@ -1675,7 +1675,7 @@ func (p *parser) parseValue() d2ast.ValueBox { } return box } - if strings.EqualFold(s.ScalarString(), "restore") { + if strings.EqualFold(s.ScalarString(), "unsuspend") { box.Suspension = &d2ast.Suspension{ Range: s.Range, Value: false, diff --git a/e2etests/txtar.txt b/e2etests/txtar.txt index c1040bec6..c4be32876 100644 --- a/e2etests/txtar.txt +++ b/e2etests/txtar.txt @@ -798,10 +798,10 @@ softwareSystem -> externalSystem (** -> **)[*]: suspend # Include all top-level objects -*: restore +*: unsuspend # Include all objects with a certain class -**: restore { +**: unsuspend { &class: ok } # Include all connections/objects connected to an object -(** -> externalSystem)[*]: restore +(** -> externalSystem)[*]: unsuspend