]> git.lyx.org Git - lyx.git/commitdiff
Fix bug #13066
authorRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 3 Jun 2024 03:06:11 +0000 (23:06 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 3 Jun 2024 03:08:05 +0000 (23:08 -0400)
Patch from Lorenzo

(cherry picked from commit 0c70f340c0fe33daa68b2a3eb4b3347fef1a9a95)

lib/layouts/stdinsets.inc
src/insets/InsetListings.cpp

index 764fbff3f2a8314f7fe2361125ef1c55ee7cc155..2a8afacad304e8834bfbec562e5c661722d722df 100644 (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
 
index 8268cebd68c0d0d52748ada0c08aad4908ac1e69..b022acad5eeb868906fba4d556dcb3f3c8f79baa 100644 (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;
                }