26 lines
1,005 B
Diff
26 lines
1,005 B
Diff
|
From 12a5ef9e641ac65bf2f5f2a8427d2f85466b35ca Mon Sep 17 00:00:00 2001
|
||
|
From: "build@apk-groulx" <build@apk-groulx.praxis>
|
||
|
Date: Sun, 31 Jul 2022 16:32:21 +0000
|
||
|
Subject: [PATCH 1/1] fix for parsing error due to regex version
|
||
|
|
||
|
---
|
||
|
dateparser/languages/locale.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/dateparser/languages/locale.py b/dateparser/languages/locale.py
|
||
|
index 0cb5785..a1b3c8f 100644
|
||
|
--- a/dateparser/languages/locale.py
|
||
|
+++ b/dateparser/languages/locale.py
|
||
|
@@ -169,7 +169,7 @@ class Locale:
|
||
|
if normalize:
|
||
|
value = list(map(normalize_unicode, value))
|
||
|
pattern = '|'.join(sorted(value, key=len, reverse=True))
|
||
|
- pattern = DIGIT_GROUP_PATTERN.sub(r'?P<n>\d+', pattern)
|
||
|
+ pattern = pattern.replace(r'\d+', r'?P<n>\d+')
|
||
|
pattern = re.compile(r'^(?:{})$'.format(pattern), re.UNICODE | re.IGNORECASE)
|
||
|
relative_dictionary[pattern] = key
|
||
|
return relative_dictionary
|
||
|
--
|
||
|
2.36.2
|
||
|
|