summaryrefslogtreecommitdiff
path: root/scripts/otp_html_check
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/otp_html_check')
-rwxr-xr-xscripts/otp_html_check26
1 files changed, 12 insertions, 14 deletions
diff --git a/scripts/otp_html_check b/scripts/otp_html_check
index 3606ed22d4..3b9df7f8c6 100755
--- a/scripts/otp_html_check
+++ b/scripts/otp_html_check
@@ -16,7 +16,7 @@ undef $/; # No record separator reading files
###########################################################################
#
# When we talk about "a page" we mean the actual page/file
-# When we talk about "a link" we mean a referense to a page/file.
+# When we talk about "a link" we mean a reference to a page/file.
# All links/URL's start with an slash except the top link that is
# the empty string.
#
@@ -88,7 +88,7 @@ push(@links,["","/doc/index.html"]) unless @links;
###########################################################################
#
# Traverse all files and directories and put all possible URL's into
-# the set %pages. When we later find a referense to a page that URL
+# the set %pages. When we later find a reference to a page that URL
# is removed from the set. When we have followed all links the set
# contains the pages never visited.
#
@@ -205,7 +205,7 @@ sub get_page_links {
# FIXME: Now we have the raw links, if we want to complain about
# spaces etc this is the time.
- # Remove referenses to the same page FIXME??? Was removed , why...
+ # Remove references to the same page FIXME??? Was removed , why...
# @links = grep {$_ and $_ !~ /^\#/} @links;
# Find the URL to the current directory
@@ -284,7 +284,7 @@ sub normalize_link {
# The empty link is a reference to URL directory
return $rpath;
} elsif ($link =~ /^#(.*)$/s) {
- # Lokal reference to anchor
+ # Local reference to anchor
my $anchor = $1;
$anchor =~ s/%([\da-fA-F]{2})/chr(hex($1))/eg; # Translate hex to char
$anchor =~ s/&lt;/</g; #
@@ -371,16 +371,7 @@ sub expand_link {
#
###########################################################################
-if (keys %missing) {
- print "\n\n\n**** Broken links\n\n";
- foreach (sort keys %missing) {
- my ($page,$link) = split($;);
- print qq(Broken Link: $page -> "$link"\n);
- }
-}
-
-
-# Entrys in %pages that has the value 0 is not visited
+# Entries in %pages that has the value 0 is not visited
if (keys %pages) {
print "\n\n\n**** Files not used (that I can see)\n\n";
foreach my $page (sort keys %pages) {
@@ -396,6 +387,13 @@ if (keys %pages) {
}
}
+if (keys %missing) {
+ print "\n\n\n**** Broken links\n\n";
+ foreach (sort keys %missing) {
+ my ($page,$link) = split($;);
+ print qq(Broken Link: $page -> "$link"\n);
+ }
+}
# Remove all references that has a matching NAME=....
map {delete $anchor_refs{$_}} keys %anchor_defs;