Opened 11 years ago

Last modified 10 years ago

#1616 new defect

titleindex mode removes spaces

Reported by: paresh.solanki@… Owned by: osimons
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 11 years ago by osimons

Owner: changed from Alec Thomas to osimons
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 10 years ago by osimons

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

Change Properties
Set your email in Preferences
as new The owner will remain osimons.

Add Comment

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

Note: See TracTickets for help on using tickets.