Files
less.js/lib/less/tree/comment.js
meri ead3e29f7b Fixing import by reference
- refactored how import reference works
- refactored to-css-visitor (this is side product, it was getting
  complicated)
- fixes issues #1851, #1896, #1878, #2716, #1968, #2162 (same as #1896)
2015-11-20 15:10:53 +01:00

22 lines
719 B
JavaScript

var Node = require("./node"),
getDebugInfo = require("./debug-info");
var Comment = function (value, isLineComment, index, currentFileInfo) {
this.value = value;
this.isLineComment = isLineComment;
this.currentFileInfo = currentFileInfo;
};
Comment.prototype = new Node();
Comment.prototype.type = "Comment";
Comment.prototype.genCSS = function (context, output) {
if (this.debugInfo) {
output.add(getDebugInfo(context, this), this.currentFileInfo, this.index);
}
output.add(this.value);
};
Comment.prototype.isSilent = function(context) {
var isCompressed = context.compress && this.value[2] !== "!";
return this.isLineComment || isCompressed;
};
module.exports = Comment;