mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-12 11:32:21 +00:00
Don't output extra body tags with included files.
This commit is contained in:
parent
4e1bc622ca
commit
ddee4f872b
@ -1735,7 +1735,7 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
|||||||
bool const output_preamble =
|
bool const output_preamble =
|
||||||
output == FullSource || output == OnlyPreamble;
|
output == FullSource || output == OnlyPreamble;
|
||||||
bool const output_body =
|
bool const output_body =
|
||||||
output == FullSource || output == OnlyBody;
|
output == FullSource || output == OnlyBody || output == IncludedFile;
|
||||||
|
|
||||||
if (output_preamble) {
|
if (output_preamble) {
|
||||||
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
os << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||||
@ -1785,11 +1785,14 @@ void Buffer::writeLyXHTMLSource(odocstream & os,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (output_body) {
|
if (output_body) {
|
||||||
os << "<body>\n";
|
bool const output_body_tag = (output != IncludedFile);
|
||||||
|
if (output_body_tag)
|
||||||
|
os << "<body>\n";
|
||||||
XHTMLStream xs(os);
|
XHTMLStream xs(os);
|
||||||
params().documentClass().counters().reset();
|
params().documentClass().counters().reset();
|
||||||
xhtmlParagraphs(text(), *this, xs, runparams);
|
xhtmlParagraphs(text(), *this, xs, runparams);
|
||||||
os << "</body>\n";
|
if (output_body_tag)
|
||||||
|
os << "</body>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (output_preamble)
|
if (output_preamble)
|
||||||
|
@ -278,6 +278,7 @@ public:
|
|||||||
enum OutputWhat {
|
enum OutputWhat {
|
||||||
FullSource,
|
FullSource,
|
||||||
OnlyBody,
|
OnlyBody,
|
||||||
|
IncludedFile,
|
||||||
OnlyPreamble,
|
OnlyPreamble,
|
||||||
CurrentParagraph
|
CurrentParagraph
|
||||||
};
|
};
|
||||||
|
@ -785,7 +785,7 @@ docstring InsetInclude::xhtml(XHTMLStream & xs, OutputParams const & rp) const
|
|||||||
if (all_pars) {
|
if (all_pars) {
|
||||||
op.par_begin = 0;
|
op.par_begin = 0;
|
||||||
op.par_end = 0;
|
op.par_end = 0;
|
||||||
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::OnlyBody);
|
ibuf->writeLyXHTMLSource(xs.os(), op, Buffer::IncludedFile);
|
||||||
} else
|
} else
|
||||||
xs << XHTMLStream::ESCAPE_NONE
|
xs << XHTMLStream::ESCAPE_NONE
|
||||||
<< "<!-- Included file: "
|
<< "<!-- Included file: "
|
||||||
|
@ -99,6 +99,9 @@ What's new
|
|||||||
- When configuring LyX, check for all LaTeX-packages LyX uses to display
|
- When configuring LyX, check for all LaTeX-packages LyX uses to display
|
||||||
symbols (bug 8102).
|
symbols (bug 8102).
|
||||||
|
|
||||||
|
- Don't output extra body tags with included files when generating
|
||||||
|
XHTML.
|
||||||
|
|
||||||
|
|
||||||
* USER INTERFACE
|
* USER INTERFACE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user