From: Richard Heck Date: Mon, 24 Dec 2012 17:03:44 +0000 (-0500) Subject: Respect InsetLayout's PassThru setting in XHTML export. X-Git-Tag: 2.0.6~178 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=80adc824f69b2e73adfbf9890b34b4bcd5de2c53;p=features.git Respect InsetLayout's PassThru setting in XHTML export. (cherry picked from commit 2e764c2c666560e0682464a3229610da06fa8507) --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0d6dd23015..c12f9ca055 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -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; diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 31fb6b5766..713c88685d 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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(); } diff --git a/status.20x b/status.20x index c9746f65fa..7ce041e213 100644 --- a/status.20x +++ b/status.20x @@ -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.