comparison MoinMoin/macro/FootNote.py @ 3056:b7914fb12243

macro.FootNote: bug fix for MoinMoinBugs/FootNoteNumbering (ported from 1.6)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 21 Feb 2008 19:41:15 +0100
parents 01f05e74aa9c
children 1ad6243cdf06
comparison
equal deleted inserted replaced
3055:29d236eb2ab7 3056:b7914fb12243
68 68
69 result.append(formatter.div(1, css_class='footnotes')) 69 result.append(formatter.div(1, css_class='footnotes'))
70 70
71 # Add footnotes list 71 # Add footnotes list
72 result.append(formatter.number_list(1)) 72 result.append(formatter.number_list(1))
73 73 subidx = 0
74 for ctr in range(request.footnote_ctr): 74 for ctr in range(request.footnote_ctr):
75 fn_txt = request.footnotes[ctr] 75 fn_txt = request.footnotes[ctr]
76 if not fn_txt in request.footnotes: 76 if not fn_txt in request.footnotes:
77 continue 77 continue
78 this_txt_footnotes, fwdlink_id, showidx = request.footnotes[fn_txt] 78 this_txt_footnotes, fwdlink_id, showidx = request.footnotes[fn_txt]
84 result.append(formatter.anchorlink(1, None, id=fwdlink_id)) 84 result.append(formatter.anchorlink(1, None, id=fwdlink_id))
85 result.append(formatter.anchorlink(0)) 85 result.append(formatter.anchorlink(0))
86 result.append(wikiutil.renderText(request, WikiParser, fn_txt)) 86 result.append(wikiutil.renderText(request, WikiParser, fn_txt))
87 87
88 items = [] 88 items = []
89 subidx = 0 89 # ToDo check why that loop is needed?
90 for backlink_id, idx in this_txt_footnotes: 90 for backlink_id, idx in this_txt_footnotes:
91 # Add item 91 # Add item
92 item = formatter.anchorlink(1, backlink_id) 92 item = formatter.anchorlink(1, backlink_id)
93 item += formatter.text(str(subidx+1)) 93 item += formatter.text(str(subidx+1))
94 item += formatter.anchorlink(0) 94 item += formatter.anchorlink(0)