[pmwiki-devel] GMI markup call

Patrick R. Michaud pmichaud at pobox.com
Fri Dec 8 16:25:36 CST 2006


On Fri, Dec 08, 2006 at 04:53:46PM -0500, Craige Leeder wrote:
> After working on an addition to the GoogleMapsInterface recipe, it came 
> to my attention that my modified markup call does not work as expected 
> to. The call is as such:
> 
> # Markup() Call
> Markup( 'maps', '>[=', '/\(:(map(-location)?|GMI(end)?)(\s.*?)?:\)/ie',
>   "CvtMarkup(PSS('$1'), PSS('$2'))" );
> ...
> However, the markup call given above does not work. It matches, but $2 
> does not contain paramaters. Infact, I just ran a echo test, and found 
> it contains '-location' from each map-location call. What would be a 
> regular expression to mach the given markup?

In the above regular expression, $2 refers to (-location)?
and not to (\s.*?)? .  If you want to pass the (\s.*?)? portion
to CvtMarkup, you need to use $4 (i.e., it's the fourth open 
parenthesis from the left).

Pm



More information about the pmwiki-devel mailing list