[pmwiki-users] Re: %align=right% with custom markup

Patrick R. Michaud pmichaud at pobox.com
Mon Jun 13 16:15:00 CDT 2005


On Mon, Jun 13, 2005 at 11:05:02PM +0200, Christian Schlatter wrote:
> chr at home.se wrote:
> >>I would like to use the %align=right% WikiStyle (or other image 
> >>WikiStyles) together with this new markup, but when I write
> >>
> >>%align=right%(:g2item id=123:)
> >>
> >>the style somehow does not get applied to the img html code. In case 
> >>this has something to do with markup order, I use the "directive" class.
> >
> >
> >Have you tried
> >
> >	%align=right%(:g2item id=123:)%%
> >				      ^^- Note these at the end of the line
> 
> I tried it and it didn't work :-(
> 
> ... but I think I've found where the problem lies:
> In the markup script I use "return Keep($out)", so that the links don't 
> get parsed again. This replaces the whole script output with something 
> like "???2???", which then cannot be parsed again by the wikistyles.php 
> script.
> 
> I don't see an easy solution for this.

Well, the meaning of Keep() is that it shouldn't be processed further.
However, there's a special form of Keep() available, which says to keep
things until wikistyles are being applied.  So, if you change your
Keep line to be:

    return Keep($out, 'L');

then the 'L' tells the system that this item should be restored a bit
earlier-- right before wikistyles are processed.  (This is how we're 
able to apply wikistyles to other forms of links.)

See if that helps.

Pm



More information about the pmwiki-users mailing list