Skip to content

Commit 7baa9ab

Browse files
committed
Ensure repeated empty lines are collapsed to one
1 parent 8dbb07b commit 7baa9ab

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/comments.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,27 @@ describe("comments", () => {
149149
`);
150150
});
151151

152+
it(`collapses multiple empty lines between comments to one`, async () => {
153+
expect(
154+
await rawPretty(dedent`
155+
SELECT 1;
156+
-- foo
157+
158+
159+
-- baz
160+
SELECT 1;
161+
162+
`),
163+
).toBe(dedent`
164+
SELECT 1;
165+
-- foo
166+
167+
-- baz
168+
SELECT 1;
169+
170+
`);
171+
});
172+
152173
// Issue #9
153174
it.skip(`keeps separate-line line-comments on a separate line (not moving them to line end)`, async () => {
154175
rawTest(dedent`

0 commit comments

Comments
 (0)