changeset 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 b85e4879fdea
children d373e273cd7b
files MoinMoin/script/migration/_conv160_wiki.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
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)