mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Paragraph on top level do not need cprotection.
This commit is contained in:
parent
26ea1e1496
commit
a883133e8d
@ -3449,8 +3449,13 @@ bool Paragraph::isHardHyphenOrApostrophe(pos_type pos) const
|
||||
|
||||
bool Paragraph::needsCProtection() const
|
||||
{
|
||||
// first check the layout of the paragraph
|
||||
if (layout().needcprotect) {
|
||||
// first check the layout of the paragraph, but only in insets
|
||||
InsetText const * textinset = inInset().asInsetText();
|
||||
bool const maintext = textinset
|
||||
? textinset->text().isMainText()
|
||||
: false;
|
||||
|
||||
if (!maintext && layout().needcprotect) {
|
||||
// Environments need cprotection regardless the content
|
||||
if (layout().latextype == LATEX_ENVIRONMENT)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user