mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Amend(1) 73188e3
.
This is slightly better, but still not satisfying. Enable format search Given the latexified string \emph{Fox jUMps} and using emphasized regex '\w*', we find 'Fox'. That is OK. But the next find finds ' ', which is not OK. In contrast, searching with '\w+', we find the correct string 'jUMps'.
This commit is contained in:
parent
73188e3821
commit
0e61e6f014
@ -934,10 +934,10 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions const &
|
||||
regex_replace(par_as_string, par_as_string, "(.*)\\\\}$", "$1");
|
||||
// save '\.'
|
||||
regex_replace(par_as_string, par_as_string, "\\\\\\.", "_xxbdotxx_");
|
||||
// handle '.' -> '[^]', replace later as '[^\}]'
|
||||
// handle '.' -> '[^]', replace later as '[^\}\{\\]'
|
||||
regex_replace(par_as_string, par_as_string, "\\.", "[^]");
|
||||
// replace '[^...]' with '[^...\}]'
|
||||
regex_replace(par_as_string, par_as_string, "\\[\\^([^\\\\\\]]*)\\]", "_xxbrlxx_$1\\}_xxbrrxx_");
|
||||
// replace '[^...]' with '[^...\}\{\\]'
|
||||
regex_replace(par_as_string, par_as_string, "\\[\\^([^\\\\\\]]*)\\]", "_xxbrlxx_$1\\}\\{\\\\_xxbrrxx_");
|
||||
regex_replace(par_as_string, par_as_string, "_xxbrlxx_", "[^");
|
||||
regex_replace(par_as_string, par_as_string, "_xxbrrxx_", "]");
|
||||
// restore '\.'
|
||||
|
Loading…
Reference in New Issue
Block a user