fix edge case with word condt

This commit is contained in:
Kyryl Melekhin committed 2021-09-18 09:49:29 +00:00
1 parent e4e5c3aa97
commit cc17c0bb05
2 files changed
+5 -1

No files matched your search

+2 -1
View File
@@ -513,7 +513,8 @@ for (j = 0; j < nsubp; j++) s1->sub[j] = nsub->sub[j]; \
npc += 2; \
goto rec##nn; \
case WBEG: \
if ((sp != s && isword(sp)) || !isword(_sp)) \
if (((sp != s || sp != _sp) && isword(sp)) \
|| !isword(_sp)) \
deccheck(nn) \
npc++; goto rec##nn; \
case WEND: \
+3
View File
@@ -114,6 +114,7 @@ qwerty.*$
(.+)(.+)
a(?:b|c|d){4,5}(.)
(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))
\\\\<abc
"
input="\
abcdef
@@ -229,6 +230,7 @@ abaaa
abcd
acdbcdbe
cabbbb
dabc
"
expect="\
(0,3)
@@ -344,6 +346,7 @@ expect="\
(0,4)(0,3)(3,4)
(0,7)(6,7)
(0,6)
-nomatch-
(0,0)
"