#include "FuncStatus.h"
#include "InsetCaption.h"
#include "Language.h"
+#include "Lexer.h"
#include "MetricsInfo.h"
#include "output_latex.h"
#include "output_xhtml.h"
}
-void InsetListings::updateLabels(ParIterator const & it, bool out)
+void InsetListings::updateBuffer(ParIterator const & it, UpdateType utype)
{
Counters & cnts = buffer().masterBuffer()->params().documentClass().counters();
string const saveflt = cnts.current_float();
// Tell to captions what the current float is
cnts.current_float("listing");
- InsetCollapsable::updateLabels(it, out);
+ InsetCollapsable::updateBuffer(it, utype);
//reset afterwards
cnts.current_float(saveflt);
bool const isInline = params().isInline();
if (isInline)
- out << CompTag("br");
+ out << html::CompTag("br");
else {
- out << StartTag("div", "class='float float-listings'");
+ out << html::StartTag("div", "class='float float-listings'");
docstring caption = getCaptionHTML(rp);
if (!caption.empty())
- out << StartTag("div", "class='float-caption'")
- << caption << EndTag("div");
+ out << html::StartTag("div", "class='float-caption'")
+ << caption << html::EndTag("div");
}
- out << StartTag("pre");
+ out << html::StartTag("pre");
OutputParams newrp = rp;
newrp.html_disable_captions = true;
- docstring def = InsetText::xhtml(out, newrp);
- out << EndTag("pre");
+ docstring def = InsetText::insetAsXHTML(out, newrp, InsetText::JustText);
+ out << html::EndTag("pre");
if (isInline) {
- out << CompTag("br");
+ out << html::CompTag("br");
// escaping will already have been done
os << XHTMLStream::NextRaw() << ods.str();
} else {
- out << EndTag("div");
+ out << html::EndTag("div");
// In this case, this needs to be deferred, but we'll put it
// before anything the text itself deferred.
def = ods.str() + '\n' + def;