[LyX/master] Amend ac98f21f

Thibaut Cuvelier tcuvelier at lyx.org
Sun Feb 14 04:33:20 UTC 2021


commit 25d3d163609c24881949d5385388761561c190d9
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Sun Feb 14 05:36:37 2021 +0100

    Amend ac98f21f
---
 src/output_docbook.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp
index f3ac018..e039d70 100644
--- a/src/output_docbook.cpp
+++ b/src/output_docbook.cpp
@@ -1110,7 +1110,7 @@ void docbookParagraphs(Text const &text,
 	    // Check the condition on the first few elements.
 	    bool hasPreface = false;
 	    pit_type pref_bpit = bpit;
-	    pit_type pref_epit = bpit + 1;
+	    pit_type pref_epit = bpit;
 
 	    static const std::set<std::string> allowedElements = {
 	            // List from https://tdg.docbook.org/tdg/5.2/book.html
@@ -1118,7 +1118,7 @@ void docbookParagraphs(Text const &text,
 	            "glossary", "index", "part", "preface", "reference", "toc"
 	    };
 
-	    for (; pref_epit <= epit; ++pref_epit) {
+	    for (; pref_epit < epit; ++pref_epit) {
             auto par = text.paragraphs().iterator_at(pref_epit);
             if (allowedElements.find(par->layout().docbooktag()) != allowedElements.end() ||
                     allowedElements.find(par->layout().docbooksectiontag()) != allowedElements.end())


More information about the lyx-cvs mailing list