X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dae0f48e91304afcb6ebe0936360e51b22a56548..a961f159af139591210d4b4b006a19fbfd86d005:/IkiWiki/Plugin/smiley.pm diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 0c6f5d427..14b8cacf8 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -19,7 +19,7 @@ sub setup () { #{{{ } if (! %smileys) { - debug("failed to parse any smileys, disabling plugin"); + debug(gettext("failed to parse any smileys, disabling plugin")); return; } @@ -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}; } # }}}