[Pmwiki-users] Publish script glitch: ideas sought

John Rankin john.rankin
Tue Nov 4 15:31:03 CST 2003


Hi

I have a small problem with accidental WikiWords and am looking
for ideas on how to fix it.

The publish script at
  http://www.pmichaud.com/wiki/Cookbook/PublishWikiTrail

currently formats email references of the form:

  [[mailto:some.mcbody at some.place Some McBody]]

to display as

  ''Some McBody'' [[[mailto:some.mcbody at some.place some.mcbody at some.place]]]

which should render as

  Some McBody [some.mcbody at some.place]

where the name is in italics.

But McBody gets picked up as a WikiWord and renders as a link to 
Mc Body (spaced wiki words is on).

I have patched it with a local customisation that uses a back-tick
to escape wikiwords -- it becomes `McBody which displays as McBody.
This solves the problem, but I can't help feeling that there is a 
smarter way.

The original code reads:

    $DoubleBrackets["/\\[\\[mailto:($UrlPathPattern)(.*?)\\]\\]/"] =
      "''$2'' [[[mailto:$1 $1]]]";

I guess this falls into the "get over it" category and it's a 
trivial problem, although the Scots and Irish may not agree.
If anybody has a bright idea, it would be greatly appreciated.

In an ideal world, it would be nice to write something like:

  $MailtoLinkFmt = 
    "<cite>\$Addressee</cite> [<a href='mailto:\$Address'>\$Address</a>]";

and have it just work.

Thoughts anyone?
-- 
John Rankin






More information about the pmwiki-users mailing list