Description
Headers from Include macro (and included pages) no longer appear in table of contents
Steps to reproduce
- Create a page that has a table of contents
- Include some other pages
- While the included pages are included, the headings do not appear in the table of contents
Example
Markup
<<TableOfContents(4)>> <<Include(IncludedPage1, "Included Page 1", 2)>> <<Include(IncludedPage2, "Included Page 2", 2)>>
Expected TOC (works in Moin 1.5.8)
Contents 1. Included Page 1 2. Included Page 2
Actual TOC
Contents
Component selection
- general
Details
No traceback. Server 1
MoinMoin Version |
1.6.1 |
OS and Version |
CentOS 5 |
Python Version |
2.4.3 (#1, Mar 14 2007, 19:01:42) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] |
Server Setup |
|
Server Details |
AMD64 |
Language you are using the wiki in |
en |
Server 2
MoinMoin Version |
1.6.2 |
OS and Version |
CentOS 4 |
Python Version |
2.3.4 (#1, Dec 11 2007, 05:28:55) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] |
Server Setup |
|
Server Details |
AMD64 |
Language you are using the wiki in |
en |
Server 3
MoinMoin Version |
1.6.1 |
OS and Version |
CentOS 4 |
Python Version |
2.3.4 (#1, Dec 11 2007, 05:27:57) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] |
Server Setup |
|
Server Details |
Intel-32 (P4) |
Language you are using the wiki in |
en |
Workaround
Discussion
Changing inc_re in TableOfContents.py fixes the problem
diff
self.macro = macro self._ = self.macro.request.getText - self.inc_re = re.compile(r"^\[\[Include\((.*)\)\]\]") + self.inc_re = re.compile(r"^\<\<Include\((.*)\)\>\>") self.arg_re = re.compile(_args_re_pattern) self.head_re = re.compile(_title_re) # single lines only self.pre_re = re.compile(r'\{\{\{.+?\}\}\}', re.S)
Plan
- Priority:
- Assigned to:
Status: fixed by http://hg.moinmo.in/moin/1.6/rev/5289ff0ea669, code in 1.7 is very different, no fix needed there