Amend 9be6a425, Workaround for advanced search in 'uncover'-inset.

Use getInset(i)->toString() instead of getInset(i)->plaintext()
if searching, so that we get the option of 'uncover' visible to the search engine.
This commit is contained in:
Kornel Benko 2022-11-04 15:34:49 +01:00
parent 3b3f43cf35
commit 2333af615d

View File

@ -4256,6 +4256,9 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options, const Out
else if (c == META_INSET && (options & AS_STR_INSETS)) {
if (c == META_INSET && (options & AS_STR_PLAINTEXT)) {
LASSERT(runparams != nullptr, return docstring());
if (runparams->find_effective())
getInset(i)->toString(os);
else
getInset(i)->plaintext(os, *runparams);
} else if (c == META_INSET && (options & AS_STR_MATHED)
&& getInset(i)->lyxCode() == REF_CODE) {