diff MoinMoin/script/migration/_conv160a_wiki.py @ 4630:b0319cfcb1bc

1.6.0a mig script/converter: fixed converter bug for parser sections, added unit tests for pre and parser sections
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 18 Feb 2009 06:53:55 +0100
parents b120d9978144
children 83483f4e26cb
line wrap: on
line diff
--- a/MoinMoin/script/migration/_conv160a_wiki.py	Sat Feb 14 22:21:34 2009 +0100
+++ b/MoinMoin/script/migration/_conv160a_wiki.py	Wed Feb 18 06:53:55 2009 +0100
@@ -414,16 +414,16 @@
             else:
                 return '[[%s|%s]]' % (target, text)
 
+    def _parser_repl(self, word):
+        self.in_pre = 'no_parser'
+        return word
+
     def _pre_repl(self, word):
         w = word.strip()
         if w == '{{{' and not self.in_pre:
-            self.in_pre = True
+            self.in_pre = 'no_parser'
         elif w == '}}}' and self.in_pre:
-            self.in_pre = False
-        return word
-
-    def _processor_repl(self, word):
-        self.in_pre = True
+            self.in_pre = None
         return word
 
     def scan(self, scan_re, line):