diff --git a/src/insets/InsetListings.cpp b/src/insets/InsetListings.cpp
index 0174a977f8..e20d3c76df 100644
--- a/src/insets/InsetListings.cpp
+++ b/src/insets/InsetListings.cpp
@@ -26,6 +26,7 @@
#include "Language.h"
#include "MetricsInfo.h"
#include "output_latex.h"
+#include "output_xhtml.h"
#include "TextClass.h"
#include "support/debug.h"
@@ -267,34 +268,37 @@ int InsetListings::latex(odocstream & os, OutputParams const & runparams) const
}
-docstring InsetListings::xhtml(odocstream & os, OutputParams const & rp) const
+docstring InsetListings::xhtml(XHTMLStream & os, OutputParams const & rp) const
{
- odocstringstream out;
+ odocstringstream ods;
+ XHTMLStream out(ods);
bool const isInline = params().isInline();
if (isInline)
- out << "
\n";
+ out << CompTag("br");
else {
- out << "
\n"; + out << StartTag("pre"); OutputParams newrp = rp; newrp.html_disable_captions = true; docstring def = InsetText::xhtml(out, newrp); - out << "\n\n"; + out << EndTag("pre"); if (isInline) { - out << "