X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8fa477fa28afdee85a973ffe2447538d3371f025..055179cb4cc9b8bc9b204e1a9f83b1f59e13824e:/IkiWiki/Plugin/smiley.pm 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};