Description
If a user provides to="regex" and/or from="regex" arguments to the Include macro and the page that is being included is cached, the whole cached copy gets included rather than the desired piece.
Example
[[Include(HelpTemplate,, to="^=== Example")]] includes the whole HelpTemplate page rather than stopping before the "Example" heading:
Template for Help Pages
Text.
Details
MoinMoin Version |
1.2.1 |
The bug also appears to be in the latest version of Include.py (1.27) in CVS. We don't use CVS any more, so this is no wonder.
Discussion
Easy fix: on line 159 of Include.py, change
inc_page.set_raw_body(body[from_pos:to_pos])
to
inc_page.set_raw_body(body[from_pos:to_pos], modified=1)
(A workaround is to disable caching.)
Update: This is still a bug in version 1.2.2, it bit me my blog page. -- AdamShand
Plan
- Priority: medium
Assigned to: OliverGraf
- Status: fixed in moin--main--1.3--patch-72