rename smileys() to inherit()

...as it's generic wrapper to call parent class method there
This commit is contained in:
Elan Ruusamäe 2012-09-18 18:22:15 +02:00
parent 1eb023b9ca
commit 19194ac9c1

View file

@ -281,7 +281,8 @@ class Formatter(FormatterBase):
mail = mail.replace(' DOT ', '.') mail = mail.replace(' DOT ', '.')
return '[[%s|%s]]' % (mail, args) return '[[%s|%s]]' % (mail, args)
def smileys(args): # function which will just do what parent class would
def inherit(args):
return apply(FormatterBase.macro, (self, macro_obj, name, args)) return apply(FormatterBase.macro, (self, macro_obj, name, args))
try: try:
@ -289,7 +290,7 @@ class Formatter(FormatterBase):
'BR' : '\\\\', 'BR' : '\\\\',
'MailTo' : email, 'MailTo' : email,
'GetText' : args, 'GetText' : args,
'ShowSmileys' : smileys, 'ShowSmileys' : inherit,
}[name] }[name]
except KeyError: except KeyError:
lookup = '/* UndefinedMacro: %s(%s) */' % (name, args) lookup = '/* UndefinedMacro: %s(%s) */' % (name, args)