Respond stops on } in comments #150

PaulShipley opened this Issue Aug 29, 2012 · 3 comments

4 participants


This is more a "Gottya" than a bug and I have not checked the code yet, but maybe this will save someone else some head scratching.

Issue was that Respond would stop parsing a style sheet before the end. After a bit of trial and error, problem was due to a comment in the form

/* blah blah blah } blah */

Removing the '}' fixed the problem.

Solution: Don't put '}' characters in comments.


Second this one. Had comments like this break for me:

.class-name {
background: #f30;

When I removed the curly brackets it worked again.


Just ran into this problem as well. Anytime we commented out CSS styles it would break. Thinking stripping comments out before parsing the rest of the CSS might be a relatively easy way to fix this? Looks like #98 may be helpful, I'll submit a similar pull request that has a slightly different regex, but pretty similar to #98


Dupe of #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment