-
-
Notifications
You must be signed in to change notification settings - Fork 31
Provide access to the contents of quoted strings #94
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
Labels
Comments
Is this issue still valid? I don’t see any option to access unquoted value. |
@niksy happy to review a PR to add this feature. without community contribution it likely won't be reopened. |
niksy
added a commit
to niksy/postcss-values-parser
that referenced
this issue
Nov 3, 2020
8 tasks
@shellscape done in #128! |
niksy
added a commit
to niksy/postcss-values-parser
that referenced
this issue
Feb 11, 2021
shellscape
pushed a commit
that referenced
this issue
Feb 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quoted.value
returns the text of the string token as written in the stylesheet. This is useful in some circumstances, but in others the contents of the string is more important. This can be loosely approximated by stripping the string's quotes, but that returns an incorrect result if the string contains any kind of escape code.Feature Use Case
I'm writing a PostCSS plugin that processes certain custom at-rules that are followed by quoted strings (for example,
@foo "bar"
). I need to access the values of those strings.Feature Proposal
I propose a
Quoted.contents
getter that returns the semantic contents of the string. For example, for the CSS value"\""
it would return the string'"'
, and for the CSS value"\61"' it would return the string
"a"`.The text was updated successfully, but these errors were encountered: