]> 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:14:32 +0000 (12:14 -0500)
(cherry picked from commit 2e764c2c666560e0682464a3229610da06fa8507)

src/Paragraph.cpp
src/insets/InsetText.cpp
status.20x

index 0d6dd2301571ab0e06115394e5cffb81cfb30d42..c12f9ca0553c87738c371266d212a6eff3443d04 100644 (file)
@@ -2794,7 +2794,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 31fb6b576696fa46d9970ffd846afd916ea7669b..713c88685d2c47a84d1614f9a760319bda63e3b8 100644 (file)
@@ -526,6 +526,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();
@@ -545,14 +546,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();
 }
 
index c9746f65fae4219dfbacf8190af06de26b38a2ad..7ce041e213ce7aae9e73db24b20d03866eda35d7 100644 (file)
@@ -78,6 +78,8 @@ What's new
 - Fix problem using lyxpak.py when outside the LyX tree: Variable was
   undefined.
 
+- Resepct InsetLayout's PassThru setting for XHTML export.
+
 - Fix layout conversion bug involving quoted Flex inset names that do not
   contain spaces.