diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 54c658a21..bedfcdb51 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -574,6 +574,7 @@ func (obj *Object) newObject(id string) *Object { func (obj *Object) HasChild(ids []string) (*Object, bool) { if len(ids) == 0 { + println("\033[1;31m--- DEBUG:", "=======================", "\033[m") return obj, true } if len(ids) == 1 && ids[0] != "style" { diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 697526413..47f215a76 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -3526,6 +3526,29 @@ func TestDelete(t *testing.T) { key: `x`, exp: `x.y.z -> y.b +`, + }, + { + name: "duplicate_generated", + + text: `x +x 2 +x 3: { + x 3 + x 4 +} +x 4 +y +`, + key: `x 3`, + exp: `x +x 2 + +x 3 +x 5 + +x 4 +y `, }, {