Skip to content

Commit

Permalink
Make selectorNode.String() clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAbides committed May 31, 2023
1 parent c4e75fc commit 33a1168
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion path.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ func (n *selectorNode) replace(node ast.Node, target ast.Node) error {
}

func (n *selectorNode) String() string {
s := fmt.Sprintf(".%s", (*PathBuilder).normalizeSelectorName(nil, n.selector))
var builder PathBuilder
selector := builder.normalizeSelectorName(n.selector)
s := fmt.Sprintf(".%s", selector)
if n.child != nil {
s += n.child.String()
}
Expand Down

0 comments on commit 33a1168

Please sign in to comment.