X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..279db7860dc98bedbd8333bb7de57251dcfb223d:/IkiWiki/Plugin/smiley.pm diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 1a9833e6e..932c2c4fe 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -9,6 +9,7 @@ my %smileys; my $smiley_regexp; sub import { #{{{ + add_underlay("smiley"); hook(type => "filter", id => "smiley", call => \&filter); } # }}} @@ -36,7 +37,7 @@ sub filter (@) { #{{{ build_regexp() unless defined $smiley_regexp; $params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{ - $1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, linktext => $2) + $1 ? $2 : htmllink($params{page}, $params{destpage}, $smileys{$2}, linktext => $2) }egs if length $smiley_regexp; return $params{content};