docbook exports: Omit crashing export on some files

Committed since Thibaut apparently has no time to react, and the crash is
really distracting.
This commit is contained in:
Kornel Benko 2020-08-14 12:31:25 +02:00
parent 5791b8bff8
commit 9b7db11901
2 changed files with 12 additions and 2 deletions

View File

@ -176,8 +176,16 @@ void InsetNewline::docbook(XMLStream & xs, OutputParams const & runparams) const
{ {
if (runparams.docbook_in_par) { if (runparams.docbook_in_par) {
xs.closeFontTags(); xs.closeFontTags();
xs << xml::EndTag("para"); if (!xs.pending_tags_empty()) {
xs << xml::StartTag("para"); xs << xml::EndTag("para");
xs << xml::StartTag("para");
}
else {
xs << xml::CR() << xml::CompTag("br") << xml::CR();
}
}
else {
xs << xml::CR() << xml::CompTag("br") << xml::CR();
} }
} }

View File

@ -126,6 +126,8 @@ private:
TagDeque pending_tags_; TagDeque pending_tags_;
/// ///
TagDeque tag_stack_; TagDeque tag_stack_;
public:
bool pending_tags_empty() { return pending_tags_.empty();};
}; };
namespace xml { namespace xml {