support comments. Add failing test case for when mixin call does not have parent selectors

This commit is contained in:
Luke Page
2013-03-21 16:51:04 +00:00
parent aa802bd84c
commit 493d6facf2
5 changed files with 25 additions and 14 deletions

View File

@@ -1,15 +1,16 @@
(function (tree) {
tree.Comment = function (value, silent) {
tree.Comment = function (value, silent, index, currentFileInfo) {
this.value = value;
this.silent = !!silent;
this.currentFileInfo = currentFileInfo;
};
tree.Comment.prototype = {
type: "Comment",
toCSS: function (env) {
return env.compress ? '' : this.value;
return (env.compress || (this.currentFileInfo && this.currentFileInfo.silent)) ? '' : this.value;
},
eval: function () { return this }
eval: function () { return this; }
};
})(require('../tree'));