Skip to content

Commit 9ecd1b0

Browse files
committed
Fixed incorrect trim usage
1 parent c4048e2 commit 9ecd1b0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/core/Formatter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default class Formatter {
189189
}
190190

191191
formatQuerySeparator(token, query) {
192-
return trimEnd(query) + token.value + "\n";
192+
return this.trimTrailingWhitespace(query) + token.value + "\n";
193193
}
194194

195195
addNewline(query) {

test/StandardSqlFormatterTest.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ describe("StandardSqlFormatter", function() {
358358
"SELECT\n" +
359359
" a\n" +
360360
"FROM\n" +
361-
" b --comment;"
361+
" b --comment\n" +
362+
";"
362363
);
363364
});
364365

0 commit comments

Comments
 (0)