Skip to content

Commit

Permalink
Item12180: Make continuation accept same syntax as .spec files; optim…
Browse files Browse the repository at this point in the history
…ize sectionStack push

git-svn-id: http://svn.foswiki.org/trunk@16148 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
TimotheLitt authored and TimotheLitt committed Dec 3, 2012
1 parent cb0ae8b commit 526eb1a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/lib/Foswiki/Configure/Pluggables/AUDIT.pm
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ sub parseFile {
[ $specFile, 0, "Failed to open audit specification file: $!" ];
return 0;
}
local $/ = "\n";

my ( $open, $section, @sections, @sectionStack );

Expand All @@ -114,8 +115,10 @@ sub parseFile {

while ( $line =~ /\\$/ && !eof $sfile ) {
my $cont = <$sfile>;
$cont =~ s/\r+\n//g;
$cont =~ s/^#// if ( $line =~ /^#/ );
$cont =~ s/^\s*//;
chop $line;
chomp $line;
$line .= $cont unless ( $line =~ /^#/ );
}
if ( $line =~ /\\$/ ) {
Expand Down Expand Up @@ -152,7 +155,6 @@ sub parseFile {
next;
}
$sectionStack[0]->addChild($section);
unshift @sectionStack, $section;
}
else {
unless ( $depth == 1 ) {
Expand All @@ -165,9 +167,9 @@ sub parseFile {
undef $open;
next;
}
unshift @sectionStack, $section;
push @sections, $section;
}
unshift @sectionStack, $section;
$open = $section;
next;
}
Expand Down

0 comments on commit 526eb1a

Please sign in to comment.