commit e43ba7cf46779c6a8394310b9487ebe2c75132b2 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Tue Mar 6 18:17:01 2018 +0100
Braces need to be escaped as well on LATEXIFY part of #9563 --- src/insets/InsetCommandParams.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/insets/InsetCommandParams.cpp b/src/insets/InsetCommandParams.cpp index 3f3befe..24d1afa 100644 --- a/src/insets/InsetCommandParams.cpp +++ b/src/insets/InsetCommandParams.cpp @@ -464,14 +464,15 @@ docstring InsetCommandParams::prepareCommand(OutputParams const & runparams, } // Now escape special commands static docstring const backslash = from_ascii("\\"); - static char_type const chars_escape[6] = { - '&', '_', '$', '%', '#', '^'}; + int const nchars_escape = 8; + static char_type const chars_escape[nchars_escape] = { + '&', '_', '$', '%', '#', '^', '{', '}'}; if (!result.empty()) { int previous; // The characters in chars_name[] need to be changed to a command when // they are LaTeXified. - for (int k = 0; k < 6; k++) + for (int k = 0; k < nchars_escape; k++) for (size_t i = 0, pos; (pos = result.find(chars_escape[k], i)) != string::npos; i = pos + 2) {