mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
Update Field Searches to match multi-line fields
Currently, field searches are confirmed by a regex search with the single option of case-insensitive (?i), and with the beginning and ending markers ^ and $. Since multi-line is not enabled, and re.DOTALL (option s) is not enabled, the field search will fail for any field with a new line
This commit is contained in:
parent
97b858edd8
commit
2f74908b25
1 changed files with 1 additions and 1 deletions
|
@ -433,7 +433,7 @@ where mid in %s and flds like ? escape '\\'""" % (
|
|||
ord = mods[str(mid)][1]
|
||||
strg = flds[ord]
|
||||
try:
|
||||
if re.search("(?i)^"+regex+"$", strg):
|
||||
if re.search("(?si)^"+regex+"$", strg):
|
||||
nids.append(id)
|
||||
except sre_constants.error:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue