[Pmwiki-users] Re: Preventing acronyms from being treated as wiki words?
Christian Ridderström
chr
Wed Apr 28 09:25:11 CDT 2004
On Wed, 28 Apr 2004, Patrick R. Michaud wrote:
> > How do I prevent words such as 'RS232', 'COM1' etc from being treated as
> > wiki-words? (If my memory isn't wrong, this behaviour is new in PmWiki?).
>
> Nope, it's not new--it's been this way for a very long time (since 0.3).
Ok, I must have been mixing this up with MoinMoin or something then,
combined with the fact that 'COM' isn't interpreted as a wiki-word.
(Is there a (good:-) reason why 'COM1' is a wiki-word but not 'COM'?).
> However, you can protect individual words using $WikiWordCount:
>
> $WikiWordCount['RS232'] = 0;
> $WikiWordCount['COM1'] = 0;
Thanks, I'll use this for now, but it really feels as a hack since I have
to block COM1-COM11 :-(
> or if you want to disallow this particular pattern entirely, you can
> change the definition of $WikiWordPattern to require at least one lowercase
> letter (don't have time to write it now--let me know if you want this).
I think that might be a good idea. If you make the pattern I'll be happy
to place it on a cookbook page. Another idea might be to:
* Allow WikiWordCount[] to accept a regular expression in the key
(might not be very practical)
* Introduce a variable such as 'NotWikiWords' that let's you specify
regular expression that will be rejected as a wiki-word.
Both of these are strictly from an administrators's point of view, they
might be very impractical to implement.
/Christian
--
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list