mirror of
https://github.com/less/less.js.git
synced 2026-01-22 13:48:03 -05:00
- 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)
22 lines
719 B
JavaScript
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;
|