diff MoinMoin/macro/__init__.py @ 1674:a45b23e6217d

minor MailTo macro change from docbook branch
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Nov 2006 14:33:57 +0100
parents a4f0632414da
children e54f99c9beba
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Sun Nov 19 12:32:25 2006 +0100
+++ b/MoinMoin/macro/__init__.py	Sun Nov 19 14:33:57 2006 +0100
@@ -409,7 +409,7 @@
 
     def _macro_MailTo(self, args):
         from MoinMoin.mail.sendmail import decodeSpamSafeEmail
-
+        result=''
         args = args or ''
         if ',' not in args:
             email = args
@@ -428,13 +428,13 @@
         else:
             # unknown user, maybe even a spambot, so
             # just return text as given in macro args
-            email = self.formatter.code(1) + \
+            
+            if text:
+                result = self.formatter.text(text+" ")
+            
+            result += self.formatter.code(1) + \
                 self.formatter.text("<%s>" % email) + \
                 self.formatter.code(0)
-            if text:
-                result = self.formatter.text(text) + " " + email
-            else:
-                result = email
 
         return result