[pmwiki-users] New definition list functionality
pmwiki at ben-amotz.com
Mon Jun 5 22:18:47 CDT 2006
Stirling Westrup wrote:
> Pico wrote:
>> Now the variables on PmWiki/I18nVariables have been escaped (on 6/5/06)
>> by an unsigned author. (Who added VarPagesFmt). That was after your
>> most recent release, so I don't think it would have been a restore from
>> your distribution.
> I was probably the last person to edit that page. It should have
> recorded my identity, but I didn't check to see if had or not. I'm not
> sure what you mean by 'escaped' the variables. I put the names in
> @@...@@ markup so that they would be rendered monospaced, as is typical
> for computer documentation, and as I noticed many other document pages do.
Didn't mean to make it sound like a problem, I was just trying to get a
handle on whether some variables should be treated differently under
Pm's system for using definition lists on certain pages to create a
special type of WikiWord link that points back to the definition list.
When I referred to escaping the variable I was referring to the @@
markup that you added which, in this case, ended up having an effect
beyond simply changing the font because it caused the string to no
longer be recognized as intended by vardoc.php (similar to what might
happen if you took an item link on the index page of a WikiTrail and
added some markup that caused the link to be disregarded by the trail).
In the case of vardoc.php's system for defined variable links, PmWiki
was looking for a certain string pattern in the term portion of
definition lists, like this:
When the string in the term portion was changed to include anchor markup
and @@ typewriter font, the resulting string no longer conformed to the
pattern that PmWiki was looking for (a dollar sign followed by a string
that conforms to WikiWord conventions). Since vardoc.php uses such
strings (when defined in definition lists on pages along the trail
defined by PmWiki/Variables) to create a special type of WikiWord that
works even when ordinary WikiWords are disabled, seemingly insignificant
changes that alter the pattern have the effect of breaking, or escaping,
the markup so that it is not rendered as a link.
Try it yourself: type some variable strings in sandbox and see how they
become links that point back to the definition lists (that have no
explicitly named anchors).
On your own site, add some test strings, like $FooBar in the term
portion of a definition list on any page along the trail created by
PmWiki/Variables and the $FooBar string will be rendered as a link back
to the definition. Type $FooBar on your SandBox page and it will take
you back to the definition you created.
More information about the pmwiki-users