Mercurial > hg > mercurial-crew
diff mercurial/templatefilters.py @ 13951:7a6a8a069aac
templatefilters: improve person() for john.doe@example.com
BEFORE: person('john.doe@example.com') -> 'john'
AFTER: person('john.doe@example.com') -> 'john doe'
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 17 Apr 2011 21:34:25 +0200 |
parents | c49cddce0a81 |
children | 1f46be4689ed |
line wrap: on
line diff
--- a/mercurial/templatefilters.py +++ b/mercurial/templatefilters.py @@ -245,9 +245,10 @@ if not '@' in author: return author f = author.find('<') - if f == -1: - return util.shortuser(author) - return author[:f].rstrip() + if f != -1: + return author[:f].rstrip() + f = author.find('@') + return author[:f].replace('.', ' ') def rfc3339date(text): """:rfc3339date: Date. Returns a date using the Internet date format