[pmwiki-users] another Markup_e question

John Rankin john.rankin at affinity.co.nz
Mon Feb 10 20:18:32 CST 2014

>> On 11/02/14 12:48 PM, Petko Yotov wrote:
>>> John Rankin writes:
>>>> I have a couple of /e Markup calls which have replacements of the form
>>>>     "functionName(\$pagename,\$x,'$1')"
>>>> ...
>>> I'll add it for the next version, $x will be made available the same
>>> way as $pagename, with the line extract($GLOBALS["MarkupToHTML"]);
>>> automatically included with all calls to Markup_e().
>> I wonder how often this will be needed. Having reviewed the source
>> carefully, in this instance it would be straightforward to code around
>> by re-reading the page text. Would this be a better solution?
> The down-side of this approach is that edit preview for this markup rule
> is not able to use the text held in $x, only text in the last saved
> version.

... the recipe can use $PCache[$pagename]['=preview'] instead. That works!

John Rankin

More information about the pmwiki-users mailing list