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

Double quotes permitted outside when nested singlequotes #1022

Closed
bodurkalukasz opened this issue Dec 4, 2017 · 2 comments

Comments

@bodurkalukasz
Copy link

commented Dec 4, 2017

Below scripts are both valid currently:

countryCodeInput: "input[name='country-code']"

countryCodeInput: 'input[name="country-code"]'

Shouldn't one of those be preferred?

@feross

This comment has been minimized.

Copy link
Member

commented Apr 30, 2018

In general, single quotes are preferred. However, sometimes you have a string with lots of single quotes in it (that can't be replaced with double quotes like in your example) and it's desirable to be able to use a double quote string to avoid many escape sequences.

I'm curious how much breakage there would be in the ecosystem if we tightened this rule up, but I'm not so sure this is actually a good idea.

@no-response no-response bot closed this May 10, 2018

@feross feross removed the need more info label May 10, 2018

@standard standard deleted a comment from no-response bot May 10, 2018

@feross feross reopened this May 10, 2018

@feross feross added this to the standard v12 milestone May 10, 2018

@stale

This comment has been minimized.

Copy link

commented Aug 8, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Aug 8, 2018

@stale stale bot closed this Aug 15, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Nov 13, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants
You can’t perform that action at this time.