Modify

Opened 10 years ago

Last modified 5 years ago

#11921 new defect

Footnote numbers are duplicated in Trac 1.0.1 ticket preview

Reported by: Chris Nelson Owned by:
Priority: low Component: FootNoteMacro
Severity: normal Keywords: preview
Cc: Trac Release: 1.0

Description

If you put one or more footnotes ([[FootNote(some text)]]) and the macro invocation to *display* the footnotes ([[FootNote()]]) in a ticket comment, while you work, the footnotes show up in the preview as

----
1. 1. some text

but once you've submitted it, it shows up as

----
1. some text

so, the macro has some weird interaction with the new preview feature. For all I know, if you clicked <<Preview>> in 0.11 it did the same thing.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Ryan J Ollos

The issue is due to the same mechanism that causes an ugly rendering of a #!diff, the first time that a diff is added to the page and prior to an explicit Preview. It is discussed in trac:#10470.

The footnotes.css stylesheet has a rule list-style: none, but there is no mechanism to add footnotes.css to the page during autopreview. The stylesheet is added to the Request on macro invocation, but the stylesheet doesn't get added to the page. The stylesheet is added to the page during an explicit Preview, so this is a Trac >= 1.0 issue only.

One inelegant workaround is:

  • footnotemacro/macro.py

     
    117117                                class_='sigil',
    118118                            ),
    119119                            ' ',
    120                             markup,
     120                            markup, style='list-style: none;',
    121121                            id='FootNote%s' % (i+1),
    122122                        ) for i, (content, markup) in enumerate(footnotes)
    123123                                                   if markup],

comment:2 Changed 5 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.