[pmwiki-devel] Question on Markup Development: How to map Markups to Markups?

Jan Peters mail at jan-peters.net
Fri Mar 18 02:50:51 PDT 2022


I want to write a macro that wraps around videoattach.php as a shortcut 
for my pmwiki users:

Markup_e('leftvideo', 'directives',
"/\\(:leftvideo\\s+(.*?)\\s*:\\)/",
“leftvideo(\$m[1])”);

function leftvideo($video_code) {
         $output = "(:div class='igrid':) $video_code (:divend:)";
         return $output;
}

Weirdly, the “(:divend:)” is treated as text while the rest is 
processed correctly. Do you have any
ideas how to do this properly?



More information about the pmwiki-devel mailing list