From fbc4d6639e75dd726fdcadc1129ae0900468e9d2 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Wed, 13 Aug 2008 13:35:43 +0200 Subject: [PATCH] Bugfix hurl handling of image links --- geekigeeki.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/geekigeeki.py b/geekigeeki.py index 287a945..8de46ab 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -360,12 +360,11 @@ class WikiFormatter: def _hurl_repl(self, word): m = link_re.match(word) name = m.group(1) - if m.group(2) is None: + descr = m.group(2) + if descr is None: descr = name elif img_re.match(m.group(2)): descr = '' - else: - descr = m.group(2) return link_tag(name, descr, 'wikilink') -- 2.25.1