Closed chancerussell closed 10 years ago
Seems perfect, thanks for providing new test too!
Could you squash commits "Corrected typo in test stub method name" and "Fixed misindentation" before I merge?
Thanks for the quick response on this issue.
I am working on a new releasing but having issue with signing the gem, should be released soon.
The regex in css.rb that checks for URLs (for cache busting?) will match some URLs that URI.parse considers invalid. This came up with a file from zurb/foundation that contained a space in a data:image URI. SASS and browsers seem to handle the space fine, but URI.parse throws an InvalidURIError.
My solution was to wrap the call and return the match unchanged if InvalidURIError is thrown. Another solution might be to change '(.?)' in the regex to '(\S?)', but that would only fix the issue with whitespace--it seems preferable to just pass any string that URI.parse can't handle unchanged, then catch it in SASS if it's actually going to cause a problem.
Pull request #152 attempts to fix the same issue, but would skip anything where the url starts with "data:", which doesn't seem like what we want to do.
I've also added tests to preproc_test.rb for the fix, and a bad_uri.scss file that contains data that shows the issue.