We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, the parse tree doesn't include full details for attribute selectors. For example, [att*=val] is parsed into:
[att*=val]
{"type":"selectors","nodes":[ { "type":"selector", "nodes":[ { "type":"attribute", "content":"att*=val" } ] } ]}
It would be better if the "content" was further parsed, so we could get something like:
{"type":"selectors","nodes":[ { "type":"selector", "nodes":[ { "type":"attribute", "name":"att", "operator":"*=", "content":"val" } ] } ]}
The text was updated successfully, but these errors were encountered:
The ASCII-case-insensitive attribute value flag (e.g. [type=radio i]) also needs to be accounted for.
[type=radio i]
Sorry, something went wrong.
Any progress with this?
@iddan http://anyupdatesonthis.com
Here is a RegExp that I've been working on to parse attribute selectors.
/^\s*((?:\\.|[A-Za-z_\-\u{00a0}-\u{10ffff}])(?:\\.|[A-Za-z_\-0-9\u{00a0}-\u{10ffff}])*)(?:\s*(=|~=|\|=|\^=|\$=|\*=)\s*"?(.+?)"?)?\s*(i)?\s*$/u
$1 - name $2 - operator (i.e =) $3 - value $4 - ASCII-case-insensitive attribute value flag
No branches or pull requests
Currently, the parse tree doesn't include full details for attribute selectors. For example,
[att*=val]
is parsed into:It would be better if the "content" was further parsed, so we could get something like:
The text was updated successfully, but these errors were encountered: