X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Foutput_xhtml.cpp;h=080369f104e935535a2be7e6a548416584717b29;hb=175711046db2b986550318fa78d901628de28cb8;hp=b09872b00e617022a5e417971ec24cf6e7de3b6a;hpb=0c1dd609f365780d8b81987ffc3a0319f2986acd;p=lyx.git diff --git a/src/output_xhtml.cpp b/src/output_xhtml.cpp index b09872b00e..080369f104 100644 --- a/src/output_xhtml.cpp +++ b/src/output_xhtml.cpp @@ -172,6 +172,7 @@ string fontToTag(html::FontTypes type) case FT_DBAR: return "u"; case FT_SOUT: + case FT_XOUT: return "del"; case FT_ITALIC: return "i"; @@ -211,6 +212,7 @@ string fontToAttribute(html::FontTypes type) return ""; case FT_DBAR: return "class='dline'"; + case FT_XOUT: case FT_SOUT: return "class='strikeout'"; case FT_WAVE: @@ -326,7 +328,7 @@ void XHTMLStream::writeError(std::string const & s) const namespace { // an illegal tag for internal use static html::StartTag const parsep_tag("&LyX_parsep_tag&"); -} +} // namespace bool XHTMLStream::closeFontTags() @@ -358,7 +360,7 @@ bool XHTMLStream::closeFontTags() #ifdef XHTML_DEBUG dumpTagStack("End Close Font Tags"); #endif - + if (*curtag == parsep_tag) return true; @@ -405,7 +407,7 @@ void XHTMLStream::endDivision() #ifdef XHTML_DEBUG dumpTagStack("EndDivision"); #endif - + return; } @@ -865,12 +867,28 @@ ParagraphList::const_iterator makeParagraphs(Buffer const & buf, // (i) the current layout permits multiple paragraphs // (ii) we are either not already inside a paragraph (HTMLIsBlock) OR // we are, but this is not the first paragraph - // But we do not want to open the paragraph tag if this paragraph contains - // only one item, and that item is "inline", i.e., not HTMLIsBlock (such - // as a branch). That is the "special case" we handle first. + // + // But there is also a special case, and we first see whether we are in it. + // We do not want to open the paragraph tag if this paragraph contains + // only one item, and that item is "inline", i.e., not HTMLIsBlock (such + // as a branch). On the other hand, if that single item has a font change + // applied to it, then we still do need to open the paragraph. + // + // Obviously, this is very fragile. The main reason we need to do this is + // because of branches, e.g., a branch that contains an entire new section. + // We do not really want to wrap that whole thing in a