darold / pgFormatter

A PostgreSQL SQL syntax beautifier that can work as a console program or as a CGI. On-line demo site at http://sqlformat.darold.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to preserve as least 1 newline between comments?

Norlandz opened this issue · comments

How to preserve as least 1 newline between comments?

Give:

-- comment AA


-- comment BB
-- comment CC

drop table if exists accounts;

-- comment DD

Expected output:

remove extra newlines between comments &/ statements;
but preserve at least one.

-- comment AA

-- comment BB
-- comment CC

drop table if exists accounts;

-- comment DD

Current output:

All newlines between comments &/ statements are removed.

-- comment AA
-- comment BB
-- comment CC
drop table if exists accounts;

-- comment DD