mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +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 =
|
||||
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"
|
||||
@ -1785,11 +1785,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)
|
||||
|
@ -278,6 +278,7 @@ public:
|
||||
enum OutputWhat {
|
||||
FullSource,
|
||||
OnlyBody,
|
||||
IncludedFile,
|
||||
OnlyPreamble,
|
||||
CurrentParagraph
|
||||
};
|
||||
|
@ -785,7 +785,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: "
|
||||
|
@ -99,6 +99,9 @@ What's new
|
||||
- When configuring LyX, check for all LaTeX-packages LyX uses to display
|
||||
symbols (bug 8102).
|
||||
|
||||
- Don't output extra body tags with included files when generating
|
||||
XHTML.
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user