We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9703ff8 commit d3f7141Copy full SHA for d3f7141
src/slang-nodes/SourceUnit.ts
@@ -40,6 +40,13 @@ export class SourceUnit implements SlangNode {
40
print: PrintFunction,
41
options: ParserOptions<AstNode>
42
): Doc {
43
- return [path.call(print, 'members'), options.parentParser ? '' : line];
+ return [
44
+ path.call(print, 'members'),
45
+ // Prettier's Markdown formatter already appends a new line on code
46
+ // blocks, therefore we avoid trailing with a new line at the end of
47
+ // a file in this case.
48
+ // https://github.com/prettier-solidity/prettier-plugin-solidity/issues/764
49
+ options.parentParser ? '' : line
50
+ ];
51
}
52
0 commit comments