Permalink
Browse files

Log word as replaced only if it is really replaced!

  • Loading branch information...
miso-belica committed Dec 12, 2011
1 parent 9777be9 commit 02ebf6c6bdd0b09db3eac9295416a914056cc5d7
Showing with 1 addition and 1 deletion.
  1. +1 −1 HTMLPage.pm
View
@@ -82,14 +82,14 @@ sub inject_word_into_replacement {
if($self->get_replacements_count() >= MAX_REPLACEMENTS) {
return $word;
}
- push(@{$self->{'word_replacements'}}, $lower_cased_word);
# print STDERR "!!!$lower_cased_word!!!\n";
my $replacement = $self->{'replacements'}{$lower_cased_word};
if(!defined($replacement)) {
return $word;
}
+ push(@{$self->{'word_replacements'}}, $lower_cased_word);
$replacement =~ s/\{keyword\}/$word/;
return $replacement;
}

0 comments on commit 02ebf6c

Please sign in to comment.