Skip to content

Commit

Permalink
Fixed incorrect trim usage
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelrpinto committed Dec 21, 2018
1 parent c4048e2 commit 9ecd1b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/Formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default class Formatter {
}

formatQuerySeparator(token, query) {
return trimEnd(query) + token.value + "\n";
return this.trimTrailingWhitespace(query) + token.value + "\n";
}

addNewline(query) {
Expand Down
3 changes: 2 additions & 1 deletion test/StandardSqlFormatterTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ describe("StandardSqlFormatter", function() {
"SELECT\n" +
" a\n" +
"FROM\n" +
" b --comment;"
" b --comment\n" +
";"
);
});

Expand Down

0 comments on commit 9ecd1b0

Please sign in to comment.