Never print comments in compact mode

This commit is contained in:
Amjad Masad 2015-12-07 02:37:53 -08:00
parent 2e11839257
commit 8689d1a045

View File

@ -231,7 +231,7 @@ export default class Printer extends Buffer {
if (this.format.shouldPrintComment) {
return this.format.shouldPrintComment(comment.value);
} else {
if (comment.value.indexOf("@license") >= 0 || comment.value.indexOf("@preserve") >= 0) {
if (!this.format.compact && comment.value.indexOf("@license") >= 0 || comment.value.indexOf("@preserve") >= 0) {
return true;
} else {
return this.format.comments;