From aa564134b01555f0288e16ae09ca5a87533d3155 Mon Sep 17 00:00:00 2001 From: Bernardo Innocenti Date: Mon, 17 Dec 2007 10:41:29 +0100 Subject: [PATCH] Support image links --- geekigeeki.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 56d71f1..83b6142 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -389,12 +389,16 @@ class PageFormatter: return apply(macro, (name, descr)) elif img_re.match(name): return '%s' % (name, name, descr) - elif url_re.match(name): - return '%s' % (name, descr) - elif name.startswith('/'): - return '%s' % (name, descr) else: - return link_tag(name, descr, 'wikilink') + if img_re.match(descr): + descr = '' + + if url_re.match(name): + return '%s' % (name, descr) + elif name.startswith('/'): + return '%s' % (name, descr) + else: + return link_tag(name, descr, 'wikilink') def _email_repl(self, word): return '%s' % (word, word) -- 2.25.1