[pmwiki-users] Re: Re: recipe programming special markup

Patrick R. Michaud pmichaud at pobox.com
Sun Sep 11 11:35:39 CDT 2005


On Sun, Sep 11, 2005 at 04:02:34PM +0000, Karl Loncarek wrote:
> > I'm not sure about those double backslashes above; instead it
> > should probably be:
> > 
> >      Markup('preHeader', '<include',
> >        "/(\n!{1,6})/",
> >        "xxxxx$1");
> > 
> > Pm
> 
> This works fine, I just have to add some sort of counter, otherwise this 
> markup is done several times for the main text (depending the amount of 
> pages that are included in the skin).
> The only problem still remaining: When the Header is in the first line of 
> the wikitext it does not work. Any ideas?

Yeah, not all of the newlines are in place at this point -- some of
them will get converted to newlines by the (:nl:) markup.  So
then you probably need

     Markup('preHeader', '<include',
       "/((\(:nl:\)|\n)!{1,6})/",
       "xxxxx$1");

And yes, there's a problem in that it gets repeated several times
from the '<include' position, so there will need to be a way to
fix that.  I'll have to think about it a bit. 

Pm





More information about the pmwiki-users mailing list