mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 22:26:04 +00:00
contrib/pre-commit: update tag-counting (Forum #84939)
git-svn-id: https://svn.fhem.de/fhem/trunk@16267 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
641dbe0ff4
commit
b7c0311103
@ -12,7 +12,7 @@ my $arg="-t $txn";
|
||||
#my $arg="-r $txn"; # local testing
|
||||
my @lang = ("EN", "DE");
|
||||
my $exitCode = 0;
|
||||
use constant TAGS => qw{ul li code b i u td tr table div};
|
||||
use constant TAGS => qw{ul li code b i u table tr td div h4 h3};
|
||||
|
||||
my $log = `$svnlook log $arg $repos`;
|
||||
if($log !~ m/^.*:.*$/s) {
|
||||
@ -124,7 +124,11 @@ foreach my $row (split("\n", $fList)) {
|
||||
foreach $tag (TAGS) {
|
||||
my $ot = ($tagcount{$tag} ? $tagcount{$tag} : 0);
|
||||
$tagcount{$tag} +=()= ($l =~ /<$tag>/gi);
|
||||
$tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi) if($tagcount{$tag} > 0);
|
||||
$tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi);
|
||||
if($tagcount{$tag} < 0) {
|
||||
print "*** $lang $fPath: negative tagcount for $tag, line $line\n";
|
||||
$tagcount{$tag} = 0;
|
||||
}
|
||||
$llwct{$tag} = $line if(!$llwct{$tag} || ($ot && !$tagcount{$tag}));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user