]> git.lyx.org Git - features.git/blobdiff - src/output_xhtml.cpp
XHTML: restore sections.
[features.git] / src / output_xhtml.cpp
index f8cd53e47867cfba71920ac9af059632b34af482..fe396f83d886b834c1a6479dfe07a08d6f0d5240 100644 (file)
@@ -675,7 +675,7 @@ void xhtmlParagraphs(Text const & text,
 
        // If need be, close <section>s, but only at the end of the document (otherwise, dealt with at the beginning
        // of the loop).
-       while (!headerLevels.empty() && headerLevels.top() > Layout::NOT_IN_TOC) {
+       while (!headerLevels.empty() && headerLevels.top() != Layout::NOT_IN_TOC && headerLevels.top() > 1) {
                docstring tag = from_utf8("</section>");
                headerLevels.pop();
                xs << XMLStream::ESCAPE_NONE << tag;