tools v1.6

This commit is contained in:
Apprentice Alf
2009-03-25 11:01:34 +00:00
parent 86357531a5
commit 9c73801685
26 changed files with 331 additions and 11 deletions

View File

@@ -468,9 +468,13 @@ class DocParser(object):
if linktype == 'external' :
linkhref = self.link_href[link-1]
linkhtml = '<a href="%s">' % linkhref
else :
ptarget = self.link_page[link-1] - 1
linkhtml = '<a href="#page%04d">' % ptarget
else :
if len(self.link_page) >= link :
ptarget = self.link_page[link-1] - 1
linkhtml = '<a href="#page%04d">' % ptarget
else :
# just link to the current page
linkhtml = '<a href="#' + self.id + '">'
linkhtml += title + '</a>'
pos = parares.rfind(title)
if pos >= 0: