From f2edd575305fbf96581097f38250b6629d37f00b Mon Sep 17 00:00:00 2001
From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de>
Date: Mon, 6 Mar 2017 15:19:14 +0100
Subject: [PATCH] [doxygen] Generalize sanitizing of links

---
 doc/doxygen/mainpage.txt     |  4 ++--
 doc/doxygen/sanitizelinks.sh | 10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/doxygen/mainpage.txt b/doc/doxygen/mainpage.txt
index 263d8a71a9..f2aa67d075 100644
--- a/doc/doxygen/mainpage.txt
+++ b/doc/doxygen/mainpage.txt
@@ -10,11 +10,11 @@ documenting C/C++ code.
 
 The <a href="pages.html">Related Pages</a> gives a good overview on everything beyond the
 actual DuMuX code.
-This includes a  <a href="a07334.html">bibliography</a> of the publications DuMuX is based on.<br>
+This includes a Bibliography of the publications DuMuX is based on.<br>
 Further, a \ref parameterList containing all implemented parameters and
 a \ref featureList of special features used in the test problems is available.<br>
 Auxiliary script files can be find in \ref Binaries.<br>
-In addition, the current ToDos, warnings, and deprecations are listed.
+In addition, the current Todo List, Warning List, and Deprecated List are given.
 
 \section mods Modules
 
diff --git a/doc/doxygen/sanitizelinks.sh b/doc/doxygen/sanitizelinks.sh
index f23c1417bd..45e6f9c247 100755
--- a/doc/doxygen/sanitizelinks.sh
+++ b/doc/doxygen/sanitizelinks.sh
@@ -3,10 +3,14 @@
 sanitizelinks () {
   NEW_FILE=`grep -l "\"title\">$1" html/*html | egrep -o [0-9]+`
   OLD_FILE=`awk -v a=$NEW_FILE 'BEGIN {printf("%05d", a-1)}'`
-  sed -i "s/$OLD_FILE/$NEW_FILE/g" html/*html
+#   echo $1: $OLD_FILE $NEW_FILE
+  sed -i "s#$OLD_FILE#$NEW_FILE#g" html/a*html
+  sed -i "s# $1 # <a href=\"a$NEW_FILE.html\">$1</a> #g" html/index.html
+  sed -i "s# $1,# <a href=\"a$NEW_FILE.html\">$1</a>,#g" html/index.html
 }
 
-sanitizelinks "Todo List"
+sanitizelinks "Deprecated List" # has to be called before Todo List
+sanitizelinks "Todo List" # has to be called before Warning List
+sanitizelinks "Warning List"
 sanitizelinks "Bug List"
-sanitizelinks "Deprecated List"
 sanitizelinks "Bibliography"
-- 
GitLab