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

Parsing case-sensitive and case-insensitive selectors are different #10

Closed
Semigradsky opened this issue Oct 3, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Semigradsky
Copy link

https://www.w3.org/TR/selectors-4/#attribute-case

[foo="bar" i]

AST:

{
	"type": "attribute",
	"content": "[foo=\"bar\" i]",
	"name": "foo",
	"operator": "=",
	"value": "\"bar\"",
	"i": "i",
	"pos": [
		0,
		11
	]
}

[foo="bar" I]

AST:

{
	"type": "attribute",
	"content": "[foo=\"bar\" I]",
	"name": "foo",
	"operator": "=",
	"value": "\"bar\" I",
	"pos": [
		0,
		11
	]
}

[foo="bar" s]

AST:

{
	"type": "attribute",
	"content": "[foo=\"bar\" s]",
	"name": "foo",
	"operator": "=",
	"value": "\"bar\" s",
	"pos": [
		0,
		11
	]
}
@LeaVerou
Copy link
Owner

LeaVerou commented Oct 5, 2020

Ah, I didn't read the spec carefully enough and didn't know about s or I. Thanks for spotting that! Should be very easy to fix.

@LeaVerou LeaVerou added the bug Something isn't working label Oct 5, 2020
@LeaVerou
Copy link
Owner

LeaVerou commented Oct 5, 2020

Just pushed a fix! I also renamed the key to caseSensitive instead of the cryptic i.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants