Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 3 12:51:33 CST 2005
On Thu, Mar 03, 2005 at 08:31:13AM +0100, Nils Knappmeier wrote:
> I wanted to implement a glossary cookbook: One Glossary page, has the
> form of a definition list (:name:def) and
> wherever "name" appears on any page in the group, it is replaced by
> <span id="def">name</span>.
> I wonder what would be the right Markup-stage to implement this.
> Especially, if "name" is a link, it should convert to
> <a href="link target"><span id="def">name</span></a> and not contain the
> span-part in the link target. That happend with most of my tries to far...
> So, where do I put it? "style", "inline", "block", "directive"?
Well, depends on how many words you want it style. If you want it to
style every occurrence of name except things in [=...=] and [@...@],
then you can style just before the "restore" operation:
Markup('glossary', '<restore', ...);
Note that you'll want to make sure you don't accidentally span occurrences
of the word that appear inside of <...> tags.
If you want to process *every* occurrence of the word, even those that
appear inside of [=...=] and [@...@], then place it after the restore
Markup('glossary', '>restore', ...);
If these don't work for you, identify where they don't work and
we'll see what we can do. :-)
More information about the pmwiki-users