]> git.lyx.org Git - features.git/commitdiff
Fix listings XHTML output: No paragraphs in there.
authorRichard Heck <rgheck@comcast.net>
Tue, 19 Jan 2010 19:11:12 +0000 (19:11 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 19 Jan 2010 19:11:12 +0000 (19:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33096 a592a061-630c-0410-9148-cb99ea01b6c8

src/Paragraph.cpp
src/insets/InsetListings.cpp
src/insets/InsetText.cpp

index c357fcda2b2d9d690df701f01107c0b03d09d682..b568a93e0ba976464fcbdaf177db99cc0f4258c1 100644 (file)
@@ -2406,7 +2406,7 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
 
        Layout const & style = *d->layout_;
 
-       if (!runparams.for_toc) {
+       if (!runparams.for_toc && runparams.html_make_pars) {
                // generate a magic label for this paragraph
                string const attr = "id='" + magicLabel() + "'";
                xs << CompTag("a", attr);
index e20d3c76df477b23ce7415066d4d7dfde29d152c..ba7de456e1897416134d66722ca1cdebd424034d 100644 (file)
@@ -287,7 +287,7 @@ docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const
        out << StartTag("pre");
        OutputParams newrp = rp;
        newrp.html_disable_captions = true;
-       docstring def = InsetText::xhtml(out, newrp);
+       docstring def = InsetText::insetAsXHTML(out, newrp, InsetText::JustText);
        out << EndTag("pre");
 
        if (isInline) {
index 3c85bfd4702fb888470734d2e6423c5aa2ad198c..cb6734aa67599a61178c0f8ce1b2543a752de0c7 100644 (file)
@@ -520,13 +520,10 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & runpara
 
        if (opts & WriteInnerTag)
                xs << StartTag(il.htmlinnertag(), il.htmlinnerattr());
-       if (il.isMultiPar())
-               xhtmlParagraphs(text_, buffer(), xs, runparams);
-       else {
-               OutputParams ours = runparams;
+       OutputParams ours = runparams;
+       if (!il.isMultiPar() || opts == JustText)
                ours.html_make_pars = false;
-               xhtmlParagraphs(text_, buffer(), xs, ours);
-       }
+       xhtmlParagraphs(text_, buffer(), xs, ours);
        if (opts & WriteInnerTag)
                xs << EndTag(il.htmlinnertag());
        if (opts & WriteOuterTag)