[Pmwiki-users] acronyms that aren't wikiwords

Patrick R. Michaud pmichaud
Fri Jan 21 23:23:01 CST 2005


On Thu, Jan 20, 2005 at 08:40:41PM -0600, Kevin Walsh wrote:
> I have
> 	$SpaceWikiWords = 1;
> But currently words like "CEOs" and "GMOs" are getting wikiworded into 
> "CE Os" and GM Os".
> Is there a setting for "acronyms" (consecutive capital letters) to be 
> exceptions from the above variable?

You can change $WikiWordPattern to prevent such things from being
viewed as WikiWords.  For example, one can require that there
be at least one lowercase letter followed by an uppercase letter
to be considered a WikiWord:

   $WikiWordPattern = '[[:upper:]][[:alnum:]]*(?:[[:upper:]][0-9]|[[:lower:]0-9][[:upper:]])[[:alnum:]]*';

This pattern would continue to allow things such as 'COSC1435' to be
considered wikiwords, but 'CEOs', 'GMOs', and 'MYWorld' would no longer
be treated as wikiwords.

There are a lot of things that can be done to adjust the wikiword pattern --
just make suggestions or questions here and we'll come up with improvements.

If the list of things to be excluded is relatively small, you can just
also use $WikiWordCount to prevent linking:

    $WikiWordCount['CEOs'] = 0;
    $WikiWordCount['GMOs'] = 0;

Pm



More information about the pmwiki-users mailing list