diff options
Diffstat (limited to 'databases/pgbadger/files/patch-pgbadger')
-rw-r--r-- | databases/pgbadger/files/patch-pgbadger | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/databases/pgbadger/files/patch-pgbadger b/databases/pgbadger/files/patch-pgbadger new file mode 100644 index 000000000000..f469e209e9ea --- /dev/null +++ b/databases/pgbadger/files/patch-pgbadger @@ -0,0 +1,22 @@ +fix Possible precedence problem between ! and string eq + +--- pgbadger.orig 2025-07-13 10:08:32 UTC ++++ pgbadger +@@ -20462,7 +20462,7 @@ sub highlight_code + # lowercase/uppercase known functions or words followed by an open parenthesis + # if the token is not a keyword, an open parenthesis or a comment + if (($self->_is_function( $token, $last_token, $next_token ) && $next_token eq '(') +- || (!$self->_is_keyword( $token, $next_token, $last_token ) && !$next_token eq '(' ++ || (!$self->_is_keyword( $token, $next_token, $last_token ) && $next_token ne '(' + && $token ne '(' && !$self->_is_comment( $token )) ) { + if ($self->{ 'uc_functions' } == 1) { + $token = '<span class="kw2_l">' . $token . '</span>'; +@@ -23062,7 +23062,7 @@ sub _add_token + # if the token is not a keyword, an open parenthesis or a comment + my $fct = $self->_is_function( $token, $last_token, $next_token ) || ''; + if (($fct and $next_token eq '(' and defined $last_token and uc($last_token) ne 'CREATE') +- or (!$self->_is_keyword( $token, $next_token, $last_token ) and !$next_token eq '(' ++ or (!$self->_is_keyword( $token, $next_token, $last_token ) and $next_token ne '(' + and $token ne '(' and !$self->_is_comment( $token )) ) + { + $token =~ s/$fct/\L$fct\E/i if ( $self->{ 'uc_functions' } == 1 ); |