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