comparison MoinMoin/script/migration/_conv160a_wiki.py @ 4490:b120d9978144

1.6.0a mig script/converter: fixed inline/drawing conversion, added more tests
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 16 Jan 2009 12:55:31 +0100
parents a835ada897e0
children 3caaa8c74c41 b0319cfcb1bc
comparison
equal deleted inserted replaced
4489:a835ada897e0 4490:b120d9978144
392 scheme = scheme_and_rest[0] 392 scheme = scheme_and_rest[0]
393 if scheme == "wiki": 393 if scheme == "wiki":
394 return self.interwiki(word, pretty_url=1) 394 return self.interwiki(word, pretty_url=1)
395 if scheme in self.attachment_schemas: 395 if scheme in self.attachment_schemas:
396 m = self.attachment(word) 396 m = self.attachment(word)
397 # with url_bracket markup, 1.6.0a parser does not embed pictures, but link! 397 if scheme == 'attachment':
398 return '[[%s]]' % m[2:-2] 398 # with url_bracket markup, 1.6.0a parser does not embed pictures, but link!
399 return '[[%s]]' % m[2:-2]
400 else:
401 # drawing and inline
402 return m
399 403
400 words = word.split(None, 1) 404 words = word.split(None, 1)
401 if len(words) == 1: 405 if len(words) == 1:
402 words = words * 2 406 words = words * 2
403 407