Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDo not add spaces when serializing operators in attribute selectors #17181
Comments
|
cc @emilio |
|
Hi! If you have any questions regarding this issue, feel free to make a comment here, or ask it in the If you intend to work on this issue, then add |
|
Are spaces removed if the input has them? |
|
Yep. We should not print spaces here at all. |
|
Hey, I'd be happy to work on this! |
|
Hey @achiwhane! Thanks for your interest in working on this issue. It's now assigned to you! |
|
Yeah, this applies to all operators. |
Remove whitespace when serializing operators in attribute selectors <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17181. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17203) <!-- Reviewable:end -->
Remove whitespace when serializing operators in attribute selectors <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #17181. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17203) <!-- Reviewable:end -->
|
The patch in #17203 looks good, but it needs to remove some expected test failures that now pass. |
|
Fixed in #17538. |
|
Thanks to @rlustin for catching this. |
Servo serializes
[a="b"]as[a = "b"], other browsers omit the spaces.Relevant code:
servo/components/selectors/attr.rs
Line 79 in 2da8eb0
Simplified testcase:
This causes stylo (not run on Servo CI) failures on: