X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_docbook.cpp;h=5e1f6d12cf2829fc281a1cd95268d9967249270f;hb=9716e79624a4d;hp=71d3b83f2997812232b8d175a7a674fd5474dc61;hpb=1c70d98fc1b8cb8b89dba7089f2373a181b41e08;p=lyx.git diff --git a/src/output_docbook.cpp b/src/output_docbook.cpp index 71d3b83f29..5e1f6d12cf 100644 --- a/src/output_docbook.cpp +++ b/src/output_docbook.cpp @@ -826,7 +826,7 @@ DocBookInfoTag getParagraphsWithInfo(ParagraphList const ¶graphs, // There should never be any section here, except for the first paragraph (a title can be part of ). // (Just a sanity check: if this fails, this function could end up processing the whole document.) if (cpit != bpit && isLayoutSectioningOrSimilar(par.layout())) { - LYXERR0("Assertion failed: section found in potential paragraphs."); + LYXERR(Debug::OUTFILE, "Assertion failed: section found in potential paragraphs."); break; } @@ -1020,12 +1020,20 @@ void outputDocBookInfo( } } - // Actually output the abstract if there is something to do. Don't count line feeds or spaces in this, - // even though they must be properly output if there is some abstract. + // Actually output the abstract if there is something to do. Don't count line feeds, spaces, or comments + // in this -- even though line feeds and spaces must be properly output if there is some abstract. abstract = os2.str(); docstring cleaned = abstract; cleaned.erase(std::remove_if(cleaned.begin(), cleaned.end(), lyx::isSpace), cleaned.end()); + size_t beginComment; + size_t endComment; + while ((beginComment = cleaned.find(from_ascii(""), beginComment)) != lyx::docstring::npos) { + cleaned.erase(cleaned.begin() + beginComment, cleaned.begin() + endComment + 3); + } + } + // Nothing? Then there is no abstract! if (cleaned.empty()) hasAbstract = false;