[Pmwiki-users] Reflection on link syntax

Patrick R. Michaud pmichaud
Wed Jun 30 16:01:11 CDT 2004


On Wed, Jun 30, 2004 at 01:53:17PM +0200, Christian Ridderstr?m wrote:
> I was just adding some links to a wiki page with lots of external links.  
> Some of the URIs were already in there in the text and I just had to move
> them, while others I inserted by pasting. What I noticed was that I
> sometimes instinctively wanted to write
> 	[[The PmWiki web site http://www.pmwiki.org]]
> rather than using the current syntax:
> 	[[http://www.pmwiki.org The PmWiki web site]]
> [...]
> Has anyone else noticed something like this? I.e. that they'd prefer 
> writing the link text first? (I've noticed this before, but this was the 
> first time I started reflecting on *why* I felt like this)

I've gone back and forth on this, and ultimately chose PmWiki's
current ordering because it's the one that most frequently occurs
in other (wiki) markup syntaxes.  Also, while it's true that there
are many times when people think "text, then target", there are also
lots of times when people think "target, now text".

For a variety of reasons I'm electing to keep the current ordering for
the default PmWiki 2.0.  However, I think it would make a lot of sense
to use a "->" markup for the alternate ordering, as in

   [[The PmWiki web site -> http://www.pmwiki.org]]

In PmWiki 1.0, this can be enabled via something like:

   $DoubleBrackets["/\\[\\[(.*?)->\\s*(\\S+)\\]\\]/"] =
     "[[$2 $1]]";

A similar recipe could be written for PmWiki 2.0.

Pm



More information about the pmwiki-users mailing list