Opened 13 years ago
Closed 11 years ago
#9211 closed defect (fixed)
FootNote counters go recursive on formatters
Reported by: | A. Przygienda | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | FootNoteMacro |
Severity: | normal | Keywords: | |
Cc: | Andrew Schulman | Trac Release: | 0.12 |
Description
OK, here's the problem, when doing the following
XXX1
YYY2
the 'internal' footnotes are not printed, they are only printed if you give empty footnote before end of formatter. That would be not bad but in the formatter the footnote numbering starts again at 1. Very confusing.
Solution would be to either carry counters across formatters or inside formatter do (i) or letters or something like this
Attachments (2)
Change History (7)
comment:1 Changed 13 years ago by
Changed 13 years ago by
Attachment: | ConfirmsTheIssue.png added |
---|
comment:2 Changed 11 years ago by
Cc: | Andrew Schulman added; anonymous removed |
---|
#11057 closed as a duplicate.
Changed 11 years ago by
Attachment: | t9211.patch added |
---|
comment:4 Changed 11 years ago by
The issue is due to the footnotes being bound to the Formatter
object.
When rendering a page, the template wiki_view.html
calls format_to_html
, which instantiates an HtmlFormatter, which instantiates a Formatter. When formatting a td
tablecell, format_to_html` is called again, and a new Formatter
object is constructed.
Therefore the footnotes bound to the Formatter
in the table cell are not visible outside of the table cell.
The only way I can see to fix this is to bind the footnotes to the context
. t9211.patch implements that change. Please test it out and let me know if you find any cases that don't format properly. I will add unit tests and increment the version.
I think your example didn't display correctly here on Trac 0.10.6, so I threw the following into 0.12.2 to confirm the issue: