diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-01 00:15:19 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-01 00:15:19 +0100 |
commit | 1511fba8e989df3dcdb4f6253e6c696a2e1944b7 (patch) | |
tree | 4bf5cb3695985e69b51f24cdbaf459364bc41d36 | |
parent | b44b23f79590d2bd9874985a253f247f33d03b20 (diff) | |
download | mht-1511fba8e989df3dcdb4f6253e6c696a2e1944b7.tar.gz |
Fix closing tag not being interpolated
-rwxr-xr-x | mh | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -12,7 +12,7 @@ use Text::ParseWords qw/quotewords/; # 1.1 Global program state my $empty = ''; # currently buffered empty lines -my $opel = ''; # currently opened element +my $close = ''; # buffered closing tag for currently opened element # 1.2 Elements @@ -58,11 +58,8 @@ sub request { $empty = ''; # Close currently open block element, open new - if (exists $blels{$opel}) { - print end($blels{$opel}) . "\n"; - $opel = ''; - } - $opel = $elkey; + print $close; + $close = interpol(end($blels{$elkey}), @argv) . "\n"; print interpol(start($blels{$elkey}), @argv) . "\n"; } elsif (exists $inels{$elkey}) { @@ -113,7 +110,4 @@ while (<>) { } # 2.2 Close currently open block element -if (exists $blels{$opel}) { - print end($blels{$opel}) . "\n"; - $opel = ''; -} +print $close; |