mercurial/templatefilters.py
changeset 16686 67964cda8701
parent 16360 e5788269741a
child 17638 e2711975be00
equal deleted inserted replaced
16685:43d55088415a 16686:67964cda8701
   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('@')