Skip to content

Commit

Permalink
Ensure repeated empty lines are collapsed to one
Browse files Browse the repository at this point in the history
  • Loading branch information
nene committed Jan 26, 2025
1 parent 8dbb07b commit 7baa9ab
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,27 @@ describe("comments", () => {
`);
});

it(`collapses multiple empty lines between comments to one`, async () => {
expect(
await rawPretty(dedent`
SELECT 1;
-- foo
-- baz
SELECT 1;
`),
).toBe(dedent`
SELECT 1;
-- foo
-- baz
SELECT 1;
`);
});

// Issue #9
it.skip(`keeps separate-line line-comments on a separate line (not moving them to line end)`, async () => {
rawTest(dedent`
Expand Down

0 comments on commit 7baa9ab

Please sign in to comment.