Fix incorrect handling of some regular expressions in the Search tool. Fixes #1652621 [Pattern matching problem in ebook-editor](https://bugs.launchpad.net/calibre/+bug/1652621)

This commit is contained in:
Kovid Goyal 2016-12-28 08:16:33 +05:30
parent 641de01570
commit 1192de9351
2 changed files with 7 additions and 1 deletions

View File

@ -239,7 +239,7 @@ __all__ = ["compile", "escape", "findall", "finditer", "fullmatch", "match",
"U", "UNICODE", "V0", "VERSION0", "V1", "VERSION1", "X", "VERBOSE", "W",
"WORD", "error", "Regex"]
__version__ = "2.4.112"
__version__ = "2.4.113"
# --------------------------------------------------------------------
# Public interface.

View File

@ -10932,6 +10932,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}
@ -10976,6 +10977,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &end_pos, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}
@ -11019,6 +11021,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &end_pos, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}
@ -11062,6 +11065,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}
@ -11106,6 +11110,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}
@ -11150,6 +11155,7 @@ Py_LOCAL_INLINE(Py_ssize_t) locate_required_string(RE_SafeState* safe_state,
state->text_pos, limit, &is_partial);
else {
found_pos = state->req_pos;
end_pos = state->req_end;
is_partial = FALSE;
}