diff MoinMoin/script/migration/_conv160_wiki.py @ 2759:fe6098e2a895

1.6 converter: remove unused code, generate simpler interwiki markup if possible
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 25 Aug 2007 16:39:42 +0200
parents 7f6093028a66
children 3a6a25169f55
line wrap: on
line diff
--- a/MoinMoin/script/migration/_conv160_wiki.py	Sat Aug 25 15:27:59 2007 +0200
+++ b/MoinMoin/script/migration/_conv160_wiki.py	Sat Aug 25 16:39:42 2007 +0200
@@ -217,14 +217,11 @@
         wikitail = wikiutil.url_unquote(wikitail)
 
         # link to self?
-        if wikitag is None:
-            if wikiutil.isPicture(wikitail):
-                return '{{%s%s}}' % (wikitail, text)
-            else:
-                return '[[%s%s]]' % (wikitail, text)
+        if wikiutil.isPicture(wikitail):
+            return '{{%s:%s%s}}' % (wikitag, wikitail, text)
         else:
-            if wikiutil.isPicture(wikitail):
-                return '{{%s:%s%s}}' % (wikitag, wikitail, text)
+            if ' ' not in wikitail and not text:
+                return '%s:%s' % (wikitag, wikitail)
             else:
                 return '[[%s:%s%s]]' % (wikitag, wikitail, text)