Avoid unnecessary cprotect loading (#12826)

This commit is contained in:
Juergen Spitzmueller 2023-06-30 16:31:13 +02:00
parent 551ede855a
commit 94dd5ed6eb

View File

@ -1435,7 +1435,7 @@ bool InsetText::needsCProtection(bool const maintext, bool const fragile) const
return true;
docstring const par_str = par.asString();
for (int k = 0; k < nchars_escape; k++) {
if (contains(par_str, chars_escape[k]))
if (!maintext && contains(par_str, chars_escape[k]))
return true;
}
}