comparison MoinMoin/script/migration/_conv160_wiki.py @ 3018:5dfd26496da8

copied mig scripts from 1.6 branch
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Jan 2008 21:56:19 +0100
parents ea9a38d2ec09
children 2a380f99afa8
comparison
equal deleted inserted replaced
3017:2fb7b7a26690 3018:5dfd26496da8
160 m = re.match(macro_rule, word, re.X|re.U) 160 m = re.match(macro_rule, word, re.X|re.U)
161 macro_name = m.group('macro_name') 161 macro_name = m.group('macro_name')
162 macro_args = m.group('macro_args') 162 macro_args = m.group('macro_args')
163 if macro_name == 'ImageLink': 163 if macro_name == 'ImageLink':
164 fixed, kw, trailing = wikiutil.parse_quoted_separated(macro_args) 164 fixed, kw, trailing = wikiutil.parse_quoted_separated(macro_args)
165 #print "macro_args=%r" % macro_args
166 #print "fixed=%r, kw=%r, trailing=%r" % (fixed, kw, trailing)
165 image, target = (fixed + ['', ''])[:2] 167 image, target = (fixed + ['', ''])[:2]
168 if image is None:
169 image = ''
170 if target is None:
171 target = ''
166 if '://' not in image: 172 if '://' not in image:
167 # if it is not a URL, it is meant as attachment 173 # if it is not a URL, it is meant as attachment
168 image = u'attachment:%s' % image 174 image = u'attachment:%s' % image
169 if not target: 175 if not target:
170 target = image 176 target = image