2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

pre-commit: fixing the warning text (Forum #122633)

git-svn-id: https://svn.fhem.de/fhem/trunk@24874 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-08-26 16:01:11 +00:00
parent 9a313beef3
commit 9a2bec0568
2 changed files with 5 additions and 7 deletions

View File

@ -189,10 +189,9 @@ generateModuleCommandref($$;$$)
$hasLink = ($l =~ m/<a (name|id)="$mod"/) if(!$hasLink);
foreach $tag (TAGS) {
if($l =~ m/<$tag ([^>]+)>/i) {
my $attr = $1;
print "*** $lang $mod line $line: $tag with attributes (apart ".
"from class) is not allowed\n"
if($attr !~ m/class="[^"]*"/ && !$noWarnings);
print "*** $lang $mod line $line: $tag with attributes".
" is not allowed\n"
if(!$noWarnings);
}
$tagcount{$tag} +=()= ($l =~ /<$tag( [^>]+)?>/gi);
$tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi);

View File

@ -141,9 +141,8 @@ foreach my $row (split("\n", $fList)) {
foreach $tag (TAGS) {
my $ot = ($tagcount{$tag} ? $tagcount{$tag} : 0);
if($l =~ m/<$tag ([^>]+)>/i) {
my $attr = $1;
err $fName, "$lang line $line: $tag with attributes (apart ".
"from class) is not allowed\n" ;
err $fName, "$lang line $line: $tag with attributes".
" is not allowed\n" ;
}
$tagcount{$tag} +=()= ($l =~ /<$tag( [^>]+)?>/gi);
$tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi);