Merge pull request #3146 from babel/no-comment

Never print comments in compact mode
This commit is contained in:
Amjad Masad 2015-12-07 13:38:40 -05:00
commit aaf834801c

View File

@ -231,7 +231,8 @@ 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;