]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/smiley.pm
Whoops, copyright 2009. /usr/bin/perl for the interpreter like other plugins.
[git.ikiwiki.info.git] / IkiWiki / Plugin / smiley.pm
index 70b8cef742c61db5c2c2a1c58650a702ade02f3d..0d77916d0d3d633e7656d79527cce12647089d47 100644 (file)
@@ -3,7 +3,7 @@ package IkiWiki::Plugin::smiley;
 
 use warnings;
 use strict;
-use IkiWiki 2.00;
+use IkiWiki 3.00;
 
 my %smileys;
 my $smiley_regexp;
@@ -87,10 +87,10 @@ MATCH:      while (m{(?:^|(?<=\s|>))(\\?)$smiley_regexp(?:(?=\s|<)|$)}g) {
                }
                else {
                        # Replace the smiley with its expanded value.
-                       substr($_, $spos, length($smiley))=
-                               htmllink($params{page}, $params{destpage},
+                       my $link=htmllink($params{page}, $params{destpage},
                                         $smileys{$smiley}, linktext => $smiley);
-                       pos=$epos+1;
+                       substr($_, $spos, length($smiley))=$link;
+                       pos=$epos+length($link);
                }
        }