]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/highlight.pm
document that checkcontent behaves differently for comments
[git.ikiwiki.info.git] / IkiWiki / Plugin / highlight.pm
index f6908921ed6ec3ca770ffefa2f6e8f11a939d286..c974db56227d67da0fb1f99b00d2fbad4a0ba2ef 100644 (file)
@@ -54,7 +54,13 @@ sub checkconfig () {
        eval q{use highlight};
        if (highlight::DataDir->can('new')) {
                $data_dir=new highlight::DataDir();
-               $data_dir->searchDataDir("");
+               if ( $data_dir->can('initSearchDirectories') ) {
+                       # 4.0+
+                       $data_dir -> initSearchDirectories("");
+               } else {
+                       # pre-4.0
+                       $data_dir -> searchDataDir("");
+               }
        } else {
                $data_dir=undef;
        }
@@ -62,10 +68,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}=