Description

Steps to reproduce

Details

MoinMoin Version

1.3.4

OS and Version

Win XP

Python Version

2.3.3

Server Setup

Standalone

Server Details

Workaround

   1  before:
   2   if args.group('heading') and args.group('hquote'):
   3  after:
   4   if args.group('heading'):

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.

Include.patch


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

I fail to see what the bug is, it seems the current behaviour is exactly as documented. -- JohannesBerg 2008-03-18 16:14:28


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/IncludeDoesNotGenerateHeadings (last edited 2008-03-18 16:14:29 by JohannesBerg)