1
0
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:
mdrokz 2021-08-15 14:23:26 +05:30
parent 7ffc0578de
commit f807067591

View File

@ -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
} }