commit 2dad9073da462e9dd5a0b2f79352ea6d565f093d
Author: Juergen Spitzmueller <[email protected]>
Date:   Fri Jul 25 09:44:54 2025 +0200

    Fix XHTML TOC entry of bibliography (part of #13189)
    
    (cherry picked from commit 5991979ede1e73c12cb015338211c9ec718ea156)
---
 src/insets/InsetTOC.cpp | 15 ++++++++++-----
 status.24x              |  2 ++
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp
index 0308392c0d..300e885db8 100644
--- a/src/insets/InsetTOC.cpp
+++ b/src/insets/InsetTOC.cpp
@@ -144,12 +144,17 @@ void InsetTOC::makeTOCEntry(XMLStream & xs,
        // First the label, if there is one
        docstring const & label = par.params().labelString();
        if (!label.empty())
-               xs << label << " ";
+               xs << label;
        // Now the content of the TOC entry, taken from the paragraph itself
-       OutputParams ours = op;
-       ours.for_toc = true;
-       Font const dummy;
-       par.simpleLyXHTMLOnePar(buffer(), xs, ours, dummy);
+       // Except for bibliography where we really only want the label
+       if (par.layout().labeltype != LABEL_BIBLIO) {
+               if (!label.empty())
+                       xs << " ";
+               OutputParams ours = op;
+               ours.for_toc = true;
+               Font const dummy;
+               par.simpleLyXHTMLOnePar(buffer(), xs, ours, dummy);
+       }
 
        xs << xml::EndTag("a") << xml::CR();
 }
diff --git a/status.24x b/status.24x
index 288b7d5f48..c8771c0116 100644
--- a/status.24x
+++ b/status.24x
@@ -95,6 +95,8 @@ What's new
 
 * LYXHTML
 
+- Fix heading of Bibliography in Table of Contents (part of bug 13189).
+
 
 
 * ADVANCED FIND AND REPLACE
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to