[pmwiki-users] `WikiWord disables WikiWord ?

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 27 02:34:52 CDT 2005


On Wed, Jul 27, 2005 at 02:03:08PM +1200, John Rankin wrote:
> The markup extensions do this, but a quick fix is to add the following
> to the config.php file:
> 
> ## prevent wikiwords with only one lower case letter
> SDV($AbbreviationPattern,
>   "[[:upper:]]+(?:[[:upper:]][[:lower:]]|[[:lower:]][[:upper:]])[[:upper:]]*");
> 
> Markup("abbr",'>[[',"/`?\\b($AbbreviationPattern)\\b/e","Keep('$1')");

I hadn't looked at the definition of this particular rule until now, and
I must say it's *very* nicely done.  I may adopt it for the distribution, 
or at least put it in the sample-config.php file.  

I think that second argument to Markup really needs to be '<`wikiword' rather 
than '>[['.  Otherwise there's the possibility that this rule will
fire before urllinks are processed, and thereby inadvertently destroy
url-based links such as:

    http://www.example.com/PaGES
    Attach:PICs.jpg
    
> It's arguably more natural for an author to think 'I want to make
> this a link' than 'I want to prevent this from being a link'. In
> my experience, people don't think about things like abbreviation
> plurals being wiki words until they see the annoying new page 
> question mark.

I totally agree here, which is why I like this particular markup 
rule so much. 

Pm




More information about the pmwiki-users mailing list