[Pmwiki-users] Re: Disabling WikiWords

Patrick R. Michaud pmichaud
Thu Feb 12 09:33:33 CST 2004


On Thu, Feb 12, 2004 at 04:57:19PM +0100, bram wrote:
> 
> I gave it some more thoughts in the car. I think it will get a 
> quite 'expensive' operation to render all words in a text.

Yes, but there'd be an easier/more efficient way for this.  If I added
a $FinalReplacements array with things to be done just before text
is output (but after [=...=] sequences have been restored) then one 
could do:

   $FinalReplacements["/\\b$word\\b(?![^<]*>/i"] = 
     "<strong class='highlight'>$word</strong>";

Should I add $FinalReplacements?  It's a relatively simple change,
but PmWikiPhilosophy #3 says to wait until there's sufficient demand
so I'll probably wait until there's a bit more request for something
like this on the listserv or in 
http://www.pmichaud.com/wiki/Development/DevelopmentPriority.

Pm



More information about the pmwiki-users mailing list