On 11/6/19 10:09 PM, Petko Yotov wrote:
I've updated the script, you can get it from:

   https://www.pmwiki.org/wiki/Cookbook/Templates

To reply to your question, to return true, is_callable() expects exactly a function name without the "('$1')" parts.

So the 4th argument of Markup() should now be "ParametersParse" rather than "ParametersParse('\$1')".

Because of this, the functions ParametersParse() and Template() need to be updated because now they receive the full match array instead of its 1st element. So I rewrote from:

   function ParametersParse($text) {...}

into:

   function ParametersParse($m) {$text = $m[1]; ...}

Similarly for Template().

Lastly, at the end of the 3rd argument to both Markup() calls, the "e" letter needs to be removed, previously:

   "/\(:template(.*?):\)/e",

now: "/\(:template(.*?):\)/",


Petko


Outstanding.  Thanks!

--
Michael Eager    [email protected]
1960 Park Blvd., Palo Alto, CA 94306

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to