Fixed creation of candidateNode in operators to include file metadata

This commit is contained in:
Mike Farah
2021-02-11 10:58:40 +11:00
parent 49ac2bac13
commit 7518dac99c
19 changed files with 72 additions and 107 deletions
+2 -2
View File
@@ -100,8 +100,8 @@ func getStyleOperator(d *dataTreeNavigator, matchingNodes *list.List, pathNode *
style = "<unknown>"
}
node := &yaml.Node{Kind: yaml.ScalarNode, Value: style, Tag: "!!str"}
lengthCand := &CandidateNode{Node: node, Document: candidate.Document, Path: candidate.Path}
results.PushBack(lengthCand)
result := candidate.CreateChild(nil, node)
results.PushBack(result)
}
return results, nil