summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-01-30 22:40:05 -0500
committerBruce Momjian <bruce@momjian.us>2014-01-30 22:40:05 -0500
commitdb98b313296d1d50f357d58fbcb6572ed1ab018f (patch)
tree108ad7892374b378bcc14420525465a48a0c982d /src
parent58274728fb8e087049df67c0eee903d9743fdeda (diff)
pgindent: preserve blank lines around #else/#endif
This requires a new version of pg_bsd_indent, version 1.3, to be downloaded.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/pgindent/pgindent8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index bc83c1a95c0..8e45b18a9ab 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -12,7 +12,7 @@ use IO::Handle;
use Getopt::Long;
# Update for pg_bsd_indent version
-my $INDENT_VERSION = "1.2";
+my $INDENT_VERSION = "1.3";
my $devnull = File::Spec->devnull;
# Common indent settings
@@ -286,12 +286,6 @@ sub post_indent
# Reduce whitespace between #endif and comments to one tab
$source =~ s!^\#endif[ \t]+/\*!#endif /*!gm;
- # Remove blank line(s) before #else, #elif, and #endif
- $source =~ s!\n\n+(\#else|\#elif|\#endif)!\n$1!g;
-
- # Add blank line before #endif if it is the last line in the file
- $source =~ s!\n(#endif.*)\n\z!\n\n$1\n!;
-
## Functions
# Work around misindenting of function with no variables defined.