changeset 2569:5c9e46ab917c

parser should use anchorlink() instead of url()
author Johannes Berg <johannes AT sipsolutions DOT net>
date Thu, 26 Jul 2007 16:25:10 +0200
parents 80eac6fc152a
children 896b81e9764e
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Wed Jul 25 15:52:28 2007 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Jul 26 16:25:10 2007 +0200
@@ -433,9 +433,11 @@
                 words = words * 2
 
             if words[0].startswith('#'): # anchor link
-                return (self.formatter.url(1, words[0]) +
-                        self.formatter.text(words[1]) +
-                        self.formatter.url(0))
+                res = []
+                res.append(self.formatter.anchorlink(1, words[0][1:]))
+                res.append(self.formatter.text(words[1]))
+                res.append(self.formatter.anchorlink(0))
+                return ''.join(res)
         else:
             scheme, rest = scheme_and_rest
             if scheme == "wiki":