commit 5991979ede1e73c12cb015338211c9ec718ea156
Author: Juergen Spitzmueller <[email protected]>
Date: Fri Jul 25 09:44:54 2025 +0200
Fix XHTML TOC entry of bibliography (part of #13189)
---
src/insets/InsetTOC.cpp | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/insets/InsetTOC.cpp b/src/insets/InsetTOC.cpp
index 3345f15c93..7cea902175 100644
--- a/src/insets/InsetTOC.cpp
+++ b/src/insets/InsetTOC.cpp
@@ -143,12 +143,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();
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs