From 938d601fbc9fa0a13f6f84753f60d61117d9a448 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Fri, 22 Sep 2023 14:52:16 -0700 Subject: [PATCH] add format test --- d2format/format_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/d2format/format_test.go b/d2format/format_test.go index 889b01537..c6dd79296 100644 --- a/d2format/format_test.go +++ b/d2format/format_test.go @@ -810,6 +810,25 @@ steps: { step-1-content } } +`, + }, + { + name: "substitution_mid_string", + in: `vars: { + test: hello +} + +mybox: { + label: prefix${test}suffix +} +`, + exp: `vars: { + test: hello +} + +mybox: { + label: prefix${test}suffix +} `, }, }