Details

Applies to
1.6-docbook-mvirkkil
Purpose
internal links without leading /
Description

For internal Links to work between two DocBook-documents using yelp I had to rewrite "/Pagename" to "Pagename". Apperently / seems to be the InterWiki URL for "Self" = internal linking.

Patch

   1 --- /home/matthias/Desktop/moin-docbook-untouched/MoinMoin/formatter/text_docbook.py	2007-09-29 23:37:27.000000000 +0200
   2 +++ /opt/moin-docbook/MoinMoin/formatter/text_docbook.py	2007-09-29 22:42:51.000000000 +0200
   3 @@ -318,7 +318,12 @@
   4  
   5          wikitag, wikiurl, wikitail, wikitag_bad = wikiutil.resolve_wiki(self.request, '%s:"%s"' % (interwiki, pagename))
   6          wikiurl = wikiutil.mapURL(self.request, wikiurl)
   7 -        href = wikiutil.join_wiki(wikiurl, wikitail)
   8 +
   9 +        # '/' = Self
  10 +        if wikiurl == '/':
  11 +            href = wikitail
  12 +        else:
  13 +            href = wikiutil.join_wiki(wikiurl, wikitail)
  14  
  15          return self.url(on, href)
  16  

text_docbook.patch

Discussion

I am a Python-Newbie currently tinkering around to get a Docbook-Snapshot for http://wiki.ubuntuusers.de/ so I installed 1.6-docbook-mvirkkil DocBook branch as a DesktopEdition onto my PC and try to get it to work properly. MatthiasMailaender

Plan


CategoryMoinMoinPatch

MoinMoin: MoinMoinPatch/DocbookPagelinks (last edited 2007-10-29 19:09:27 by localhost)