XHTML: restore sections.

This commit is contained in:
Thibaut Cuvelier 2020-09-16 04:13:42 +02:00
parent 1991d0ed24
commit 0dfa240209

View 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;