Description

[[Include(WikiName,,,to="here")]] start to look for "here" from the page header, so if you have a comment with the target, no real text will be included.

Example

Here is a page content we are going to include:

## It does not make sense to include this comment here

But this text is expected to be included, up to here <-

This line should not be included.

Include \. from a page with a dot

[[Include(/WithComment,,,to="here")]]

Details

This wiki.

Workaround

Be carefull with what you put in the comments, or select better to regular expression.

Discussion

It not clear if this is wanted behavior or a bug. On one side, we want the macro to do the right thing, on the other side, it becoming too complex and the user should be responsible for the page content.

I think we should ignore the commets if we don't include them.

I use this functionality for a personal log, as shown on SimpleMoinLog, so I'd be upset if Include started ignoring comments - -- JohnWhitlock 2004-11-18 22:02:48

I also use comments to mark the begining and end of excerpts for the include macro, if this feature was removed, then some other way to make invisible excerpt marks in the text would be needed.

Plan

Add a comment about this behavior in the docs.


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/IncludeShouldIgnoreComments (last edited 2007-10-29 19:08:55 by localhost)