comparison MoinMoin/script/migration/_conv160a_wiki.py @ 4636:83483f4e26cb

merged moin/1.8
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 07 Mar 2009 22:38:00 +0100
parents 3caaa8c74c41 b0319cfcb1bc
children 10965bc1ee3c
comparison
equal deleted inserted replaced
4629:554e1d780e3b 4636:83483f4e26cb
412 if target == text: 412 if target == text:
413 return '[[%s]]' % target 413 return '[[%s]]' % target
414 else: 414 else:
415 return '[[%s|%s]]' % (target, text) 415 return '[[%s|%s]]' % (target, text)
416 416
417 def _parser_repl(self, word):
418 self.in_pre = 'no_parser'
419 return word
420
417 def _pre_repl(self, word): 421 def _pre_repl(self, word):
418 w = word.strip() 422 w = word.strip()
419 if w == '{{{' and not self.in_pre: 423 if w == '{{{' and not self.in_pre:
420 self.in_pre = True 424 self.in_pre = 'no_parser'
421 elif w == '}}}' and self.in_pre: 425 elif w == '}}}' and self.in_pre:
422 self.in_pre = False 426 self.in_pre = None
423 return word
424
425 def _processor_repl(self, word):
426 self.in_pre = True
427 return word 427 return word
428 428
429 def scan(self, scan_re, line): 429 def scan(self, scan_re, line):
430 """ Scans one line - append text before match, invoke replace() with match, and add text after match. """ 430 """ Scans one line - append text before match, invoke replace() with match, and add text after match. """
431 result = [] 431 result = []