You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2018/09/25 14:28:23 UTC
svn commit: r1841937 -
/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm
Author: hege
Date: Tue Sep 25 14:28:23 2018
New Revision: 1841937
URL: http://svn.apache.org/viewvc?rev=1841937&view=rev
Log:
Fix indentation
Modified:
spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm
Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm?rev=1841937&r1=1841936&r2=1841937&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf/Parser.pm Tue Sep 25 14:28:23 2018
@@ -259,28 +259,28 @@ sub parse {
while (defined ($line = shift @conf_lines)) {
local ($1); # bug 3838: prevent random taint flagging of $1
- if (index($line,'#') > -1) {
- # bug 5545: used to support testing rules in the ruleqa system
- if ($keepmetadata && $line =~ /^\#testrules/) {
- $self->{file_scoped_attrs}->{testrules}++;
- next;
- }
+ if (index($line,'#') > -1) {
+ # bug 5545: used to support testing rules in the ruleqa system
+ if ($keepmetadata && $line =~ /^\#testrules/) {
+ $self->{file_scoped_attrs}->{testrules}++;
+ next;
+ }
- # bug 6800: let X-Spam-Checker-Version also show what sa-update we are at
- if ($line =~ /^\# UPDATE version (\d+)$/) {
- for ($self->{currentfile}) { # just aliasing, not a loop
- $conf->{update_version}{$_} = $1 if defined $_ && $_ ne '(no file)';
+ # bug 6800: let X-Spam-Checker-Version also show what sa-update we are at
+ if ($line =~ /^\# UPDATE version (\d+)$/) {
+ for ($self->{currentfile}) { # just aliasing, not a loop
+ $conf->{update_version}{$_} = $1 if defined $_ && $_ ne '(no file)';
+ }
}
- }
- $line =~ s/(?<!\\)#.*$//; # remove comments
- $line =~ s/\\#/#/g; # hash chars are escaped, so unescape them
- }
+ $line =~ s/(?<!\\)#.*$//; # remove comments
+ $line =~ s/\\#/#/g; # hash chars are escaped, so unescape them
+ }
- if ($line =~ tr{ \t\r\n\f}{}) {
- $line =~ s/^\s+//; # remove leading whitespace
- $line =~ s/\s+$//; # remove tailing whitespace
- }
+ if ($line =~ tr{ \t\r\n\f}{}) {
+ $line =~ s/^\s+//; # remove leading whitespace
+ $line =~ s/\s+$//; # remove tailing whitespace
+ }
next unless($line); # skip empty lines
# handle i18n