]> git.lyx.org Git - lyx.git/blobdiff - src/output_docbook.cpp
Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
[lyx.git] / src / output_docbook.cpp
index c80a7cdb91b7e4dab05591cc308c23e63ac205ae..204fc430f7913fced45e7887507fc2b32cbd9d15 100644 (file)
@@ -382,7 +382,7 @@ void makeParagraph(
                        TABULAR_CODE,
                        FLOAT_CODE,
                        BIBTEX_CODE, // Bibliographies cannot be in paragraphs. Bibitems should still be handled as paragraphs,
-                       // though (see makeParagraphBibliography).
+                       // though (see makeBibliography).
                        ERT_CODE, // ERTs are in comments, not paragraphs.
                        LISTINGS_CODE,
                        BOX_CODE,
@@ -1127,8 +1127,9 @@ void docbookSimpleAllParagraphs(
 
        // Then, the content. It starts where the <info> ends.
        auto par = paragraphs.iterator_at(info.epit);
-       auto end = paragraphs.iterator_at(epit);
-       while (par != end) {
+       auto par_epit = paragraphs.iterator_at(epit);
+       auto par_end = paragraphs.end();
+       while (par != par_epit && par != par_end) {
                if (!hasOnlyNotes(*par))
                        par = makeAny(text, buf, xs, runparams, par);
                else
@@ -1300,7 +1301,8 @@ void docbookParagraphs(Text const &text,
                }
 
                // Close all sections before the bibliography.
-               // TODO: Only close all when the bibliography is at the end of the document? Or force to output the bibliography at the end of the document? Or don't care (as allowed by DocBook)?
+               // TODO: Only close all when the bibliography is at the end of the document? Or force to output the bibliography
+               // at the end of the document? Or don't care (as allowed by DocBook)?
                if (!par->insetList().empty()) {
                        Inset const *firstInset = par->getInset(0);
                        if (firstInset && (firstInset->lyxCode() == BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
@@ -1326,7 +1328,8 @@ void docbookParagraphs(Text const &text,
                // Generate the <info> tag if a section was just opened.
                // Some sections may require abstracts (mostly parts, in books: DocBookForceAbstractTag will not be NONE),
                // others can still have an abstract (it must be detected so that it can be output at the right place).
-               // TODO: docbookforceabstracttag is a bit contrived here, but it does the job. Having another field just for this would be cleaner, but that's just for <part> and <partintro>, so it's probably not worth the effort.
+               // TODO: docbookforceabstracttag is a bit contrived here, but it does the job. Having another field just for
+               // this would be cleaner, but that's just for <part> and <partintro>, so it's probably not worth the effort.
                if (isLayoutSectioning(style)) {
                        // This abstract may be found between the next paragraph and the next title.
                        pit_type cpit = std::distance(text.paragraphs().begin(), par);