Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
adding PR#44 which cleans up the removeComments function
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckcarpenter committed Mar 30, 2014
2 parents 2bac6d0 + a66c9a5 commit 51a9bf8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "REM-unit-polyfill",
"version": "1.1.0",
"version": "1.2.2",
"homepage": "https://github.com/chuckcarpenter/REM-unit-polyfill",
"authors": [
"Chuck Carpenter <chuck.carpenter@me.com>",
Expand Down
11 changes: 5 additions & 6 deletions js/rem.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,12 @@
removeComments = function ( css ) {
var start = css.search(/\/\*/),
end = css.search(/\*\//);
if ( (start > -1) && (end > start) ) {
while ( (start > -1) && (end > start) ) {
css = css.substring(0, start) + css.substring(end + 2);
return removeComments(css);
}
else {
return css;
start = css.search(/\/\*/);
end = css.search(/\*\//);
}
return css;
},

// Test for Media Query support
Expand All @@ -194,7 +193,7 @@
css = css.replace(/@media[\s\S]*?\}\s*\}/, "");
}

return css;
return css;
},

getXMLHttpRequest = function () { // we're gonna check if our browser will let us use AJAX
Expand Down
6 changes: 3 additions & 3 deletions js/rem.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "rem",
"description": "A polyfill to parse CSS links and rewrite pixel equivalents into head for non supporting browsers",
"main": "rem.js",
"version": "1.2.1",
"main": "js/rem.js",
"version": "1.2.2",
"authors": [
"Chuck Carpenter <chuck.carpenter@me.com>",
"Lucas Serven <lserven@gmail.com>"
Expand Down

0 comments on commit 51a9bf8

Please sign in to comment.