Mercurial > public > mercurial-scm > hg-stable
diff mercurial/templater.py @ 5975:75d9fe70c654
templater: move email function to util
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 31 Jan 2008 14:44:19 -0600 |
parents | bed929082b58 |
children | 9f1e6ab76069 |
line wrap: on
line diff
--- a/mercurial/templater.py Thu Jan 31 14:44:19 2008 -0600 +++ b/mercurial/templater.py Thu Jan 31 14:44:19 2008 -0600 @@ -214,12 +214,6 @@ if f >= 0: author = author[:f] return author -def email(author): - '''get email of author.''' - r = author.find('>') - if r == -1: r = None - return author[author.find('<')+1:r] - def person(author): '''get name of author, or else username.''' f = author.find('<') @@ -257,7 +251,7 @@ "age": age, "date": lambda x: util.datestr(x), "domain": domain, - "email": email, + "email": util.email, "escape": lambda x: cgi.escape(x, True), "fill68": lambda x: fill(x, width=68), "fill76": lambda x: fill(x, width=76),