Description
- The Include macro includes the page content of the included pages without headings. If some text is placed into the "Heading" parameter, then this text is repeated for each included page. This is new in 1.3.4, as it works correctly in 1.3.3.
Steps to reproduce
Place [[Include(^MoinMoinBugs,,3)]] onto some page, and see if you can see which bug is which.
Details
MoinMoin Version |
1.3.4 |
OS and Version |
Win XP |
Python Version |
2.3.3 |
Server Setup |
Standalone |
Server Details |
|
Workaround
- Edit Include.py and remove the second half of the if statement on line 181.
Example
[[Include(^HelpOnMacros/Include,,1,from="show next",items=3)]]
If now comes a H1-Header HelpOnMacros/Include, everything is alright.
- 4 items only with titles
Include: Nothing found for "show next"!
I have made a change to my local include.py macro to support the same syntax as pagelist and fullsearch does in addition to the existing syntax. I am attaching a patch for those who may find some use of it.
Quick mod here to add default to: and from: search strings. Does not affect default behavior (but you may need to change the defaults if you use similar 'tags' for something else!) Not gonna up a patch, it's a few simple additions:
Insert before if from_re: (line 124):
if not from_re: from_re = "##EXPORT"
Insert before if to_re: (line 135):
if not to_re: to_re = "##END"
These do not affect the surounding indentation, they are independent clauses!
To silence returned errors if default from: not found, insert this before result.append(_sysmsg % ('warning', 'Include: ' + _('Nothing found for "%s"!')) % from_re) (line 133):
if not from_re == "##EXPORT":
To silence returned errors if default to: not found, insert this before result.append(_sysmsg % ('warning', 'Include: ' + _('Nothing found for "%s"!')) % from_re) (line 143):
if not to_re == "##END":
Check your indentation after these last two, though!
-- BlueRabbit 2010-06-26 21:32:31
Discussion
Still broken in 1.5.5a. My suggestion would be: (-- TobiasPolzin 2006-11-29 18:40:48)
1 if args.group('heading') and ( args.group('hquote') or args.group('level') ):
Plan
- Priority:
- Assigned to:
- Status:
I fail to see what the bug is, it seems the current behaviour is exactly as documented. -- JohannesBerg 2008-03-18 16:14:28