diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-25 22:37:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-25 22:37:34 -0400 |
commit | 2076ed597c02bfede9063c3d40f4b855d4e8f8b8 (patch) | |
tree | fdff58f7baddd1ab9d5fe946825e15dc516b16cf /IkiWiki/Plugin/highlight.pm | |
parent | 38f0bec34560d2258a2d690676987b12ab184490 (diff) |
txt: Fix display when used inside a format directive.
txt's use of a format hook can't work in that case, so it needs to use a
htmlizeformat hook in this case to handle wrapping the text in pre tags.
Diffstat (limited to 'IkiWiki/Plugin/highlight.pm')
-rw-r--r-- | IkiWiki/Plugin/highlight.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index d4ade0a7b..5674f0b4a 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -10,8 +10,8 @@ sub import { hook(type => "getsetup", id => "highlight", call => \&getsetup); hook(type => "checkconfig", id => "highlight", call => \&checkconfig); # this hook is used by the format plugin - hook(type => "htmlizefallback", id => "highlight", call => - \&htmlizefallback); + hook(type => "htmlizeformat", id => "highlight", call => + \&htmlizeformat); } sub getsetup () { @@ -79,7 +79,7 @@ sub checkconfig () { } } -sub htmlizefallback { +sub htmlizeformat { my $format=lc shift; my $langfile=ext2langfile($format); |