Skip to content

Commit db98b31

Browse files
committed
pgindent: preserve blank lines around #else/#endif
This requires a new version of pg_bsd_indent, version 1.3, to be downloaded.
1 parent 5827472 commit db98b31

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/tools/pgindent/pgindent

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use IO::Handle;
1212
use Getopt::Long;
1313

1414
# Update for pg_bsd_indent version
15-
my $INDENT_VERSION = "1.2";
15+
my $INDENT_VERSION = "1.3";
1616
my $devnull = File::Spec->devnull;
1717

1818
# Common indent settings
@@ -286,12 +286,6 @@ sub post_indent
286286
# Reduce whitespace between #endif and comments to one tab
287287
$source =~ s!^\#endif[ \t]+/\*!#endif /*!gm;
288288

289-
# Remove blank line(s) before #else, #elif, and #endif
290-
$source =~ s!\n\n+(\#else|\#elif|\#endif)!\n$1!g;
291-
292-
# Add blank line before #endif if it is the last line in the file
293-
$source =~ s!\n(#endif.*)\n\z!\n\n$1\n!;
294-
295289
## Functions
296290

297291
# Work around misindenting of function with no variables defined.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy