Skip to content

Commit

Permalink
remove unused code antchfx/htmlquery#52
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengchun committed Apr 2, 2024
1 parent c9362c3 commit ebf2b76
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions build.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ func (b *builder) processAxis(root *axisNode, flags flag, props *builderProp) (q
}
return v
}
// fix `//*[contains(@id,"food")]//*[contains(@id,"food")]`, see https://github.com/antchfx/htmlquery/issues/52
// Skip the current node(Self:false) for the next descendants nodes.
_, ok := qyGrandInput.(*contextQuery)
qyOutput = &descendantQuery{name: root.LocalName, Input: qyGrandInput, Predicate: filter, Self: ok}
qyOutput = &descendantQuery{name: root.LocalName, Input: qyGrandInput, Predicate: filter, Self: false}
*props |= builderProps.NonFlat
return qyOutput, nil
}
Expand Down

0 comments on commit ebf2b76

Please sign in to comment.