How to preserve as least 1 newline between comments?
Open
Nobody has claimed this yet.
- Dominant language
- PLpgSQL
- Stars
- 2k
- Forks
- 121
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 7
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the supplied SQL example as the reproduction case and inspect pgFormatter's handling of blank lines between comments and statements. Run the formatter on that input; done means extra newlines are removed while at least one blank line remains where shown in the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100