mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
DocBook: slight code simplification.
This commit is contained in:
parent
6c51cabd35
commit
bfeb3b66b1
@ -1087,8 +1087,7 @@ void docbookParagraphs(Text const &text,
|
|||||||
|
|
||||||
// Close all sections before the bibliography.
|
// 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)?
|
||||||
auto insetsLength = distance(par->insetList().begin(), par->insetList().end());
|
if (!par->insetList().empty()) {
|
||||||
if (insetsLength > 0) {
|
|
||||||
Inset const *firstInset = par->getInset(0);
|
Inset const *firstInset = par->getInset(0);
|
||||||
if (firstInset && (firstInset->lyxCode() == BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
|
if (firstInset && (firstInset->lyxCode() == BIBITEM_CODE || firstInset->lyxCode() == BIBTEX_CODE)) {
|
||||||
while (!headerLevels.empty()) {
|
while (!headerLevels.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user