On 2017-06-19 14:33, Petko Yotov wrote:
On 2017-06-19 10:02, Dominique Faure wrote:
On Mon, Jun 19, 2017 at 8:39 AM, Simon <nzsk...@gmail.com> wrote:

I have a recipe I'd like to update for PHP 7.2.
I checked Custom Markup, which states that markup_e is deprecated.
Are there instructions for replacing markup_e available

Untested replacement code:
=====<- - - - -
Markup( 'NZTopo', # an internal PmWiki function that defines the custom markup for the wiki (see http://www.pmwiki.org/wiki/PmWiki/CustomMarkup)
  'directives',
"/\\(:nztopo (" . $qlocale . ")\s*(?:" . $qmods . "){0,7}\s*:\\)/i", #
  "NZTopoMarkup");

function NZTopoMarkup($m) {
return Keep(NZTopo_Parse(\$m[1], \$m[2], \$m[3], \$m[4], \$m[5], \$m[6],
\$m[7], \$m[8], \$m[9]));
}
=====<- - - - -

Either the above (without the backslashes before $m), or you pass as
forth argument directly "NZTopo_Parse" and modify it like this:

  Markup( 'NZTopo',
    'directives',
"/\\(:nztopo (" . $qlocale . ")\s*(?:" . $qmods . "){0,7}\s*:\\)/i", #
    "NZTopo_Parse");

  function NZTopo_Parse($m) { # change here
    list( , $p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9) = $m;

Sorry, forgot to add at the end of that function, insert the Keep call:


  return Keep($retval . $debugval);

Petko

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to