Skip to content

Commit

Permalink
Retain all comments. Fixes #250
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit committed Jul 12, 2013
1 parent bbab063 commit 7f3c726
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stylebot/libs/jscsspimporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function JSCSSPImporter() {
this.AT_RULE_PREFIX = "at";
this.COMMENT_PREFIX = "comment";
this.AT_IMPORT_RULE_TYPE = "@import";
this.commentIndex = 0;
}

JSCSSPImporter.prototype = {
Expand Down Expand Up @@ -64,9 +65,10 @@ JSCSSPImporter.prototype = {
},

importComment: function(rule, parent) {
var selector = this.COMMENT_PREFIX + rule.currentLine;
var selector = this.COMMENT_PREFIX + this.commentIndex;
parent[selector] = new Object();
parent[selector][this.COMMENT_PREFIX] = rule.cssText();
this.commentIndex++;
},

importStyleRule: function(rule, parent) {
Expand Down

0 comments on commit 7f3c726

Please sign in to comment.