- odocstringstream out;
-
- docstring caption = getCaptionHTML(rp);
- out << otag;
- if (!caption.empty())
- out << "<div class='float-caption'>" << caption << "</div>\n";
-
- docstring def = InsetText::xhtml(out, rp);
- out << ctag;
+ odocstringstream ods;
+ XHTMLStream newxs(ods);
+ newxs << html::StartTag(htmltype, attr);
+ InsetText::XHTMLOptions const opts =
+ InsetText::WriteLabel | InsetText::WriteInnerTag;
+ docstring deferred = InsetText::insetAsXHTML(newxs, rp, opts);
+ newxs << html::EndTag(htmltype);