scottjehl/Respond — pull request #182 by localpcguy (2013-02-20 17:38:26+00:00)
Title: Strip comments from CSS before getting media queries

Similar to #98 (https://github.com/scottjehl/Respond/pull/98) but a slightly different regex that should handle inline comments as well as multiline. (Yes, // comments should not be used in CSS and AFAIK just exploits the way CSS doesn't render things it doesn't understand, but I still see them from time to time.) Also it is in the translate function rather than in the AJAX response. Same caveats as #98 apply I think - need to make sure the regex doesn't apply to anything it shouldn't, but seems to be working for us so far so thought I'd share. Feel free to use, adapt or just discard.