equal
deleted
inserted
replaced
258 >>> person('Foo "buz" Bar <foo@bar>') |
258 >>> person('Foo "buz" Bar <foo@bar>') |
259 'Foo "buz" Bar' |
259 'Foo "buz" Bar' |
260 >>> person('"Foo Bar <foo@bar>') |
260 >>> person('"Foo Bar <foo@bar>') |
261 'Foo Bar' |
261 'Foo Bar' |
262 """ |
262 """ |
263 if not '@' in author: |
263 if '@' not in author: |
264 return author |
264 return author |
265 f = author.find('<') |
265 f = author.find('<') |
266 if f != -1: |
266 if f != -1: |
267 return author[:f].strip(' "').replace('\\"', '"') |
267 return author[:f].strip(' "').replace('\\"', '"') |
268 f = author.find('@') |
268 f = author.find('@') |