Trying to write a markup expression, I am having trouble getting the
whole unaltered string from a PTV into my ME function.
Only strings in double quotes do not get altered (but the double
quotes get stripped, which I guess is okay).
Otherwise PmWiki uses KeepTokens (if $params is used)
and strips single quotes.
I used both $params and $args to capture the string,
with similar results.
OTOH displaying  a PTV does not change anything.

Here is a test markup expression, and a test page content:

//for testing
$MarkupExpr['fixptv'] = 'FixPtv($params)';
function FixPtv($a) {
        print_r($a); echo "<br/>";
        $r = (is_array($a)) ? implode(" ",$a) : $a;
        return $r;
}

//in wiki page
Music1: Classical, "Rhythm & Blues", "Rock'n'Roll"
as M.E.: {(fixptv {$:Music1})}
as PTV: {$:Music1}

Music2: Classical, Rhythm & Blues, Rock'n'Roll
as M.E.: {(fixptv {$:Music2})}
as PTV: {$:Music2}

Music3: Classical,Rhythm & Blues,Rock'n'Roll
as M.E.: {(fixptv {$:Music3})}
as PTV: {$:Music3}

Is there a way to get the PTV string unaltered into the function, for
further manipulation there, including quotes?

thanks
 Hans      


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to