[pmwiki-users] include/style directives bugs/features?
Patrick R. Michaud
pmichaud at pobox.com
Wed Mar 30 09:35:41 CST 2005
On Wed, Mar 30, 2005 at 05:01:24PM +0200, Dominique Faure wrote:
> Hi,
>
> I've found two bug/features with (:include:) directive which could be very
> annoying:
>
> 1. All (:title:) definition coming from included pages hide previous ones
> (aka the last encountered wins). The only way I found to prevent this
> behaviour is to ensure that title lies on a page's 1st line and do (:include
> <page> lines=2..:).
> Maybe, this is time to use ParseArgs() in IncludeText() to handle options
> enabling or not page features like title inheritance, no?
Ick, too many options. I think I'd prefer to change the code so that
the first (:title:) wins. There are a lot of reasons to do it this way.
> 2. The last line not ended with a newline char from an included page seems
> not to be taken in account into target page.
This can be fixed by using (:nl:) --
(:include IncludedPage:)(:nl:)
inserts a newline if IncludedPage doesn't end with one. It's technically
wrong for PmWiki to automatically include the newline -- there may be
instances where someone would want to include something but not assume
a newline at the end.
> Lastly, another small regexp fixup is needed about wiki styles: style
> definitions
> like '%block padding=1.5em%' are broken since '.' is not handled by
> related regexp.
I'll look into this.
Pm
More information about the pmwiki-users
mailing list