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

Do not target comma's that are between quotes or parentheses #2650

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Gusted
Copy link

@Gusted Gusted commented Dec 27, 2021

What:

Fixes a issue with the normalizer whereby it would target comma's that are within quotes or parentheses.

Why:

This broke CSS selectors that uses attribute selectors that e.g. specified a specific RGBA value which uses comma's as delimiter.

How:

Changing from , to a regex solution that avoids matching comma's that are between quotes and parentheses. The splitting with regex somehow introduced that their could be undefined entries within the parts array, so now it first checked if it isn't a undefined entry.

Checklist:

  • Documentation N/A
  • Unit Tests
  • Code complete

[style="color: rgb(0, 186, 124)"] won't be normalized to [style="color: rgb(0,\n 186,\n 124)"].

Gusted and others added 3 commits December 27, 2021 18:56
- Fixes a issue with the normalizer whereby the normalize would target
comma's that are within quotes or parantheses. This broke CSS selectors
that uses attribute selectors that e.g. specified a specifc rgba value
which uses comma's as delimeter.
- Added a test-cases to reflect this change.
- `[style="color: rgb(0, 186, 124)"]` won't be normalized to
`[style="color: rgb(0,\n 186,\n 124)"]`.
@Gusted Gusted changed the title Do not target comma's that are between quotes or parantheses Do not target comma's that are between quotes or parentheses Nov 21, 2022
@Gusted
Copy link
Author

Gusted commented Dec 1, 2022

Is this close to being merged?

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

Successfully merging this pull request may close these issues.

None yet

2 participants