comparison MoinMoin/script/migration/_conv160a_wiki.py @ 6103:500f68d3e2fd

remove our own usage of python_compatibility module
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 06 Sep 2016 01:00:25 +0200
parents 6cdf52df1219
children
comparison
equal deleted inserted replaced
6102:df21062e294d 6103:500f68d3e2fd
19 i18n.wikiLanguages = lambda: {} 19 i18n.wikiLanguages = lambda: {}
20 20
21 from MoinMoin import config, macro, wikiutil 21 from MoinMoin import config, macro, wikiutil
22 from MoinMoin.action import AttachFile 22 from MoinMoin.action import AttachFile
23 from MoinMoin.Page import Page 23 from MoinMoin.Page import Page
24 from MoinMoin.support.python_compatibility import rsplit
25 24
26 import wikiutil160a 25 import wikiutil160a
27 from text_moin160a_wiki import Parser 26 from text_moin160a_wiki import Parser
28 27
29 QUOTE_CHARS = u"'\"" 28 QUOTE_CHARS = u"'\""
166 # that means we do not rename it! 165 # that means we do not rename it!
167 new_name = file_name 166 new_name = file_name
168 return new_name 167 return new_name
169 168
170 def _replace_target(self, target): 169 def _replace_target(self, target):
171 target_and_anchor = rsplit(target, '#', 1) 170 target_and_anchor = target.rsplit('#', 1)
172 if len(target_and_anchor) > 1: 171 if len(target_and_anchor) > 1:
173 target, anchor = target_and_anchor 172 target, anchor = target_and_anchor
174 target = self._replace(('PAGE', target)) 173 target = self._replace(('PAGE', target))
175 return '%s#%s' % (target, anchor) 174 return '%s#%s' % (target, anchor)
176 else: 175 else: