We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ef74fe commit c29797dCopy full SHA for c29797d
src/tools/pgindent/pgindent
@@ -1531,6 +1531,19 @@ do
1531
if (NR >= 1 && skips <= 2)
1532
print line2;
1533
}' |
1534
+# remove trailing blank lines, helps with adding blank before trailing #endif
1535
+ awk ' BEGIN {blank_lines = 0;}
1536
+ {
1537
+ line1 = $0;
1538
+ if (line1 ~ /^$/)
1539
+ blank_lines++;
1540
+ else
1541
1542
+ for (; blank_lines > 0; blank_lines--)
1543
+ printf "\n";
1544
+ print line1;
1545
+ }
1546
+ }' |
1547
# remove blank line before #endif
1548
awk ' BEGIN {line1 = ""; line2 = ""; skips = 0}
1549
{
0 commit comments