Skip to content

Commit

Permalink
Keep empty lines in the header.
Browse files Browse the repository at this point in the history
This change increases accuracy of error messages for files with
directives in them.
  • Loading branch information
grindars committed Aug 7, 2013
1 parent 5c680a2 commit fbc5c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/mincer/processors/directive_processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ DirectiveProcessor.prototype.processSource = function () {
// if our own body was not yet appended, and there are header comments,
// prepend these coments first.
if (!self.__hasWrittenBody__ && 0 < self.processedHeader.length) {
self.result += self.processedHeader + "\n";
self.result += self.processedHeader;
}

// process and append body of each path that should be included
Expand Down Expand Up @@ -356,8 +356,8 @@ getter(DirectiveProcessor.prototype, 'processedHeader', function () {

if (!this.__processedHeader__) {
header = get_lines(this.header).map(function (line, index) {
return is_directive(this.directives, index + 1) ? "\n" : line;
}, this).join("\n").trimLeft().trimRight();
return is_directive(this.directives, index + 1) ? "" : line;
}, this).join("\n");

prop(this, '__processedHeader__', header);
}
Expand Down

0 comments on commit fbc5c6a

Please sign in to comment.