#include "Lexer.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
+#include "output_xhtml.h"
#include "Text.h"
#include "support/debug.h"
+#include "support/docstream.h"
#include "support/gettext.h"
#include "support/lassert.h"
}
-docstring InsetVSpace::xhtml(odocstream & os, OutputParams const &) const
+docstring InsetVSpace::xhtml(XHTMLStream &, OutputParams const &) const
{
- string len = space_.asHTMLLength();
- if (len.empty())
- // we didn't understand it
- os << "<br />\n";
- else
- os << "<div style='height:" << from_ascii(len) << "'></div>\n";
- return docstring();
+ odocstringstream ods;
+ XHTMLStream xds(ods);
+ string const len = space_.asHTMLLength();
+ string const attr = "style='height:" + (len.empty() ? "1em" : len) + "'";
+ xds << StartTag("div", attr, true) << EndTag("div");
+ return ods.str();
}