[pmwiki-users] Protected block markup problem
Dominique Faure
dominique.faure at laposte.net
Wed Mar 9 01:21:26 CST 2005
Hi,
I've a problem trying to extend protected block markup. Here's some code:
<?php if (!defined('PmWiki')) exit();
global $KeepToken;
Markup('directiveblock', 'block',
"/\\(:directive(\\s+.*)?:\\)\\s*$KeepToken(\\d.*?)$KeepToken/e",
"'<:block,1>'.Keep(DirectiveBlock(PSS('$1'),'$2'))");
function DirectiveBlock($args, $keepIndex) {
global $KPV;
$out = "<pre>\n";
$out .= "args: '$args'\n";
$out .= "data: '$KPV[$keepIndex]'";
$out .= "</pre>"; return $out;
}
?>
and my test expression and the result obtained:
(:directive a=1 b=2 c="HTMLStyleFmt":) [=
foo bar baz
=]
args: ' a=1 b=2 c="2L"'
data: '
foo bar baz
'
Could you explain me why specific values for 'c' parameters (internal PmWiki
variable names?) seem to disturb block protection, and how may I have this
work?
nota: I want to use ParseArg in order to handle arguments.
Thanks,
Dominique
More information about the pmwiki-users
mailing list