aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-17 13:11:47 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-17 13:11:47 -0400
commitc4f124d78a4c6e227f2017452821c95c35544860 (patch)
tree945e4b22a0296b82fadac9516554edad75751d51 /IkiWiki
parent16c44bd209506de96e4fe5a5c007a456badc053d (diff)
downloadikiwiki-c4f124d78a4c6e227f2017452821c95c35544860.tar
ikiwiki-c4f124d78a4c6e227f2017452821c95c35544860.tar.gz
fix pos setting
What was really going on is that expanding a smiley modified the string and reset the match process. Force set pos so it continues on from the expanded smiley.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/smiley.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm
index 96d7f5900..50f268627 100644
--- a/IkiWiki/Plugin/smiley.pm
+++ b/IkiWiki/Plugin/smiley.pm
@@ -79,11 +79,12 @@ MATCH: while (m{(?:^|(?<=\s|>))(\\?)$smiley_regexp(?:(?=\s|<)|$)}g) {
substr($_, $spos, length($smiley))=
htmllink($params{page}, $params{destpage},
$smileys{$smiley}, linktext => $smiley);
+ pos=$epos+1;
}
# Breaks out at end, otherwise it will scan through again,
# replacing de-escaped ones.
- last unless defined pos;
+ #last unless defined pos;
}
return $_;