Skip to content

Commit 8373e30

Browse files
annbgnelacuesta
authored andcommitted
allow :has() arguments start not solely from a combinator
Co-authored-by: Eugenio Lacuesta <[email protected]>
1 parent c44c595 commit 8373e30

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cssselect/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ def parse_relative_selector(stream):
597597
next = stream.next()
598598
if next in [('DELIM', '+'), ('DELIM', '-'), ('DELIM', '>'), ('DELIM', '~')]:
599599
arguments.append(next)
600+
elif next.type in ('IDENT', 'STRING', 'NUMBER'):
601+
arguments.append(Element(element=next.value))
600602
while 1:
601603
stream.skip_whitespace()
602604
next = stream.next()

0 commit comments

Comments
 (0)