Description
When the Include-macro has a macro with an empty heading, then it is ignored, but the TableOfContents macro does not ignore it. This will lead to very bogus output.
Steps to reproduce
- See below.
Example
[[TableOfContents(1)]] [[Include(TableOfContentsUsesNonExistingIncludeLinks/Example,,editlink)]]
Contents
As you can see, the TOC has an entry, but it does not even appear here (doesn't matter if the included page exists or not - the Include macro never will show a heading for it, but the TOC macro does).
Details
This Wiki.
Workaround
The following patch fixes it, apparently the Include and TableOfContents macros are desynchronized as when to create a heading.
1 --- moin-1.5.6/MoinMoin/macro/TableOfContents.py 2006-09-16 18:36:38.000000000 +0200
2 +++ localwiki/MoinMoin/macro/TableOfContents.py 2006-11-09 12:14:29.000000000 +0100
3 @@ -101,7 +101,7 @@
4 else:
5 # no pagename? ignore it
6 continue
7 - if tmp.group("heading"):
8 + if tmp.group("heading") and tmp.group("hquote"):
9 if tmp.group("htext"):
10 heading = tmp.group("htext")
11 else:
Discussion
Plan
- Priority:
- Assigned to:
- Status: committed patch to 1.5 branch