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

Christian Schlatter ch at schlatter.net
Mon Jun 13 16:25:29 CDT 2005


Patrick R. Michaud wrote:
> 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.

This works perfectly, thanks a lot!

In the meantime I found another solution, that I document here in case 
someone else can use it:

I've copied a line from wikistyles.php:

$x = preg_replace("/\\bhttps?:[^$UrlExcludeChars]+/e", "Keep('$0')", $x);

so that only URLs are "kept". Maybe there could be a new function like 
KeepUrls(..) doing the same.

-Christian




More information about the pmwiki-users mailing list