Skip to content

Commit

Permalink
replace all special tags in a line
Browse files Browse the repository at this point in the history
  • Loading branch information
rahcola committed May 18, 2014
1 parent 744813e commit 96bc77f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filter.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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/;
Expand All @@ -33,5 +33,5 @@ BEGIN
s#<$tag>#$replacement#;
}

s#</$tag>#\n</section>#;
s#</$tag>#</section>#g;
}

0 comments on commit 96bc77f

Please sign in to comment.