return apply(macro, (name, descr))
elif img_re.match(name):
return '<a href="%s"><img border="0" src="%s" alt="%s" /></a>' % (name, name, descr)
- elif url_re.match(name):
- return '<a href="%s" rel="nofollow" class="external">%s</a>' % (name, descr)
- elif name.startswith('/'):
- return '<a href="%s">%s</a>' % (name, descr)
else:
- return link_tag(name, descr, 'wikilink')
+ if img_re.match(descr):
+ descr = '<img border="0" src="' + descr + '" />'
+
+ if url_re.match(name):
+ return '<a href="%s" rel="nofollow" class="external">%s</a>' % (name, descr)
+ elif name.startswith('/'):
+ return '<a href="%s">%s</a>' % (name, descr)
+ else:
+ return link_tag(name, descr, 'wikilink')
def _email_repl(self, word):
return '<a href="mailto:%s">%s</a>' % (word, word)