[pmwiki-users] custom markup: passing arguments to function

Anno anno at shroomery.org
Mon Jun 16 06:53:57 CDT 2008


I am trying to make a custom markup, and I want to pass 3 arguments to a 
function . The markup would look like this:

(:jslide "argument one" "argument two" "argument three":)

I tried this:

Markup('jslide', 'end_', '/\\(:jslide\\s"(.*)"\\s"(.*)"\\s"(.*)":\\)/e', 
"jslide('$1','$2','$3')");

function jslide($arg1, $arg2, $arg3){
	$result=$arg1.$arg2.$arg3;
	return $result;
}

but it doesn't work,the markup (:jslide "argument one" "argument two" 
"argument three":) is not replaced with anything.

Any idea what I am doing wrong?

Anno




More information about the pmwiki-users mailing list