- From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 01 May 2008 11:07:20 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LinkChecker/bin In directory hutz:/tmp/cvs-serv10035 Modified Files: checklink Log Message: Fix HTML entity encoding in broken anchor output, improve it slightly. Index: checklink =================================================================== RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v retrieving revision 4.104 retrieving revision 4.105 diff -u -d -r4.104 -r4.105 --- checklink 1 May 2008 08:03:01 -0000 4.104 +++ checklink 1 May 2008 11:07:18 -0000 4.105 @@ -2027,21 +2027,14 @@ } # Fragments foreach my $f (@fragments) { + my @unique_lines = &sort_unique(keys %{$links->{$u}{fragments}{$f}}); + my $plural = (scalar(@unique_lines) > 1) ? 's' : ''; + my $unique_lines = join(', ', @unique_lines); if ($Opts{HTML}) { - printf("<li>$u<em>#%s</em> (Linked on line(s) %s)</li>\n", - # Broken fragment - $f, - # List of lines - join(', ', &sort_unique(keys %{$links->{$u}{fragments}{$f}}))); + printf("<li>%s<em>#%s</em> (line%s %s)</li>\n", + &encode($u), &encode($f), $plural, $unique_lines); } else { - my @unq = &sort_unique(keys %{$links->{$u}{fragments}{$f}}); - printf("\t%-30s\tLine%s: %s\n", - # Fragment - $f, - # Multiple? - (scalar(@unq) > 1) ? 's' : '', - # List of lines - join(', ', @unq)); + printf("\t%-30s\tLine%s: %s\n", $f, $plural, $unique_lines); } }
Received on Thursday, 1 May 2008 11:07:52 UTC