Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css inside selector: Invalid quantifier expression #27

Closed
ComLock opened this issue Oct 15, 2018 · 2 comments
Closed

css inside selector: Invalid quantifier expression #27

ComLock opened this issue Oct 15, 2018 · 2 comments
Labels

Comments

@ComLock
Copy link
Contributor

ComLock commented Oct 15, 2018

This works
select p:nth-of-type(2)|select a|read attribute href

This gives error: Invalid quantifier expression
select p:nth-of-type(2) a|read attribute href

So I believe surgeon interprets the "a" as a quantifier expression.

This gives same error
select p:nth-of-type(2) a {0,}|read attribute href

ref: https://www.w3schools.com/cssref/css_selectors.asp

Selector Example Example description
element element div p Selects all

elements inside

elements
@gajus gajus added the question label Oct 15, 2018
@gajus
Copy link
Owner

gajus commented Oct 15, 2018

You need to quote the selector that includes either spaces or quotes.

Alternatively, you can use subroutine aliases that do not require quoting selectors.

https://github.com/gajus/surgeon#built-in-subroutine-aliases

@gajus gajus closed this as completed Oct 15, 2018
@ComLock
Copy link
Contributor Author

ComLock commented Oct 15, 2018

Thanks again. I guess I missed the quote in your first example. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants