[pmwiki-users] MarkupExpressionsExtensions
Patrick R. Michaud
pmichaud at pobox.com
Sun Apr 15 11:41:53 CDT 2007
The Editor wrote:
> Just released (renamed actually) a recipe entitled
> MarkupExpressionsExtensions which adds a number of extensions to Pm's
> recently released MarkupExpressions recipe.
> ...
Since several of these extensions have obvious relation to ZAP
(even going as far as including "ZAP" in the configuration variable
name or function name), could we possibly rename the recipe
to the shorter ZAPExpressions?
Some other comments:
- {(attr title)} allows people to view the title of read-protected
pages. Same with {(attr keywords)} and {(attr description)}.
Also, it's not clear why we need these versions of the markup when
we already have {$Title} and {$Description} (and could easily add
{$Keywords} if that's desirable).
In short, there really ought to be a clean distinction between
page variables and markup expressions -- to me,
title/description/keywords are clearly page variables (they're
values associated with specific pages) and not expressions.
- I think {(server ...)} really ought to use the actual $_SERVER
names instead of introducing its own. Otherwise authors have
to learn a different set of names for things that already have names.
- The {(wiki ...)} expression is likely to be problematic
from a long-term design perspective, but that's just my opinion.
- In particular, {(wiki pagelist ...)} has the potential to cause
page saves to time out, as PmWiki will then try to compute a
pagelist when it goes to save the page. Currently PmWiki
escapes any (:pagelist ...:) directives when saving a page,
to avoid this.
This also means that link= targets in pages will change,
because PmWiki will start to count the results of (:pagelist:)
commands as being valid targets of a page. (And those will
become out of date because the result is computed only when the
page is saved, and not when its viewed.)
- The {(math ...)} markup is broken, because the $ZAPmath
variable is never set. Also, lines like the following
produce fatal errors, because 'break' can only occur inside of
a looping or switch construct.
if ($p == '') break;
if (!preg_match($ZAPmath, $p)) break;
Pm
More information about the pmwiki-users
mailing list