FindAdv: Correct next test (keytest/findadv-16)

Provided that the LASSERT in src/mathed/InsetMathGrid.cpp:1824
is removed.
This commit is contained in:
Kornel Benko 2020-05-29 20:04:57 +02:00
parent 8028dce129
commit 9da4390a9b
2 changed files with 3 additions and 2 deletions

View 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

View 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;