summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index 936565d..e6ceff6 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1896,6 +1896,14 @@ void Definition::writeToc(OutputList &ol, const LocalToc &localToc)
level = nextLevel;
}
}
+ if (level > maxLevel) level = maxLevel;
+ while (level>1 && level <= maxLevel)
+ {
+ inLi[level]=FALSE;
+ ol.writeString("</tocdiv>\n");
+ level--;
+ }
+ inLi[level]=FALSE;
ol.writeString(" </toc>\n");
ol.popGeneratorState();
}