Fixes #2908, add "\n" between pure literal header and function body.

This commit is contained in:
Miao Jiang 2013-04-05 13:20:59 +08:00
parent 8be65dee93
commit 337ebd3ce9
2 changed files with 4 additions and 0 deletions

View File

@ -475,6 +475,8 @@
fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB))));
}
fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : '')));
} else if (fragments.length && post.length) {
fragments.push(this.makeCode("\n"));
}
}
return fragments.concat(post);

View File

@ -352,6 +352,8 @@ exports.Block = class Block extends Base
fragments.push @makeCode ",\n#{@tab + TAB}" if declars
fragments.push @makeCode (scope.assignedVariables().join ",\n#{@tab + TAB}")
fragments.push @makeCode ";\n#{if @spaced then '\n' else ''}"
else if fragments.length and post.length
fragments.push @makeCode "\n"
fragments.concat post
# Wrap up the given nodes as a **Block**, unless it already happens