summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2019-10-07 12:01:03 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2019-10-07 12:01:17 (GMT)
commit1f9cf874062a81bdcdbb06fce030fa887ead15a9 (patch) (side-by-side diff)
tree924fb943718cd08f37cf9ee887fc7e6cc4e44dc2
parent2e8ca04ce3f407da2bd9e892d1498de05d18f559 (diff)
downloadmansrv-1f9cf874062a81bdcdbb06fce030fa887ead15a9.tar.gz
mansrv-1f9cf874062a81bdcdbb06fce030fa887ead15a9.tar.bz2
Allow for multiple template escapes on a single line.HEADmaster
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xmansrv2
1 files changed, 1 insertions, 1 deletions
diff --git a/mansrv b/mansrv
index b4d3cca..25e56e7 100755
--- a/mansrv
+++ b/mansrv
@@ -128,25 +128,25 @@ sub interpret_file($$) {
open($ifd, $file) or syserror("cannot open $file: $!");
my $s = new Safe 'Root' ;
%{$s->varglob('ENV')} = %ENV;
${$s->varglob('TITLE')} = $ARGV[1];
${$s->varglob('SECTION')} = $ARGV[0];
${$s->varglob('PACKAGE')} = $package_name;
${$s->varglob('VERSION')} = $VERSION;
${$s->varglob('SERVER')} = "$ENV{REQUEST_SCHEME}://$ENV{SERVER_NAME}";
while (<$ifd>) {
chomp;
- s/\{%(.*)%\}/expand_template($s, $1, $file, $.)/ex;
+ s/\{%(.*?)%\}/expand_template($s, $1, $file, $.)/gex;
print $ofd "$_\n";
}
close($ifd);
}
sub interpret {
my $fd = shift;
foreach my $file (@_) {
interpret_file($fd, $file);
}
}

Return to:

Send suggestions and report system problems to the System administrator.