#754240 doxygen: Unclosed <ul> tags in TOC

Package:
doxygen
Source:
doxygen
Description:
Documentation system for C, C++, Java, Python and other languages
Submitter:
eSyr
Date:
2014-07-09 00:03:06 UTC
Severity:
minor
#754240#5
Date:
2014-07-09 00:00:11 UTC
From:
To:
Dear Maintainer,

Doxygen does not close <ul> tags if next TOC item is more than one level
higher in hierarchy. Following patch likely fixes the problem:

Index: doxygen-1.8.1.2/src/definition.cpp
===================================================================
--- doxygen-1.8.1.2.orig/src/definition.cpp	2014-07-09 03:05:37.000000000 +0400
+++ doxygen-1.8.1.2/src/definition.cpp	2014-07-09 03:25:39.000000000 +0400
@@ -445,8 +445,11 @@
       else if (nextLevel<level)
       {
         if (inLi[level]) ol.writeString("</li>\n");
-        inLi[level]=FALSE;
-        ol.writeString("</ul>\n");
+        for (int i = level; i > nextLevel; i--)
+        {
+          inLi[i]=FALSE;
+          ol.writeString("</ul>\n");
+        }
       }
       cs[0]='0'+nextLevel;
       if (inLi[nextLevel]) ol.writeString("</li>\n");