mirror of
https://github.com/ericchiang/pup
synced 2025-01-15 10:11:16 +00:00
Support wildcard element selector
This commit is contained in:
parent
7ffc0578de
commit
f807067591
@ -85,7 +85,7 @@ func (s CSSSelector) Match(node *html.Node) bool {
|
|||||||
if node.Type != html.ElementNode {
|
if node.Type != html.ElementNode {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if s.Tag != "" {
|
if s.Tag != "" && s.Tag != "*" {
|
||||||
if s.Tag != node.DataAtom.String() {
|
if s.Tag != node.DataAtom.String() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user