Working through fix #73

Quite a bit of surgery required.
This commit is contained in:
Dave Shanley
2023-02-17 16:31:34 -05:00
parent 1df5f44e6f
commit e19b7d2bf1
12 changed files with 347 additions and 155 deletions

View File

@@ -89,6 +89,11 @@ func LocateRefNode(root *yaml.Node, idx *index.SpecIndex) (*yaml.Node, error) {
}
}
foundRefs := idx.SearchIndexForReference(rv)
if len(foundRefs) > 0 {
return foundRefs[0].Node, nil
}
// cant be found? last resort is to try a path lookup
_, friendly := utils.ConvertComponentIdIntoFriendlyPathSearch(rv)
if friendly != "" {