X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8fa477fa28afdee85a973ffe2447538d3371f025..d93aaed7919f0449d387aed6c6ee3aaff85a12eb:/IkiWiki/Plugin/smiley.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index e85abbb85..932c2c4fe 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -3,12 +3,13 @@ package IkiWiki::Plugin::smiley; use warnings; use strict; -use IkiWiki; +use IkiWiki 2.00; 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};