From b3b97d1a465d25ec7008c3e1f8a926aaba8594e1 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 8 Apr 2023 11:30:41 -0700 Subject: [PATCH 1/2] fix watch mode --- d2cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2cli/main.go b/d2cli/main.go index 289f242db..395a162f1 100644 --- a/d2cli/main.go +++ b/d2cli/main.go @@ -373,7 +373,7 @@ func compile(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, rende } var out []byte if len(boards) > 0 { - out := boards[0] + out = boards[0] if animateInterval > 0 { out, err = d2animate.Wrap(diagram, boards, renderOpts, int(animateInterval)) if err != nil { From 343b9daaca3645bdc22cb54fe2ca894f3e733776 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sat, 8 Apr 2023 11:35:54 -0700 Subject: [PATCH 2/2] add space --- d2graph/d2graph.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 6d7e845af..ac0e5b1b8 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -385,7 +385,7 @@ func (s *Style) Apply(key, value string) error { break } if !go2.Contains(textTransforms, strings.ToLower(value)) { - return fmt.Errorf(`expected "text-transform" to be one of (%s)`, strings.Join(textTransforms, ",")) + return fmt.Errorf(`expected "text-transform" to be one of (%s)`, strings.Join(textTransforms, ", ")) } s.TextTransform.Value = value default: