don't remove duplicate comments, fixes #1067

This commit is contained in:
Luke Page
2013-03-05 11:58:59 +00:00
parent 8437d0766d
commit 7778da94b5
3 changed files with 3 additions and 2 deletions

View File

@@ -244,7 +244,7 @@ tree.Ruleset.prototype = {
// Remove duplicates
for (var i = rules.length - 1; i >= 0; i--) {
if (_rules.indexOf(rules[i]) === -1) {
if (rules[i].slice(0, 2) === "/*" || _rules.indexOf(rules[i]) === -1) {
_rules.unshift(rules[i]);
}
}

View File

@@ -30,6 +30,7 @@
/**/
color: red;
/* A C-style comment */
/* A C-style comment */
background-color: orange;
font-size: 12px;

View File

@@ -36,7 +36,7 @@
------------------- */
#comments /* boo */ {
/**/ // An empty comment
color: red; /* A C-style comment */
color: red; /* A C-style comment */ /* A C-style comment */
background-color: orange; // A little comment
font-size: 12px;