mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
In non-MultiPar insets, we do not want to output paragraphs at all.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32103 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5815084ff0
commit
fa2f219d92
@ -286,6 +286,7 @@ InsetLayout Float
|
||||
Size Small
|
||||
EndFont
|
||||
MultiPar true
|
||||
HTMLTag div
|
||||
End
|
||||
|
||||
InsetLayout Wrap
|
||||
@ -344,9 +345,11 @@ InsetLayout Info
|
||||
HTMLStyle
|
||||
span.info { font-family: sans-serif; }
|
||||
EndHTMLStyle
|
||||
MultiPar false
|
||||
End
|
||||
|
||||
InsetLayout Info:menu
|
||||
CopyStyle Info
|
||||
LatexType command
|
||||
LatexName menuitem
|
||||
Preamble
|
||||
@ -364,6 +367,7 @@ InsetLayout Info:menu
|
||||
End
|
||||
|
||||
InsetLayout Info:shortcut
|
||||
CopyStyle Info
|
||||
LatexType command
|
||||
LatexName shortcut
|
||||
Preamble
|
||||
@ -381,6 +385,7 @@ InsetLayout Info:shortcut
|
||||
End
|
||||
|
||||
InsetLayout Info:shortcuts
|
||||
CopyStyle Info
|
||||
LatexType command
|
||||
LatexName shortcut
|
||||
Preamble
|
||||
|
@ -29,7 +29,8 @@ OutputParams::OutputParams(Encoding const * enc)
|
||||
changeOfDeletedInset(Change::UNCHANGED),
|
||||
par_begin(0), par_end(0), isLastPar(false),
|
||||
dryrun(false), verbatim(false),
|
||||
html_disable_captions(false), html_in_par(false)
|
||||
html_disable_captions(false), html_in_par(false),
|
||||
html_make_pars(true)
|
||||
{
|
||||
// Note: in PreviewLoader::Impl::dumpPreamble
|
||||
// OutputParams runparams(0);
|
||||
|
@ -214,6 +214,8 @@ public:
|
||||
bool html_disable_captions;
|
||||
/// Are we already in a paragraph?
|
||||
bool html_in_par;
|
||||
/// Does the present context even permit paragraphs?
|
||||
bool html_make_pars;
|
||||
};
|
||||
|
||||
|
||||
|
@ -522,7 +522,13 @@ docstring InsetText::xhtml(XHTMLStream & xs, OutputParams const & runparams) con
|
||||
}
|
||||
|
||||
xs << StartTag(il.htmlinnertag(), il.htmlinnerattr());
|
||||
xhtmlParagraphs(text_, buffer(), xs, runparams);
|
||||
if (il.isMultiPar())
|
||||
xhtmlParagraphs(text_, buffer(), xs, runparams);
|
||||
else {
|
||||
OutputParams ours = runparams;
|
||||
ours.html_make_pars = false;
|
||||
xhtmlParagraphs(text_, buffer(), xs, ours);
|
||||
}
|
||||
xs << EndTag(il.htmlinnertag());
|
||||
xs << EndTag(il.htmltag());
|
||||
return docstring();
|
||||
|
@ -479,8 +479,10 @@ ParagraphList::const_iterator makeParagraphs(Buffer const & buf,
|
||||
|
||||
// If we are already in a paragraph, and this is the first one, then we
|
||||
// do not want to open the paragraph tag.
|
||||
bool const opened =
|
||||
(par == pbegin && runparams.html_in_par) ? false : true;
|
||||
// we also do not want to open it if the current layout does not permit
|
||||
// multiple paragraphs.
|
||||
bool const opened = runparams.html_make_pars &&
|
||||
(par != pbegin || !runparams.html_in_par);
|
||||
if (opened)
|
||||
openTag(xs, lay);
|
||||
docstring const deferred =
|
||||
|
Loading…
Reference in New Issue
Block a user