From ebf2b764831364a79e510b7c1170026969fd218a Mon Sep 17 00:00:00 2001 From: zhengchun Date: Wed, 3 Apr 2024 01:09:06 +0800 Subject: [PATCH] remove unused code https://github.com/antchfx/htmlquery/issues/52 --- build.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build.go b/build.go index b03afe6..e079e96 100644 --- a/build.go +++ b/build.go @@ -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 }