You are here: TWiki> Codev Web>TLAbehaviourIsOdd (2004-08-20, 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 - 2004-08-20 - 08:02:16 - CrawfordCurrie
 
TWIKI.NET
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.