Merge pull request #2940 from jiangmiao/issue2908

Fixes #2908, add "\n" between pure literal header and function body.
This commit is contained in:
Michael Ficarra 2013-04-20 12:03:25 -07:00
commit 3b38153759
2 changed files with 4 additions and 0 deletions

View File

@ -476,6 +476,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