From 73dd85db42b8693c9c4dfa4146379bcb684bf1d0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 26 Aug 2021 16:01:11 +0000 Subject: [PATCH] pre-commit: fixing the warning text (Forum #122633) git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24874 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/commandref_join.pl | 7 +++---- contrib/pre-commit | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/contrib/commandref_join.pl b/contrib/commandref_join.pl index 86fa66a5b..cf7c181ae 100755 --- a/contrib/commandref_join.pl +++ b/contrib/commandref_join.pl @@ -189,10 +189,9 @@ generateModuleCommandref($$;$$) $hasLink = ($l =~ m/]+)>/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); diff --git a/contrib/pre-commit b/contrib/pre-commit index f6fe8354a..4c4899d01 100755 --- a/contrib/pre-commit +++ b/contrib/pre-commit @@ -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);