]> git.lyx.org Git - features.git/commitdiff
FindAdv: Correct next test (keytest/findadv-16)
authorKornel Benko <kornel@lyx.org>
Fri, 29 May 2020 18:04:57 +0000 (20:04 +0200)
committerKornel Benko <kornel@lyx.org>
Fri, 29 May 2020 18:04:57 +0000 (20:04 +0200)
Provided that the LASSERT in src/mathed/InsetMathGrid.cpp:1824
is removed.

development/autotests/findadv-16-in.txt
src/lyxfind.cpp

index 93ffe8c4e24c1a694148d62c71f477eb2828cf70..00b7f6efd65a965d0a63240ed10754470ed39abd 100644 (file)
@@ -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
index c65d2ca7c05011211ac655b6d8e9985e4d41f664..70de6c96a816164aadd5da2ddb6fa88b1243a71a 100644 (file)
@@ -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;