changeset 2575:d1ec881c6f86

rewrite include macro heading link
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 27 Jul 2007 11:37:15 +0200
parents 7dd5eab0f701
children f4c371b00fec
files MoinMoin/macro/Include.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/Include.py	Fri Jul 27 11:37:01 2007 +0200
+++ b/MoinMoin/macro/Include.py	Fri Jul 27 11:37:15 2007 +0200
@@ -187,11 +187,12 @@
                               macro.formatter.text(heading) +
                               macro.formatter.heading(0, level))
             else:
-                hid = wikiutil.anchor_name_from_text(heading)
-                link = inc_page.link_to(request, heading, css_class="include-heading-link")
+                url = inc_page.url(request, relative=False)
                 result.extend([
-                    macro.formatter.heading(1, level, id=hid),
-                    macro.formatter.rawHTML(link),
+                    macro.formatter.heading(1, level, id=heading),
+                    macro.formatter.url(1, url, css="include-heading-link"),
+                    macro.formatter.text(heading),
+                    macro.formatter.url(0),
                     macro.formatter.heading(0, level),
                 ])