From 6791f8b769fd5a82392a3bd2b9d14daa78577a79 Mon Sep 17 00:00:00 2001
From: William S Fulton
Date: Mon, 15 Apr 2019 19:31:32 +0100
Subject: [PATCH] Add linkchecker3 make target to check internal links
Make sure all internal links use # anchors which are needed for wkhtmltopdf
---
Doc/Manual/Javascript.html | 2 +-
Doc/Manual/Makefile | 6 ++++++
Doc/Manual/SWIG.html | 2 +-
Doc/Manual/SWIGPlus.html | 6 +++---
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Doc/Manual/Javascript.html b/Doc/Manual/Javascript.html
index 021d4e380..417ee4585 100644
--- a/Doc/Manual/Javascript.html
+++ b/Doc/Manual/Javascript.html
@@ -1,7 +1,7 @@
-
+
diff --git a/Doc/Manual/Makefile b/Doc/Manual/Makefile
index ee9a0af34..9505adb91 100644
--- a/Doc/Manual/Makefile
+++ b/Doc/Manual/Makefile
@@ -89,3 +89,9 @@ linkchecker2:
cp *.png linkchecker-tmp
(cd linkchecker-tmp && linkchecker --config=../linkchecker.config -F text --no-warnings SWIGDocumentation.html)
+# Simple check for relative links (there shouldn't be any), they don't translate properly creating the .pdf doc
+# with wkhtmltopdf. For example, href="SWIG.html" needs to be href="SWIG.html#SWIG"
+linkchecker3:
+ @echo "The following list should just contain SWIGDocumentation.html and SWIGDocumentation.pdf,"
+ @echo "as all links should have an anchor (with a #) or be a full url beginning http."
+ grep 'href="' *.html | sed -e 's/.*href="\(.*\)">.*$$/\1/' | grep -v "#" | grep -v "^http" | grep -v "^style.css"
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index 79d52ef56..64db9c6c6 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -1826,7 +1826,7 @@ When wrapping C code, simple use of identifiers/symbols with %rename us
When wrapping C++ code, simple use of simple identifiers/symbols with %rename might be too
limiting when using C++ features such as function overloading, default arguments, namespaces, template specialization etc.
If you are using the %rename directive and C++, make sure you read the
-SWIG and C++ chapter and in particular the section on
+SWIG and C++ chapter and in particular the section on
Renaming and ambiguity resolution
for method overloading and default arguments.
diff --git a/Doc/Manual/SWIGPlus.html b/Doc/Manual/SWIGPlus.html
index 8ad9daedf..3a50cf8ce 100644
--- a/Doc/Manual/SWIGPlus.html
+++ b/Doc/Manual/SWIGPlus.html
@@ -88,9 +88,9 @@
This chapter describes SWIG's support for wrapping C++.
It is mostly concerned about C++ as defined by the C++ 98 and 03 standards.
For additions to the original C++ standard, please read the
-SWIG and C++11,
-SWIG and C++14 and
-SWIG and C++17 chapters.
+SWIG and C++11,
+SWIG and C++14 and
+SWIG and C++17 chapters.
As a prerequisite,
you should first read the chapter SWIG Basics to see
how SWIG wraps ANSI C. Support for C++ builds upon ANSI C