X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1a785a311e8dfa3de88bb36410b8a3a817b9b533..505ac46c2625dea7359a24f3ed253bc1d4081cd1:/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 <pre>
 		if ($data_dir){