DocBook: restore index ranges.

This commit is contained in:
Thibaut Cuvelier 2024-02-26 15:15:32 +01:00
parent 5dd36404f2
commit 3fdf3aafe8

View File

@ -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 ||