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

Distinguish double-quoted from single-quoted StringTokens #58

Closed
wants to merge 1 commit into from
Closed

Distinguish double-quoted from single-quoted StringTokens #58

wants to merge 1 commit into from

Conversation

feludwig
Copy link

Hello!
I use tinycss2 to parse a superset of css and distinguishing "quoted:identifier" from 'value' will be very useful

@liZe
Copy link
Member

liZe commented Apr 25, 2024

Hi!

Thanks for your pull request.

Unfortunately, the goal of tinycss2 is to implement the CSS Syntax specification, and there’s no difference between single and double quotes in this specification. That’s why we won’t merge this PR. 😞

I know that your change seems simple and harmless, but we really try not to accept changes that are not specified. It’s already hard to maintain this project by stupidly following the spec, we don’t want to add extra work with unspecified features, even when they look good!

It’s probably possible to handle your use case by monkey-patching tinycss2 in your project.

@liZe liZe closed this Apr 25, 2024
@doctormo
Copy link

I recommend adding tests to guard against the issues that will be caused by addition this flexibility to tinycss2, as it's a demand from users that will happen over and over again and you will find yourself writing this same message each time.

A test which fails on single quote retention should do it. You can add whatever message you think is appropriate to stop people wasting time trying to contribute to the project. Or link them to a fork, or whatever is most useful.

This is what I would do with python-crontab, which I maintain in a similar way to your maintenance of tinycss2. Saves us all precious time we don't have much of to help keep these libraries running.

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.

3 participants