diff --git a/fhem/contrib/commandref_join.pl b/fhem/contrib/commandref_join.pl index 9af46b98e..126084886 100755 --- a/fhem/contrib/commandref_join.pl +++ b/fhem/contrib/commandref_join.pl @@ -173,9 +173,19 @@ generateModuleCommandref($$;$$) } elsif(!$skip) { print $fh $l if($fh); + if($l =~ m,INSERT_DOC_FROM: ([^ ]+)/([^ /]+) ,) { + my ($dir, $re) = ($1, $2); + if(opendir(DH, $dir)) { + foreach my $file (grep { m/^$2$/ } readdir(DH)) { + generateModuleCommandref("$dir/$file", $lang, $fh, 1); + } + closedir(DH); + } + } chkAndGenLangLinks($l, $lang, $fh); $docCount++; + next if($noWarnings); $hasLink = ($l =~ m/]+)>/i) { @@ -194,15 +204,6 @@ generateModuleCommandref($$;$$) $llwct{$tag} = $line if(!$tagcount{$tag}); } - if($l =~ m,INSERT_DOC_FROM: ([^ ]+)/([^ /]+) ,) { - my ($dir, $re) = ($1, $2); - if(opendir(DH, $dir)) { - foreach my $file (grep { m/^$2$/ } readdir(DH)) { - generateModuleCommandref("$dir/$file", $lang, $fh, 1); - } - closedir(DH); - } - } } } close($modFh);