[pmwiki-users] Embedding (:directive:) inside of (:text_var: ... :)
Patrick R. Michaud
pmichaud at pobox.com
Wed Apr 11 14:53:40 CDT 2007
Several people have commented that they sometimes want/need
to place directives inside of hidden page text variables -- i.e.,
to do something like:
(:myvar: (:pagelist:) :)
such that $:myvar returns a value of "(:pagelist:)". Of
course, this doesn't work at present because the "(:...:)"'s
don't nest, so that the (:pagelist:) directive has the effect
of inadvertently closing off the page text variable.
A couple of days ago I thought of an easy way that we could
avoid this problem by allowing multiple colons for markers
on page text variable directives. Then the above could be
written as:
(::myvar: (:pagelist:) ::)
This does the same as (:myvar: ... :), except that the presence
of "(::" at the beginning of the page text variable requires
a matching "::)" to close it. This makes it easier to embed directives
inside of hidden page text variables. And it can be generalized to
handle arbitrary numbers of colons:
(::::myvar: I like colons! ::::)
Other directive markups that potentially have embedded
directives might also be able to use the multiple-colon approach.
I personally don't have any use or need for this, but it
did occur to me and so I thought I'd mention it in case
there are a lot of others who could use it. Implementing it
would be a minor change to the page text variables code.
Thanks!
Pm
More information about the pmwiki-users
mailing list