Opened 10 years ago

Last modified 9 years ago

#1616 new defect

titleindex mode removes spaces

Reported by: paresh.solanki@… Owned by: Odd Simon Simonsen
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10


[[TOC(MyPage, AnotherPage, titleindex)]]

results in this output


I would have expected this

  Title Of My Page
  Title Of Another Page

Of course, this is assuming that the title is correctly spaced in the first place. If the titleindex option is not used, the spacing is correct.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by Odd Simon Simonsen

Owner: changed from Alec Thomas to Odd Simon Simonsen
Status: newassigned

This is fixed for 0.11 version as part of #1784 / [2801].

Leaving the ticket open in case I find the inspiration to dig into 0.10 code again.

comment:2 Changed 9 years ago by Odd Simon Simonsen

Status: assignednew

Opened the code and had a look at it. This really is a Trac code problem - or probably related to how the TOC macro would like to use the Formatter code from Trac source. The TOC macro implements its own format method, but it is really just a copy of the Trac one with addition for highlighting of current page.

So, to test it I changed the MyOutlineFormatter in TOC macro to this - essentially just returning the result from Trac.

class MyOutlineFormatter(OutlineFormatter):
    def format(self, active_page, page, text, out, min_depth, max_depth):
        return OutlineFormatter.format(self, text, out, max_depth=6, min_depth=1)

Same problem. So this is derived from the inner workings of the various supporting methods of Looking at that code, I see there is no chance of me finding inspiration to try and solve this for TOC 0.10 version.

(Now where is that Trac 0.11 with proper workflow - need a way to unassign my ownership...)

Modify Ticket

as new The owner will remain Odd Simon Simonsen.

Add Comment

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

Note: See TracTickets for help on using tickets.