commit 9da4390a9b6e79f1fdecc05d3c242bbc993faecd
Author: Kornel Benko <kor...@lyx.org>
Date:   Fri May 29 20:04:57 2020 +0200

    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 93ffe8c..00b7f6e 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 c65d2ca..70de6c9 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;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to