We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Codev Web>TLAbehaviourIsOdd (20 Aug 2004, CrawfordCurrie)
Tags:
create new tag
, view all tags

Bug: TLA behaviour is odd

The behaviour of the regex for matching TLAs is a bit suspect.

Test case

If I have a TLA at the start of an otherwise innocent word - for example, TLAdahdah, then the TLA gets linked. It shouldn't. This is easy to fix if you just put \b at the end of $abbrevRegex in TWiki.pm.

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- CrawfordCurrie - 30 Mar 2004

Follow up

The spec can be changed accordingly without introducing too much side-effects.

Notice that the spec for WikiWords is the same, a link stops at the first non-WikiWord character, as in WebHome_withSomeMoreText.

-- PeterThoeny - 02 Apr 2004

Fix record

Converting to PatchProposal so it gets done.

I changed it so plurals of TLAs also work

    $regex{abbrevRegex} = qr/[$regex{upperAlpha}]{3,}s?\b/;

commited to SVN

-- SvenDowideit - 21 Jul 2004

Topic revision: r7 - 20 Aug 2004 - 08:02:16 - CrawfordCurrie
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback