Bug fixes.

bzr-revno: 1340
This commit is contained in:
Armin Köhler 2011-02-26 12:07:30 +02:00 committed by Raoul Snyman
commit 6e64c07963
1 changed files with 3 additions and 2 deletions

View File

@ -314,14 +314,15 @@ class FoilPresenter(object):
i = 1 i = 1
else: else:
i = 1 i = 1
author_temp = []
for author in strings: for author in strings:
temp = re.split(u',(?=\D{2})|(?<=\D),|\/(?=\D{3,})|(?<=\D);', temp = re.split(u',(?=\D{2})|(?<=\D),|\/(?=\D{3,})|(?<=\D);',
author) author)
for tempx in temp: for tempx in temp:
author_temp.append(tempx) author_temp.append(tempx)
for author in author_temp: for author in author_temp:
regex = u'^[\/,;\-\s]+|[\/,;\-\s]+$|'\ regex = u'^[\/,;\-\s\.]+|[\/,;\-\s\.]+$|'\
'\s*[0-9]{4}\s*[\-\/]?\s*([0-9]{4})?[\/,;\-\s]*$' '\s*[0-9]{4}\s*[\-\/]?\s*([0-9]{4})?[\/,;\-\s\.]*$'
author = re.compile(regex).sub(u'', author) author = re.compile(regex).sub(u'', author)
author = re.compile( author = re.compile(
u'[0-9]{1,2}\.\s?J(ahr)?h\.|um\s*$|vor\s*$').sub(u'', u'[0-9]{1,2}\.\s?J(ahr)?h\.|um\s*$|vor\s*$').sub(u'',