Skip to content

Commit

Permalink
insert final newline
Browse files Browse the repository at this point in the history
  • Loading branch information
kitta65 committed Apr 6, 2024
1 parent 9725b8c commit 994ce6d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,11 @@ export class BQLanguageServer {
const originalText = this.uriToText[params.textDocument.uri];
const splittedOriginalText = originalText.split("\n");

const formattedText = await prettier
.format(originalText, {
parser: "sql-parse",
plugins: [prettierPluginBQ],
...config.formatting,
})
.then((txt) => txt.slice(0, -1)); // remove unnecessary \n
const formattedText = await prettier.format(originalText, {
parser: "sql-parse",
plugins: [prettierPluginBQ],
...config.formatting,
});
const splittedFormattedText = formattedText.split("\n");

if (config.experimental.formatEachLine) {
Expand Down

0 comments on commit 994ce6d

Please sign in to comment.