diff --git a/selectivizr.js b/selectivizr.js index 7077c57..50958db 100755 --- a/selectivizr.js +++ b/selectivizr.js @@ -71,7 +71,7 @@ References: var namespace = "slvzr"; // Stylesheet parsing regexp's - var RE_COMMENT = /(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*?/g; + var RE_COMMENT = /\/\*[\S\s]*?\*\//g; var RE_IMPORT = /@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))\s*([^;]*);/g; var RE_ASSET_URL = /(behavior\s*?:\s*)?\burl\(\s*(["']?)(?!data:)([^"')]+)\2\s*\)/g; var RE_PSEUDO_STRUCTURAL = /^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/; @@ -394,7 +394,7 @@ References: function loadStyleSheet( url ) { xhr.open("GET", url, false); xhr.send(); - return (xhr.status==200) ? xhr.responseText : EMPTY_STRING; + return (xhr.status==200) ? normalizeWhitespace(xhr.responseText) : EMPTY_STRING; }; // --[ resolveUrl() ]---------------------------------------------------