From 96bc77f8e83bda2ed778697827472d93c465230e Mon Sep 17 00:00:00 2001 From: Jani Rahkola Date: Sun, 18 May 2014 12:28:27 +0300 Subject: [PATCH] replace all special tags in a line --- filter.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter.pl b/filter.pl index 6e8671a..b45b020 100755 --- a/filter.pl +++ b/filter.pl @@ -23,7 +23,7 @@ BEGIN my $class = $tags{$tag}; my $title = $titles{$tag}; - if (/<$tag>/) { + while (/<$tag>/) { my $count = ($counts{$tag} ||= 1)++; $title =~ s/%n/$count/; @@ -33,5 +33,5 @@ BEGIN s#<$tag>#$replacement#; } - s##\n#; + s###g; }