[pmwiki-users] PublishPDF recipe updated to avoid /e modifier

John Rankin john.rankin at affinity.co.nz
Thu Feb 20 16:21:56 CST 2014


There is a new version of the recipe here: 
http://www.pmwiki.org/wiki/Cookbook/PublishPDF -- I think I have found 
and fixed every /e modifier. A big thank you to Petko for his advice on 
how to do this.

I ended up creating a large number of "helper" functions where the 
callback doesn't need $pagename. I'd still like to see an option in 
pmwiki's Markup_e function that would let recipe authors write:

$r = 'return';
Markup_e($name, $when, $pattern, $replace, $r);

which would use $CallbackFnTemplates['return'] = 'return %s;';

Or have a new helper function with a very short name (eg CCR), so recipe 
authors could write Markup($name, $when, $pattern, CCR($replace));

using function CCR($code) { return PCCF($code, 'return'); }

A third option would be to write Markup_e($name, $when, $pattern, 
$replace); and let Markup_e decide which of the CallbackFnTemplates to 
use, depending on whether or not $replace contains $pagename.

Thoughts?

JR

-- 
John Rankin




More information about the pmwiki-users mailing list