[LyX/master] DocBook: restore index ranges.
Thibaut Cuvelier
tcuvelier at lyx.org
Mon Feb 26 14:16:25 UTC 2024
commit 3fdf3aafe8a2da25c10152c97e6e7824ace42e96
Author: Thibaut Cuvelier <tcuvelier at 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 ||
More information about the lyx-cvs
mailing list