Support wildcard element selector

pull/158/head
mdrokz 3 years ago
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…
Cancel
Save