mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
commandref_join.pl: add =end check (Forum #101114)
git-svn-id: https://svn.fhem.de/fhem/trunk@19539 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9e1cc1870b
commit
bfd7ffc935
@ -154,6 +154,7 @@ generateModuleCommandref($$;$$)
|
||||
my $docCount = 0;
|
||||
my $hasLink = 0;
|
||||
my $dosMode = 0;
|
||||
my $nrEnd = 0;
|
||||
while(my $l = <$modFh>) {
|
||||
$line++;
|
||||
|
||||
@ -163,9 +164,11 @@ generateModuleCommandref($$;$$)
|
||||
print "*** $lang $mod: nonempty line after =begin html ignored\n"
|
||||
if($l =~ m/^...*$/);
|
||||
$skip = 0; $line++;
|
||||
$nrEnd++;
|
||||
|
||||
} elsif($l =~ m/^=end html$suffix$/) {
|
||||
$skip = 1;
|
||||
$nrEnd--;
|
||||
print $fh "<p>" if($fh);
|
||||
|
||||
} elsif(!$skip) {
|
||||
@ -222,4 +225,7 @@ EOF
|
||||
"($tagcount{$tag}, last line ok: $llwct{$tag})\n")
|
||||
if($tagcount{$tag} && !$noWarnings);
|
||||
}
|
||||
|
||||
print "*** $lang $fPath: =end html$suffix: ".($nrEnd>0 ? "missing":"there are too many")."\n"
|
||||
if($nrEnd);
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ foreach my $row (split("\n", $fList)) {
|
||||
my $docCount = 0;
|
||||
my $hasLink = 0;
|
||||
my $hasSummary = 0;
|
||||
my $nrEnd = 0;
|
||||
|
||||
while(my $l = <MOD>) {
|
||||
$line++;
|
||||
@ -117,9 +118,11 @@ foreach my $row (split("\n", $fList)) {
|
||||
err($fName, "$lang: nonempty line after =begin html.")
|
||||
if($l =~ m/^...*$/);
|
||||
$skip = 0; $line++;
|
||||
$nrEnd++;
|
||||
|
||||
} elsif($l =~ m/^=end html$suffix$/) {
|
||||
$skip = 1;
|
||||
$nrEnd--;
|
||||
|
||||
} elsif(!$skip) {
|
||||
$docCount++;
|
||||
@ -144,6 +147,8 @@ foreach my $row (split("\n", $fList)) {
|
||||
if(!$suffix && $docCount && !$hasLink);
|
||||
err $fName, "$lang: No summary description found"
|
||||
if(!$suffix && $docCount && !$hasSummary);
|
||||
err $fName, "$lang: =end html$suffix: ".($nrEnd>0 ? "missing":"there are too many")."\n"
|
||||
if($nrEnd);
|
||||
|
||||
foreach $tag (TAGS) {
|
||||
err $fName, "$lang: Unbalanced $tag ($tagcount{$tag}, last line ok: $llwct{$tag})"
|
||||
|
Loading…
x
Reference in New Issue
Block a user