--- a/mercurial/templatefilters.py Mon Jan 25 00:05:22 2010 -0600
+++ b/mercurial/templatefilters.py Mon Jan 25 00:05:27 2010 -0600
@@ -64,7 +64,8 @@
m = para_re.search(text, start)
if not m:
w = len(text)
- while w > start and text[w-1].isspace(): w -= 1
+ while w > start and text[w - 1].isspace():
+ w -= 1
yield text[start:w], text[w:]
break
yield text[start:m.start(0)], m.group(1)
@@ -91,17 +92,21 @@
def domain(author):
'''get domain of author, or empty string if none.'''
f = author.find('@')
- if f == -1: return ''
- author = author[f+1:]
+ if f == -1:
+ return ''
+ author = author[f + 1:]
f = author.find('>')
- if f >= 0: author = author[:f]
+ if f >= 0:
+ author = author[:f]
return author
def person(author):
'''get name of author, or else username.'''
- if not '@' in author: return author
+ if not '@' in author:
+ return author
f = author.find('<')
- if f == -1: return util.shortuser(author)
+ if f == -1:
+ return util.shortuser(author)
return author[:f].rstrip()
def indent(text, prefix):