Patch from Lorenzo

(cherry picked from commit 0c70f340c0)
This commit is contained in:
Richard Kimberly Heck 2024-06-02 23:06:11 -04:00
parent 160084af3c
commit 63b23ce288
2 changed files with 3 additions and 20 deletions

View File

@ -375,20 +375,7 @@ InsetLayout Listings
NeedCProtect true
RefPrefix lst
EditExternal true
HTMLTag pre
HTMLStyle
div.float-listings {
border: 2px solid black;
padding: 1ex;
margin: 1ex;
}
div.listings-caption {
text-align: center;
border: 2px solid black;
padding: 1ex;
margin: 1ex;
}
EndHTMLStyle
HTMLTag code
DocBookTag programlisting
End

View File

@ -440,9 +440,7 @@ void InsetListings::latex(otexstream & os, OutputParams const & runparams) const
docstring InsetListings::xhtml(XMLStream & os, OutputParams const & rp) const
{
bool const isInline = params().isInline();
if (isInline)
os << xml::CompTag("br");
else {
if (!isInline) {
os << xml::StartTag("div", "class='float-listings'");
docstring caption = getCaptionHTML(rp);
if (!caption.empty())
@ -466,9 +464,7 @@ docstring InsetListings::xhtml(XMLStream & os, OutputParams const & rp) const
docstring def = InsetText::insetAsXHTML(os, newrp, InsetText::JustText);
os << xml::EndTag(tag);
if (isInline) {
os << xml::CompTag("br");
} else {
if (!isInline) {
if (!def.empty()) {
os << '\n' << def;
}