I think we can add this. Why the key is named markup_c? This template can be
used on many places which call PCCF(), is there a better key name?
Petko
John Rankin writes:
I'd like to suggest a small change to the pmwiki core:
$CallbackFnTemplates = array(
...,
'markup_c' => 'return %s;',
...,
);
...
function Markup_e($id, $when, $pat, $rep, $tmpl='markup_e') {
if (!is_callable($rep)) $rep = PCCF($rep, $tmpl);
Markup($id, $when, $pat, $rep);
}
The reason is that I use a lot of calls to Markup with a /e modifier which
manipulate the matches but do not use $pagename. Rather than use Markup_e,
which would make $pagename available to the callback function, I have
created functions of the form
xxxHelper($m) { return < transformed $m >; }
Then call Markup( ... , "xxxHelper");
Because I do this in several different recipes, I think it would be better
if the proposed change was built into the core, rather than making it a
local customisation.
Comments? Is there a better way to do this?
_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users