changeset 2860:60f95d2b090b

Creole parser: replaced hardcoded ../ with PARENT_PREFIX in interwiki
author Radomir Dopieralski <moindev@sheep.art.pl>
date Sun, 23 Sep 2007 23:00:01 +0200
parents 2087924a60f1
children 244f9e89fb15 1c0e2cdc2d82
files MoinMoin/parser/text_creole.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_creole.py	Sun Sep 23 22:57:09 2007 +0200
+++ b/MoinMoin/parser/text_creole.py	Sun Sep 23 23:00:01 2007 +0200
@@ -638,8 +638,8 @@
     def page_link_emit(self, node):
         word = node.content
         # handle relative links
-        if word.startswith('..%s' % wikiutil.CHILD_PREFIX):
-            word = word[3:] # remove the dots
+        if word.startswith(wikiutil.PARENT_PREFIX):
+            word = word[wikiutil.PARENT_PREFIX_LEN:]
         elif word.startswith(wikiutil.CHILD_PREFIX):
             word = "%s/%s" % (self.formatter.page.page_name,
                 word[wikiutil.CHILD_PREFIX_LEN:])