[pmwiki-users] custom markup q.

noskule noskule at gmx.net
Mon Apr 21 03:26:54 CDT 2008

Peter & Melodye Bowers schrieb:
>> I'v got a problem with a custom markup. It renders the function 
>> ("MakeCont....) instead of executing it it:
> ...
>> Rule:
>> Markup('contentbox', '<split',
>>     '/\\(:contentbox\\s+(.*?)\\s*:\\)(.*?)\\(:contentboxend:\\)/s',
>>   "MakeContentbox(\$pagename, ParseArgs(PSS('$1')))");
> I think you need a /e instead of a /s on your 3rd argument to Markup() in
> order to make it evaluate the PHP expression.
> Also I'm thinking you are going to need to include the $2 as an additional
> argument to your MakeContentbox() rather than just using it within
> MakeContentbox and assuming it will somehow be available.  
> -Peter
hm, if I change it to:

Markup('contentbox', '<split', "/\\(:contentbox\\s+(.*?)\\s*:\\)/e",
  "MakeContentbox(\$pagename, ParseArgs(PSS('$1')))");

the function works, but if I add the "(.*?)\\(:contentboxend:\\)" id 
renders the function again

Markup('contentbox', '<split', 
  "MakeContentbox(\$pagename, ParseArgs(PSS('$1')))");

and how do I include the second argument betwean contentbox and 
contentboxend? Via ParseArgs to?

More information about the pmwiki-users mailing list