mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Skip cleaning for search by name scrape queries (#2059)
* Skip pp for search by name queries * upgrade htmlquery
This commit is contained in:
18
vendor/github.com/antchfx/xpath/parse.go
generated
vendored
18
vendor/github.com/antchfx/xpath/parse.go
generated
vendored
@@ -65,6 +65,7 @@ const (
|
||||
nodeOperator
|
||||
nodeVariable
|
||||
nodeConstantOperand
|
||||
nodeGroup
|
||||
)
|
||||
|
||||
type parser struct {
|
||||
@@ -104,6 +105,10 @@ func newFilterNode(n, m node) node {
|
||||
return &filterNode{nodeType: nodeFilter, Input: n, Condition: m}
|
||||
}
|
||||
|
||||
func newGroupNode(n node) node {
|
||||
return &groupNode{nodeType: nodeGroup, Input: n}
|
||||
}
|
||||
|
||||
// newRootNode returns a root node.
|
||||
func newRootNode(s string) node {
|
||||
return &rootNode{nodeType: nodeRoot, slash: s}
|
||||
@@ -492,6 +497,9 @@ func (p *parser) parsePrimaryExpr(n node) (opnd node) {
|
||||
case itemLParens:
|
||||
p.next()
|
||||
opnd = p.parseExpression(n)
|
||||
if opnd.Type() != nodeConstantOperand {
|
||||
opnd = newGroupNode(opnd)
|
||||
}
|
||||
p.skipItem(itemRParens)
|
||||
case itemName:
|
||||
if p.r.canBeFunc && !isNodeType(p.r) {
|
||||
@@ -587,6 +595,16 @@ func (o *operandNode) String() string {
|
||||
return fmt.Sprintf("%v", o.Val)
|
||||
}
|
||||
|
||||
// groupNode holds a set of node expression
|
||||
type groupNode struct {
|
||||
nodeType
|
||||
Input node
|
||||
}
|
||||
|
||||
func (g *groupNode) String() string {
|
||||
return fmt.Sprintf("%s", g.Input)
|
||||
}
|
||||
|
||||
// filterNode holds a condition filter.
|
||||
type filterNode struct {
|
||||
nodeType
|
||||
|
||||
Reference in New Issue
Block a user