commit 3fdf3aafe8a2da25c10152c97e6e7824ace42e96
Author: Thibaut Cuvelier <tcuvel...@lyx.org>
Date:   Mon Feb 26 15:15:32 2024 +0100

    DocBook: restore index ranges.
---
 src/insets/InsetIndex.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp
index 54058b8ea7..68669b0b7e 100644
--- a/src/insets/InsetIndex.cpp
+++ b/src/insets/InsetIndex.cpp
@@ -386,7 +386,10 @@ void InsetIndex::docbook(XMLStream & xs, OutputParams 
const & runparams) const
        }
 
        // Handle ranges. Happily, in the raw LaTeX mode, (| and |) can only be 
at the end of the string!
-       const bool hasInsetRange = params_.range != 
InsetIndexParams::PageRange::None;
+       // Handle both modern ranges (params_.range) and legacy ones (with a 
suffix |( or |) as in pure LaTeX).
+       const bool hasInsetRange = params_.range != 
InsetIndexParams::PageRange::None ||
+                       latexString.find(from_ascii("|(")) != 
lyx::docstring::npos ||
+                       latexString.find(from_ascii("|)")) != 
lyx::docstring::npos;
        const bool hasStartRange = params_.range == 
InsetIndexParams::PageRange::Start ||
                        latexString.find(from_ascii("|(")) != 
lyx::docstring::npos;
        const bool hasEndRange = params_.range == 
InsetIndexParams::PageRange::End ||
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to