X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2eea320b674870956f6ad6c7b377b158cec2d624..89750d4bf7a5acc4b8bba48e4a7a7934100f8c41:/IkiWiki/Plugin/highlight.pm?ds=sidebyside 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){