pr feedback
This commit is contained in:
parent
d8b1e65386
commit
81ce1f8209
4 changed files with 3 additions and 12 deletions
|
|
@ -781,9 +781,8 @@ func hasBoard(root *d2graph.Graph, ida []string) bool {
|
|||
return hasBoard(b, ida[i+1:])
|
||||
}
|
||||
}
|
||||
default:
|
||||
break
|
||||
}
|
||||
break
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -409,11 +409,3 @@ func KeyPath(kp *d2ast.KeyPath) (ida []string) {
|
|||
}
|
||||
return ida
|
||||
}
|
||||
|
||||
func IDA(ida []string) *d2ast.KeyPath {
|
||||
kp := &d2ast.KeyPath{}
|
||||
for _, s := range ida {
|
||||
kp.Path = append(kp.Path, d2ast.MakeValueBox(d2ast.RawString(s, true)).StringBox())
|
||||
}
|
||||
return kp
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ func (c *compiler) compileLink(refctx *RefContext) {
|
|||
|
||||
// Create the absolute path by appending scope path with value specified
|
||||
scopeIDA = append(scopeIDA, linkIDA...)
|
||||
kp := d2format.IDA(scopeIDA)
|
||||
kp := d2ast.MakeKeyPath(scopeIDA)
|
||||
refctx.Key.Value = d2ast.MakeValueBox(d2ast.RawString(d2format.Format(kp), true))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,7 @@ func BoardIDA(n Node) (ida []string) {
|
|||
}
|
||||
}
|
||||
|
||||
// IDA returns the absolute path to n from the nearest board root.
|
||||
// IDA returns the absolute path to n.
|
||||
func IDA(n Node) (ida []string) {
|
||||
for {
|
||||
f, ok := n.(*Field)
|
||||
|
|
|
|||
Loading…
Reference in a new issue