needsCProtection: consider LaTeXType "none"

This commit is contained in:
Juergen Spitzmueller 2018-04-15 12:31:27 +02:00
parent c082c3a0f6
commit 78aed77c3d

View File

@ -1091,8 +1091,9 @@ bool InsetText::needsCProtection() const
if (!getLayout().needsCProtect())
return false;
// Environments need cprotection regardless the content
if (getLayout().latextype() == InsetLayout::ENVIRONMENT)
// Environments and "no latex" types (e.g., knitr chunks)
// need cprotection regardless the content
if (getLayout().latextype() != InsetLayout::COMMAND)
return true;
// Commands need cprotection if they contain specific chars