]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCaption.cpp
Revert most of dd7863b6.
[features.git] / src / insets / InsetCaption.cpp
index 149a40c93b8cb7a5156f27905a078f0abca418cf..613249b6b25c28472c2134cbaf795e6ccc58153d 100644 (file)
@@ -293,7 +293,7 @@ int InsetCaption::docbook(odocstream & os,
 }
 
 
-docstring InsetCaption::xhtml(XHTMLStream &, OutputParams const & rp) const
+docstring InsetCaption::xhtml(XHTMLStream & xs, OutputParams const & rp) const
 {
        if (rp.html_disable_captions)
                return docstring();
@@ -308,14 +308,10 @@ docstring InsetCaption::xhtml(XHTMLStream &, OutputParams const & rp) const
                else
                        attr = attr + " class='" + our_class + "'";
        }
-       odocstringstream ods;
-       XHTMLStream ourxs(ods);
-       ourxs << html::StartTag(tag, attr) << html::CR();
-       docstring def = getCaptionAsHTML(ourxs, rp);
-       ourxs << html::EndTag(tag) << html::CR();
-       if (!def.empty())
-               return ods.str() + "\n" + def;
-       return ods.str();
+       xs << html::StartTag(tag, attr);
+       docstring def = getCaptionAsHTML(xs, rp);
+       xs << html::EndTag(tag);
+       return def;
 }