X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/dadde570a1f735143e9f5909ede743b9aed97444..a7e153df8206c4916988ec8627f8742b41e6442a:/IkiWiki/Plugin/highlight.pm diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index ce919748a..04c554ac4 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -62,10 +62,10 @@ sub checkconfig () { if (! exists $config{filetypes_conf}) { if (! $data_dir ) { $config{filetypes_conf}= "/etc/highlight/filetypes.conf"; - } elsif ( $data_dir -> can('searchFile') ) { - # 3.18 + + } elsif ( $data_dir -> can('getFiletypesConfPath') ) { + # 3.14 + $config{filetypes_conf}= - $data_dir -> searchFile("filetypes.conf"); + $data_dir -> getFiletypesConfPath("filetypes"); } else { # 3.9 + $config{filetypes_conf}= @@ -201,7 +201,9 @@ sub highlight ($$) { my $gen; if (! exists $highlighters{$langfile}) { + no warnings 'once'; $gen = highlight::CodeGenerator::getInstance($highlight::XHTML); + use warnings; $gen->setFragmentCode(1); # generate html fragment $gen->setHTMLEnclosePreTag(1); # include stylish
if ($data_dir){