commit d71e3404fe33179f00c8a28ea6498e414b43b49b
Author: Juergen Spitzmueller <[email protected]>
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 ++++---
status.23x | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/insets/InsetCommandParams.cpp
b/src/insets/InsetCommandParams.cpp
index 39c7715..741f6aa 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) {
diff --git a/status.23x b/status.23x
index 6c71962..c659e78 100644
--- a/status.23x
+++ b/status.23x
@@ -41,6 +41,8 @@ What's new
- Fix the implementation of new libertine font package.
+- Properly escape braces in non-literate context in insets.
+
* LYX2LYX