]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/smiley.pm
fix error message to include url
[git.ikiwiki.info.git] / IkiWiki / Plugin / smiley.pm
index 85a719337518fc3443b501318ce54ec3847af63b..14b8cacf8c3385dc01a351474c2119ac942d2d80 100644 (file)
@@ -34,10 +34,10 @@ sub setup () { #{{{
 sub filter (@) { #{{{
        my %params=@_;
        
-       $params{content} =~ s{(?<=\s)(\\?)$smiley_regexp(?=\s)}{
-               $1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, 0, 0, $2)
+       $params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{
+               $1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, linktext => $2)
        }egs;
-       
+
        return $params{content};
 } # }}}