changeset 4014:31a903106d19

additional fix for MoinMoinBugs/GuiEditorExtendsAnchorsToThePageName bug
author Byeongweon [tasyblue@gmail.com]
date Wed, 13 Aug 2008 18:57:08 +0900
parents a258a234af5d
children 73e64899e511
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Wed Aug 13 18:39:51 2008 +0900
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Wed Aug 13 18:57:08 2008 +0900
@@ -1274,8 +1274,8 @@
                 elif desc.startswith('../') and href.endswith(desc[3:]):
                     self.text.append(wikiutil.pagelinkmarkup(desc))
                 # internal link #internal
-                elif desc.startswith('#') and href.endswith(desc):
-                    self.text.append(wikiutil.pagelinkmarkup(desc))
+                elif '#' in href and pagename.startswith(self.pagename):
+                    self.text.append(wikiutil.pagelinkmarkup(href[href.index('#'):], desc))
                 # labeled link
                 else:
                     self.text.append(wikiutil.pagelinkmarkup(pagename, desc))