mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Don't output extra body tags with included files.
This commit is contained in:
parent
40cc43f150
commit
e56ee0b2e6
@ -1769,7 +1769,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
||||
bool const output_preamble =
|
||||
output == FullSource || output == OnlyPreamble;
|
||||
bool const output_body =
|
||||
output == FullSource || output == OnlyBody;
|
||||
output == FullSource || output == OnlyBody || output == IncludedFile;
|
||||
|
||||
if (output_preamble) {
|
||||
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
@ -1852,11 +1852,14 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
||||
}
|
||||
|
||||
if (output_body) {
|
||||
os << "<body>\n";
|
||||
bool const output_body_tag = (output != IncludedFile);
|
||||
if (output_body_tag)
|
||||
os << "<body>\n";
|
||||
XHTMLStream xs(os);
|
||||
params().documentClass().counters().reset();
|
||||
xhtmlParagraphs(text(), *this, xs, runparams);
|
||||
os << "</body>\n";
|
||||
if (output_body_tag)
|
||||
os << "</body>\n";
|
||||
}
|
||||
|
||||
if (output_preamble)
|
||||
|
@ -294,6 +294,7 @@ public:
|
||||
enum OutputWhat {
|
||||
FullSource,
|
||||
OnlyBody,
|
||||
IncludedFile,
|
||||
OnlyPreamble,
|
||||
CurrentParagraph
|
||||
};
|
||||
|
@ -793,7 +793,7 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const
|
||||
if (all_pars) {
|
||||
op.par_begin = 0;
|
||||
op.par_end = 0;
|
||||
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::OnlyBody);
|
||||
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile);
|
||||
} else
|
||||
xs << XHTMLStream::ESCAPE_NONE
|
||||
<< "<!-- Included file: "
|
||||
|
Loading…
Reference in New Issue
Block a user