From: Wolfgang Bangerth <bangerth@colostate.edu>
Date: Fri, 17 Jan 2020 00:55:08 +0000 (-0700)
Subject: Work around a doxygen bug that triggers in step-10.
X-Git-Tag: v9.2.0-rc1~654^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9359%2Fhead;p=dealii.git

Work around a doxygen bug that triggers in step-10.
---

diff --git a/doc/doxygen/scripts/make_step.pl b/doc/doxygen/scripts/make_step.pl
index e1ef0704ac..0089ba82b4 100644
--- a/doc/doxygen/scripts/make_step.pl
+++ b/doc/doxygen/scripts/make_step.pl
@@ -87,6 +87,18 @@ print
 
 system $^X, "$cmake_source_dir/doc/doxygen/scripts/create_anchors", "$cmake_source_dir/examples/$step/doc/intro.dox";
 
+
+# Start the commented program by writing two empty lines. We have had
+# cases where the end of the intro.dox was missing a newline, and in
+# that case doxygen might get confused about what is being added here
+# to the end of an existing line. So add a newline.
+#
+# But then we also had a situation where doxygen was confused about a
+# line starting with an anchor (see #9357). It's not clear what the
+# cause is, but making sure that there is an empty line in between
+# solves the problem -- so a second newline character.
+print " *\n";
+print " *\n";
 print " * <a name=\"CommProg\"></a>\n";
 print " * <h1> The commented program</h1>\n";
 
@@ -94,6 +106,11 @@ system $^X, "$cmake_source_dir/doc/doxygen/scripts/program2doxygen", "$cmake_sou
 
 system $^X, "$cmake_source_dir/doc/doxygen/scripts/create_anchors", "$cmake_source_dir/examples/$step/doc/results.dox";
 
+
+# Move to the stripped, plain program. The same principle as above
+# applies for newlines.
+print " *\n";
+print " *\n";
 print
 "<a name=\"PlainProg\"></a>
 <h1> The plain program</h1>