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

fix: do not break selector with escaping #896

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Feb 20, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Fix escaping in selectors

fixes #578

Breaking Changes

No

Additional Info

/cc @jquense Looks like all tests good, except some selectors we need fix before merge

postcss/postcss-selector-parser#174
postcss/postcss-selector-parser#175

@codecov
Copy link

codecov bot commented Feb 20, 2019

Codecov Report

Merging #896 into master will decrease coverage by 0.24%.
The diff coverage is 90.9%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #896      +/-   ##
==========================================
- Coverage   99.47%   99.23%   -0.25%     
==========================================
  Files          10       10              
  Lines         381      391      +10     
  Branches      109      114       +5     
==========================================
+ Hits          379      388       +9     
- Misses          2        3       +1
Impacted Files Coverage Δ
src/utils.js 97.22% <90.9%> (-2.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2293eb0...3aab2ef. Read the comment docs.

@alexander-akait alexander-akait force-pushed the fix-do-not-break-selector-with-escaping branch from fc6f1b3 to acfe183 Compare March 4, 2019 13:40
\\"3A\\": \\"_2CroCHBxlB1qbFlcySSx5w\\",
\\"#fake-id\\": \\"_2E85FJStrx25rDG2lYWifC\\",
\\":\`(\\": \\"_4_pn9LmAb2XtAy0kg4FN_\\",
\\"1a2b3c\\": \\"_2LEttkwzH7jRE93Ku8MGqY\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

\\"class\\": \\"_1PSZ4tK4URrenXyNSoawrx\\",
\\"class-duplicate-url\\": \\"_3YYoEr128Gk7ZgfRycu4tr\\",
\\"two\\": \\"_1LWD9ZV4XMmN23IPiMONS3\\",
\\"u-m+\\": \\"_3i3CD1fyX8bvzRt1H0IV-f\\",
\\"-top\\": \\"_1fWEySWrY44TvDnJ8JNxnE\\",
\\"#test\\": \\"Zmuw5k7Gg4hpgd6CVBEkq\\",
\\"\\\\\\\\\\": \\"_3UVS-Zs6Sa7sP9yLR2EN58\\",
\\"test\\": \\"_2mQhIWfQwYBHR8C-27Rb-E\\",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID selectors still broken, WIP on this

@alexander-akait
Copy link
Member Author

alexander-akait commented Mar 4, 2019

Problem in postcss-selector-parser
Invalid parse (should has one ID selector, but contains two):

:local(#\#fake-id) { 
  color: red; 
}

https://codepen.io/anon/pen/qvNzja?&editable=true (example with not)

@alexander-akait alexander-akait force-pushed the fix-do-not-break-selector-with-escaping branch from acfe183 to 9e29b69 Compare March 4, 2019 14:56
@alexander-akait alexander-akait force-pushed the fix-do-not-break-selector-with-escaping branch from 9e29b69 to 3aab2ef Compare March 5, 2019 11:30
@alexander-akait alexander-akait merged commit 0ba8c66 into master Mar 5, 2019
@alexander-akait alexander-akait deleted the fix-do-not-break-selector-with-escaping branch March 5, 2019 11:50
This was referenced Sep 13, 2024
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.

broken escaping
1 participant