]> git.lyx.org Git - features.git/commitdiff
Respect InsetLayout's PassThru setting in XHTML export.
authorRichard Heck <rgheck@lyx.org>
Mon, 24 Dec 2012 17:03:44 +0000 (12:03 -0500)
committerRichard Heck <rgheck@lyx.org>
Mon, 24 Dec 2012 17:11:51 +0000 (12:11 -0500)
src/Paragraph.cpp
src/insets/InsetText.cpp

index 5095026a9241a6fc3e5532d220661e216c2e6130..6d4433f1139c079ef5a81a51be76e89306b3cb10 100644 (file)
@@ -2890,7 +2890,7 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
                } else {
                        char_type c = getUChar(buf.params(), i);
 
-                       if (style.pass_thru)
+                       if (style.pass_thru || runparams.pass_thru)
                                xs << c;
                        else if (c == '-') {
                                docstring str;
index 181a79c4799db99739d222575d224dadf762a67d..55543ab0d76a45a014023d860a9b49062e80c0a4 100644 (file)
@@ -580,6 +580,7 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & rp,
        InsetLayout const & il = getLayout();
        if (opts & WriteOuterTag)
                xs << html::StartTag(il.htmltag(), il.htmlattr());
+
        if ((opts & WriteLabel) && !il.counter().empty()) {
                BufferParams const & bp = buffer().masterBuffer()->params();
                Counters & cntrs = bp.documentClass().counters();
@@ -599,14 +600,21 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, OutputParams const & rp,
 
        if (opts & WriteInnerTag)
                xs << html::StartTag(il.htmlinnertag(), il.htmlinnerattr());
-       OutputParams ours = runparams;
+
+       // we will eventaully lose information about the containing inset
        if (!il.isMultiPar() || opts == JustText)
-               ours.html_make_pars = false;
-       xhtmlParagraphs(text_, buffer(), xs, ours);
+               runparams.html_make_pars = false;
+       if (il.isPassThru())
+               runparams.pass_thru = true;
+
+       xhtmlParagraphs(text_, buffer(), xs, runparams);
+
        if (opts & WriteInnerTag)
                xs << html::EndTag(il.htmlinnertag());
+
        if (opts & WriteOuterTag)
                xs << html::EndTag(il.htmltag());
+
        return docstring();
 }