[pmwiki-users] custom markup parameter issue
marc
gmane at auxbuss.com
Fri Jan 12 04:56:29 CST 2007
said...
> Hi
>
> How can I pass a parameter from the markup defintion to a function.
> The following code shows always $1 instead of it's contnet.
>
> Markup("mymu", "inline", "/_mymu_ (.*?) _mymu_/", myFunc('$1') );
>
> function myFunc($inp) {
> // does not prnt $inp, it prints "$1"
> printf("inp=%s \n", $inp);
> }
Markup('mymu','inline','/_mymu_ (.*?) _mymu_/ie',"myFunc('\$1')");
function myFunc($inp) {
return $inp;
}
Usage: _mymu_ fred _mymu_
--
Cheers,
Marc
More information about the pmwiki-users
mailing list