From c248767c1d606db956902d9dcca231aceef5f7ca Mon Sep 17 00:00:00 2001 From: Fedir Zinchuk Date: Sun, 21 Dec 2014 15:45:57 +0200 Subject: [PATCH] Fix parsing for the span date in Ukrainian language, was conflict with b.c.e. string --- gramps/gen/datehandler/_date_uk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gramps/gen/datehandler/_date_uk.py b/gramps/gen/datehandler/_date_uk.py index 1fed3d3bf..445589b69 100644 --- a/gramps/gen/datehandler/_date_uk.py +++ b/gramps/gen/datehandler/_date_uk.py @@ -102,10 +102,10 @@ class DateParserUK(DateParser): _span_1 = ['з', 'від'] # b.c.e. pattern also have "до" so skip "до н." - _span_2 = ['по', 'до?!\sн'] + _span_2 = ['по', 'до(?!\s+н)'] _range_1 = ['між'] _range_2 = ['і', 'та'] - self._span = re.compile("(%s)\s+(?P.+)\s+(%s)\s+(?P.+)" % + self._span = re.compile("(%s)\s+(?P.+)\s+(%s)\s+(?P.+)" % ('|'.join(_span_1), '|'.join(_span_2)), re.IGNORECASE) self._range = re.compile("(%s)\s+(?P.+)\s+(%s)\s+(?P.+)" %