diff options
Diffstat (limited to 'src/tools/pgindent')
-rwxr-xr-x | src/tools/pgindent/pgindent | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index eb0ce1590b5..e85a6723b72 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -38,8 +38,10 @@ do # mark some comments for special treatment later sed 's;/\* *---;/*---X_X;g' | # workaround for indent bug with 'else' handling - sed 's;\([} ]\)else\([ ]*\)\(/\*.*\)$;\1else\ -\2\3;g' | + sed 's;\([ ]*\)else[ ]*\(/\*.*\)$;\1else\ +\1\2;g' | + sed 's;\([ ]*\)\(}[ ]\)else[ ]*\(/\*.*\)$;\1\2else\ +\1\3;g' | detab -t4 -qc | # work around bug where function that defines no local variables misindents # switch() case lines and line after #else. Do not do for struct/enum. |