I need a bit enlightenment.
I'm implementing the WikiCreole {{image}} markup. {{image.ext|alt}}
and {{image.ext|alt|attrs}} can co-exit with {var} because the "|" is
not allowed in {var}. But {{image.ext}} is rendered as the empty
variable "{image.ext}". I could use always a "|": {{image.ext|}} but
that's not an elegant solution.
I'm thinking about modifying the {var} markup. These are the original
from v2.31:
MarkUp('vars', 'var', '/\{([-_.*:a-zA-Z0-9]+)\}/e', 'BOLTvars("$1",
"$zone")'); // {var}
MarkUp('vars', 'var2', '/\{([-_.a-zA-Z0-9]+)\:([:.a-zA-Z0-9]+)\}/e',
'BOLTvars("$1:$2")'); // {page:var}
It surprised me that the chars "-", ".", ":" and "*" are allowed in
{var} and in the variable name in {page:var}.
I tried the following
$BOLTvar['$x-1'] = '<p>111111</p>';
$BOLTvar['$x.2'] = '<p>222222</p>';
$BOLTvar['$x:3'] = '<p>333333</p>';
$BOLTvar['$x*4'] = '<p>444444</p>';
Only the third doesn't work, because it's interpreted as {page:var}, I
think.
I couldn't imagine that those chars are allowed in variable names! Do
they have any special purpose? Are they a rest of old versions or
debugging code? If not, does someone uses them?
A possible solution for my {{image.ext}} markup could be to remove the
dot from the {var} markup, because an image filename always have a
dot. I don't use dots in variable names but I wonder if other people
do.
Thanks,
Marcos
--
http://alinome.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---