Consider inset strings in simple find/replaceAll (#12049)

This commit is contained in:
Juergen Spitzmueller 2021-01-12 16:45:32 +01:00
parent 1b2a56e2d2
commit c049527941

View File

@ -4403,8 +4403,13 @@ int Paragraph::find(docstring const & str, bool cs, bool mw,
break;
odocstringstream os;
inset->toString(os);
if (!os.str().empty())
break;
if (!os.str().empty()) {
int const insetstringsize = os.str().length();
for (int j = 0; j < insetstringsize && pos < parsize; ++i, ++j) {
if (str[i] != os.str()[j])
break;
}
}
pos++;
}
if (cs && str[i] != d->text_[pos])