escape something being interpreted as a directive
authorJon Dowland <jon@alcopop.org>
Tue, 17 Nov 2009 15:55:01 +0000 (15:55 +0000)
committerJon Dowland <jon@alcopop.org>
Tue, 17 Nov 2009 15:55:01 +0000 (15:55 +0000)
doc/tips/convert_mediawiki_to_ikiwiki.mdwn

index 45df683de94a222ad98968c8f5675de87858b4fa..3b8e5043c8c14ca6a2aafa21291d1f3017c860e5 100644 (file)
@@ -118,7 +118,7 @@ into an ikiwiki tag name using a script such as
     pattern =  r'\[\[Category:([^\]]+)\]\]'
     
     def manglecat(mo):
     pattern =  r'\[\[Category:([^\]]+)\]\]'
     
     def manglecat(mo):
-            return '[[!tag %s]]' % mo.group(1).strip().replace(' ','_')
+            return '[\[!tag %s]]' % mo.group(1).strip().replace(' ','_')
             
     for line in sys.stdin.readlines():
             res = re.match(pattern, line)
             
     for line in sys.stdin.readlines():
             res = re.match(pattern, line)