Skip to content

Commit

Permalink
allow :has() arguments start not solely from a combinator
Browse files Browse the repository at this point in the history
Co-authored-by: Eugenio Lacuesta <1731933+elacuesta@users.noreply.github.com>
  • Loading branch information
2 people authored and annbgn committed Jun 30, 2021
1 parent c44c595 commit 8373e30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cssselect/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ def parse_relative_selector(stream):
next = stream.next()
if next in [('DELIM', '+'), ('DELIM', '-'), ('DELIM', '>'), ('DELIM', '~')]:
arguments.append(next)
elif next.type in ('IDENT', 'STRING', 'NUMBER'):
arguments.append(Element(element=next.value))
while 1:
stream.skip_whitespace()
next = stream.next()
Expand Down

0 comments on commit 8373e30

Please sign in to comment.