changeset 13587:9fb6850d5d97

templatefilters: match filter keys and function names
author Patrick Mezard <pmezard@gmail.com>
date Sat, 12 Mar 2011 12:46:31 +0100
parents 57150dc5a9c7
children b8b881f3f3a7
files mercurial/templatefilters.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Sat Mar 12 12:46:31 2011 +0100
+++ b/mercurial/templatefilters.py	Sat Mar 12 12:46:31 2011 +0100
@@ -81,7 +81,7 @@
     except IndexError:
         return ''
 
-def nl2br(text):
+def addbreaks(text):
     '''replace raw newlines with xhtml line breaks.'''
     return text.replace('\n', '<br/>\n')
 
@@ -192,7 +192,7 @@
     return str or "(none)"
 
 filters = {
-    "addbreaks": nl2br,
+    "addbreaks": addbreaks,
     "age": age,
     "basename": os.path.basename,
     "date": lambda x: util.datestr(x),