From d2db3d45780f72248268be3d5cf7bbe3024df893 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 6 Nov 2023 14:16:34 +0100 Subject: [PATCH] escape spaces in labels refstyle doesn't work with these. See https://marc.info/?l=lyx-users&m=169926958114185&w=2 --- src/support/lstrings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index d5b6dea588..61ea5bf36a 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1230,7 +1230,8 @@ docstring const escape(docstring const & lab) for (char_type const c : lab) { if (c >= 128 || c == '=' || c == '%' || c == '#' || c == '$' || c == '}' || c == '{' || c == ']' || c == '[' || c == '&' - || c == '\\') { + || c == '\\' || c == ' ') // refstyle doesn't support spaces + { // Although char_type is a 32 bit type we know that // UCS4 occupies only 21 bits, so we don't need to // encode bigger values. Test for 2^24 because we