Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
separator changed to "|" and divided Prop from value
  • Loading branch information
stubbornella committed Sep 10, 2012
commit e456ed845054f1e665599d88ab5ac375890fe3c9
4 changes: 2 additions & 2 deletions src/rules/duplicate-property-value-pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CSSLint.addRule({
parser.addListener("property", function(event){
var prop = event.property.text.toLowerCase(),
val = event.value.text.toLowerCase(),
key = prop + ':' + val;
key = prop + '|' + val;

if (!count[key]) {
count[key] = 0;
Expand All @@ -44,7 +44,7 @@ CSSLint.addRule({
});

data = data.map(function (item) {
return item[1] + ' => ' + item[0];
return item[1] + '|' + item[0];
}).join('\n');

reporter.rollupWarn('Duplicate property-value-pairs:\n\n' + data);
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/duplicate-property-value-pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
var result = CSSLint.verify(".foo { color: #f00; } .bar { color: #f00; }", {"duplicate-property-value-pairs": 1});
Assert.areEqual(1, result.messages.length);
Assert.areEqual("warning", result.messages[0].type);
Assert.areEqual("Duplicate property-value-pairs:\n\n2 => color:#f00", result.messages[0].message);
Assert.areEqual("Duplicate property-value-pairs:\n\n2|color|#f00", result.messages[0].message);
}
}));

Expand Down