Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit 801d958

Browse files
committed
Fix the bug where the dot formatter links identical leaf nodes
1 parent 29578ea commit 801d958

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

formatter/dot.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,16 @@ func flatten(in interface{}, path string, current_path string) ([]node, []link)
145145
os.Exit(1)
146146
}
147147

148+
target := current_path + "=content"
149+
150+
nodes = append(nodes, node{
151+
name: target,
152+
label: fmt.Sprint(in),
153+
})
154+
148155
links = append(links, link{
149156
left: current_path,
150-
right: fmt.Sprint(in),
157+
right: target,
151158
})
152159

153160
return nodes, links

0 commit comments

Comments
 (0)