diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-14 00:11:19 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-14 00:11:19 +0000 |
commit | 6fc66f83deba6df8abdf4bc117f8da7efbd7cbc1 (patch) | |
tree | b65261ec25063bea8fd8e8b4793917fea65768de /IkiWiki/Plugin/smiley.pm | |
parent | 433832b020c6464938992293c15cc8cdcfbd18f7 (diff) | |
download | ikiwiki-6fc66f83deba6df8abdf4bc117f8da7efbd7cbc1.tar ikiwiki-6fc66f83deba6df8abdf4bc117f8da7efbd7cbc1.tar.gz |
* Fix the template, toggle, and conditional plugins to filter text before
preprocessing it.
* Fix smiley plugin to support smileys at the very beginning or end of
the content.
Diffstat (limited to 'IkiWiki/Plugin/smiley.pm')
-rw-r--r-- | IkiWiki/Plugin/smiley.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 85a719337..45d00abea 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -34,10 +34,10 @@ sub setup () { #{{{ sub filter (@) { #{{{ my %params=@_; - $params{content} =~ s{(?<=\s)(\\?)$smiley_regexp(?=\s)}{ + $params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{ $1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, 0, 0, $2) }egs; - + return $params{content}; } # }}} |