Opened 17 years ago
Last modified 17 years ago
#1616 new defect
titleindex mode removes spaces
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Component: | TocMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
[[TOC(MyPage, AnotherPage, titleindex)]]
results in this output
TitleOfMyPage TitleOfAnotherPage
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 17 years ago by
Owner: | changed from Alec Thomas to osimons |
---|---|
Status: | new → assigned |
comment:2 Changed 17 years ago by
Status: | assigned → new |
---|
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 trac.wiki.formatter.Formatter
. 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...)
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.