Skip to content

No way to find out if Token::QuotedString had single or double quotation marks #282

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

Closed
snshn opened this issue Mar 11, 2021 · 2 comments
Closed

Comments

@snshn
Copy link

snshn commented Mar 11, 2021

I believe it's crucial for being able to "disassemble" and "re-assemble" CSS back to match the original, 100%.

Basically, Token::QuotedString(ref value) should also have ref double in it, e.g. Token::QuotedString(ref value, ref double), or something similar.

edit:
if it's possible to use symbols other than ' and " as quotation marks, perhaps it should have ref symbol there instead... if the opening and closing marks can be different, likely ref symbols (or ref symbol_open, ref symbol_close).

@SimonSapin
Copy link
Member

Correct, it is not goal of this library that parsing then serializing produces the exact same string as any input, only a string that has the same meaning if parsed again. There would be many many cases to consider beyond single v.s. double quotes.

@snshn
Copy link
Author

snshn commented Mar 11, 2021

Oh, I see. Doesn't break anything for my code base, just thought it was missing from the crate. Thank you a lot for it btw, really works great for my project!

@snshn snshn closed this as completed Mar 11, 2021
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

No branches or pull requests

2 participants