X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2e4340766e792d93f2ce0a86f5c8d8042bbee789..4c88a4d9d8fb62e8e4bea068a2546059bd1fa306:/IkiWiki/Plugin/highlight.pm diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index 4e86207f1..fbe7ddff4 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -89,7 +89,7 @@ sub checkconfig () { id => $file, call => sub { my %params=@_; - highlight($langfile, $params{content}); + highlight($langfile, $file, $params{content}); }, longname => sprintf(gettext("Source code: %s"), $file), @opts, @@ -106,7 +106,7 @@ sub htmlizeformat { return; } - return Encode::decode_utf8(highlight($langfile, shift)); + return Encode::decode_utf8(highlight($langfile, $format, shift)); } my %ext2lang; @@ -172,6 +172,7 @@ sub ext2langfile ($) { # Interface to the highlight C library. sub highlight ($$) { my $langfile=shift; + my $extorfile=shift; my $input=shift; eval q{use highlight}; @@ -200,7 +201,7 @@ sub highlight ($$) { $gen=$highlighters{$langfile}; } - return $gen->generateString($input); + return "
".$gen->generateString($input)."
"; } 1