]> https://gitweb.dealii.org/ - dealii.git/commitdiff
disallow h2 in tutorial headers 9658/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 13 Mar 2020 12:59:42 +0000 (08:59 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 17 Mar 2020 19:30:00 +0000 (15:30 -0400)
contrib/utilities/checkdoxygen.py

index 663835591850a1025837088ec7637d8f961527d2..2b21bb556afcdfbf1e903d30d49956d2a71a594c 100755 (executable)
@@ -59,6 +59,15 @@ def check_multiple_defined_headers(lines):
             thisheader = l                             # take this line
             thisheader = thisheader.replace(' ', '')   # remove all whitespace
             thisheader = thisheader.split('<h')[1]     # remove header tag '<h'
+
+            if thisheader[0] == '2':
+                # We do not use <h2> headers in tutorials because our script
+                # does not put them in the table of contents (for historical
+                # reasons). Instead, please use <h3>, <h4>, etc..
+                sys.exit("Error: Header <h2> detected in file '%s'. This is"
+                         " not allowed in tutorial programs. Please use <h3>"
+                         " instead." % (filename))
+
             if thisheader[0] in ['1', '2', '3', '4', '5']:  # make sure the next character is 1-5
                 thisheader = thisheader[2:]            # remove '*>'
                 if len(thisheader.split('</h'))==2:    # check for close header on the same line

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.