mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
FindAdv: sometimes a space is added on some math symbols
For example '\int '.
Should fix regression #13070
Spotted by Alexander Dunlap
(cherry picked from commit 4730ec78f5
)
This commit is contained in:
parent
a6d0d7ea92
commit
6c3447c8a6
@ -1309,7 +1309,12 @@ static docstring stringifySearchBuffer(Buffer & buffer, FindAndReplaceOptions co
|
|||||||
}
|
}
|
||||||
// Even in ignore-format we have to remove "\text{}, \lyxmathsym{}" parts
|
// Even in ignore-format we have to remove "\text{}, \lyxmathsym{}" parts
|
||||||
while (regex_replace(t, t, "\\\\(text|lyxmathsym|ensuremath)\\{([^\\}]*)\\}", "$2"));
|
while (regex_replace(t, t, "\\\\(text|lyxmathsym|ensuremath)\\{([^\\}]*)\\}", "$2"));
|
||||||
str = from_utf8(t);
|
// remove trailing space, it may have been added by plaintext() in InsetMathHull.cpp
|
||||||
|
size_t t_size = t.size();
|
||||||
|
if (opt.ignoreformat && (t_size > 1) && (t[t_size-1] == ' '))
|
||||||
|
str = from_utf8(t.substr(0, t_size-1));
|
||||||
|
else
|
||||||
|
str = from_utf8(t);
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user