Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c44bd
)
fix pos setting
author
Joey Hess
<joey@kodama.kitenet.net>
Thu, 17 Jul 2008 17:11:47 +0000
(13:11 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Thu, 17 Jul 2008 17:11:47 +0000
(13:11 -0400)
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.
IkiWiki/Plugin/smiley.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/smiley.pm
b/IkiWiki/Plugin/smiley.pm
index 96d7f5900b2f0b109b89dc804db31a596c826edc..50f2686277afa2de60ef86bd88a870938f1c96e4 100644
(file)
--- 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 $_;