escape spaces in labels

refstyle doesn't work with these. See
https://marc.info/?l=lyx-users&m=169926958114185&w=2
This commit is contained in:
Juergen Spitzmueller 2023-11-06 14:16:34 +01:00
parent 04a24211a6
commit d2db3d4578

View File

@ -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