[pmwiki-users] PageTextVariable: own "automatic variable" format
Knut Alboldt
pmwiki at alboldt.de
Tue Mar 20 09:52:43 CDT 2007
Patrick R. Michaud schrieb:
>> varname1:: value1
>> Referenz: : value1
>> (I don't want the second colon in the reference)
> I'm not sure what you're wanting here. You want the colons to
> be able to have spaces between them?
no, the colons should not belong to the variable-name, so that
varname1:: value
or
varname::value
shall be:
variablename=varname1
variablevalue=value
but I get the variable value of varname1=": value" instead.
Blanks in varnames still don't work:
varname 1b::value1b
reference: NOTHING
(blanks in varnames => value is blank)
> PmWiki's {$var} markup doesn't recognize spaces or hyphens
> in variable names... so in order for that to work we'd also
> have to redefine the {$var} markup.
>
> $PageTextVarPatterns['var::'] =
> '/^\\s*([-a-zA-Z_ ]+)\\s*:\\s*:[ \\t]?(.*)$/m';
>
> # {$var} substitutions
> Markup('{$var}', '>$[phrase]',
> '/\\{(\\*|!?[-\\w.\\/\\x80-\\xff]*)(\\$:?\\w[-\\w ]*)\\}/e',
> "PRR(PVSE(PageVar(\$pagename, '$2', '$1')))");
Knut
More information about the pmwiki-users
mailing list