Closed as not planned
Description
cc @timmywil
Spun off from #261.
Our current pseudo argument parser prefers quotes, but will fall back on greedy consumption up to the last closing parenthesis if they are not found or incorrect. We should decide on explicit behavior.
Selector | Liberal Fallback (current) |
---|---|
unclosed: :contains(... |
Syntax Error |
no quotes: :contains(Too Ra Loo Ra Loo Ral) |
Too Ra Loo Ra Loo Ral |
parentheses: :contains(:-)) |
:-) |
properly quoted: :contains('\'sup?') |
'sup? |
leading quote: :contains("foo" is bar) |
"foo" is bar |
leading quote: :contains("unterminated) |
"unterminated |
trailing quote: :contains(Quoth the raven, 'Nevermore.') |
Quoth the raven, 'Nevermore.' |
trailing quote: :contains(unopened') |
unopened' |
embedded quote: :contains(It's a bird, it's a plane) |
It's a bird, it's a plane |
Other options to come later; I just wanted to document a wide swath of cases. Note also that our current aggressiveness can cause problems with subsequent selector components (e.g., we accept :contains("unterminated):not(:contains("Terminator"))
as valid, and matching only elements containing "unterminated):not(:contains("Terminator")
).