From 9da4390a9b6e79f1fdecc05d3c242bbc993faecd Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Fri, 29 May 2020 20:04:57 +0200 Subject: [PATCH] FindAdv: Correct next test (keytest/findadv-16) Provided that the LASSERT in src/mathed/InsetMathGrid.cpp:1824 is removed. --- development/autotests/findadv-16-in.txt | 1 + src/lyxfind.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/development/autotests/findadv-16-in.txt b/development/autotests/findadv-16-in.txt index 93ffe8c4e2..00b7f6efd6 100644 --- a/development/autotests/findadv-16-in.txt +++ b/development/autotests/findadv-16-in.txt @@ -14,6 +14,7 @@ KK: \Cs KK: \CF # Uncheck ignore format KK: \At\Ai\Ah +KK: \CF KK: \CM\C\[F24] KK: x^2\[Return] Cr: ^.*Putting diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index c65d2ca7c0..70de6c96a8 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -970,7 +970,7 @@ static size_t identifyLeading(string const & s) || regex_replace(t, t, REGEX_BOS "\\$", "") || regex_replace(t, t, REGEX_BOS "\\\\\\[", "") || regex_replace(t, t, REGEX_BOS " ?\\\\item\\{[a-z]+\\}", "") - || regex_replace(t, t, REGEX_BOS "\\\\begin\\{[a-zA-Z_]*\\*?\\} ", "")) + || regex_replace(t, t, REGEX_BOS "\\\\begin\\{[a-zA-Z_]*\\*?\\}", "")) ; LYXERR(Debug::FIND, " after removing leading $, \\[ , \\emph{, \\textbf{, etc.: '" << t << "'"); return s.find(t); @@ -2713,7 +2713,7 @@ static int identifyClosing(string & t) continue; if (regex_replace(t, t, "(.*[^\\\\])\\\\\\]" REGEX_EOS, "$1")) continue; - if (regex_replace(t, t, "(.*[^\\\\]) \\\\end\\{[a-zA-Z_]*\\*?\\}" REGEX_EOS, "$1")) + if (regex_replace(t, t, "(.*[^\\\\])\\\\end\\{[a-zA-Z_]*\\*?\\}" REGEX_EOS, "$1")) continue; if (regex_replace(t, t, "(.*[^\\\\])\\}" REGEX_EOS, "$1")) { ++open_braces; -- 2.39.2