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

Invalid JavaScript syntax if the CSS property has a single-quote #3

Open
eXon opened this issue Aug 7, 2017 · 2 comments
Open

Invalid JavaScript syntax if the CSS property has a single-quote #3

eXon opened this issue Aug 7, 2017 · 2 comments

Comments

@eXon
Copy link

eXon commented Aug 7, 2017

First and foremost, awesome plugin I love it!

There is a problem that is slightly anoying though. When the CSS property is containing a single-quote, the JavaScript syntax is incorrect.

Example: if you transform: content: '';, the output will be content: '''', (4 single-quotes) which is incorrect. It should be either content: '""', or content: '\\\'\\\'',.

The worst example would be: content: 'I\'m bugged'; that will be transformed to content: ''I\'m bugged'',. It should be transformed to: '\'I\\\'m bugged\'', or '"I\\\'m bugged"'.

Or maybe it would be easier to use the backtick (`) in those situations.

@ansumanshah
Copy link
Owner

Thanks for the issue, I think @gdad-s-river is working on this.

@yonibot
Copy link

yonibot commented Sep 2, 2017

Terrific library! Thanks :)

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

3 participants