From 6240bb7dbc9b73240a59d90c3f816a2b97cfe68a Mon Sep 17 00:00:00 2001 From: Hippolyte HENRY Date: Thu, 22 Apr 2021 17:13:35 +0200 Subject: [PATCH] Fix title and reference links of nested blocks/attributes --- schemamd/render.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schemamd/render.go b/schemamd/render.go index 0bd0dc91..6da68288 100644 --- a/schemamd/render.go +++ b/schemamd/render.go @@ -192,7 +192,9 @@ func writeBlockChildren(w io.Writer, parents []string, block *tfjson.SchemaBlock } for _, name := range sortedNames { - path := append(parents, name) + path := make([]string, len(parents), len(parents)+1) + copy(path, parents) + path = append(path, name) if block, ok := block.NestedBlocks[name]; ok { nt, err := writeBlockType(w, path, block)