From: Thibaut Cuvelier Date: Mon, 26 Feb 2024 14:15:32 +0000 (+0100) Subject: DocBook: restore index ranges. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3fdf3aafe8a2da25c10152c97e6e7824ace42e96;p=features.git DocBook: restore index ranges. --- 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 ||