You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/25 18:28:00 UTC

[incubator-ponymail-foal] branch master updated: tighten up matching of date span

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new d036c55  tighten up matching of date span
d036c55 is described below

commit d036c5584fb309840aaa003ed7626f94e2bc9429
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Sep 25 13:27:32 2021 -0500

    tighten up matching of date span
---
 server/plugins/defuzzer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins/defuzzer.py b/server/plugins/defuzzer.py
index 8572d0e..080c9dd 100644
--- a/server/plugins/defuzzer.py
+++ b/server/plugins/defuzzer.py
@@ -50,7 +50,7 @@ def defuzz(formdata: dict, nodate: bool = False, list_override: typing.Optional[
     # Advanced date formatting
     elif "d" in formdata:
         # The more/less than N days/weeks/months/years ago
-        m = re.match(r"^([a-z]+)=([0-9Mwyd]+)$", formdata["d"])
+        m = re.match(r"^([a-z]+)=([0-9]+[Mwyd])$", formdata["d"])
         if m:
             t = m.group(1)
             r = m.group(2)