mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
FindAdv: Amend f845a4e9
Also do not remove '\n' if in non-format-search mode. Otherwise '\n' cannot be found with regex '\s'
This commit is contained in:
parent
f845a4e9a3
commit
cd6d21ebb3
@ -3986,12 +3986,14 @@ static string convertLF2Space(docstring const &s, bool ignore_format)
|
||||
size_t pos;
|
||||
size_t start = 0;
|
||||
size_t end = s.size() - 1;
|
||||
while (s[start] == '\n' && start <= end)
|
||||
start++;
|
||||
while (end >= start && s[end] == '\n')
|
||||
end--;
|
||||
if (start >= end + 1)
|
||||
return "";
|
||||
if (!ignore_format) {
|
||||
while (s[start] == '\n' && start <= end)
|
||||
start++;
|
||||
while (end >= start && s[end] == '\n')
|
||||
end--;
|
||||
if (start >= end + 1)
|
||||
return "";
|
||||
}
|
||||
do {
|
||||
bool dospace = true;
|
||||
int skip = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user