From: Richard D. <rd...@us...> - 2002-12-08 16:25:55
|
Update of /cvsroot/twiki/twiki/lib In directory sc8-pr-cvs1:/tmp/cvs-serv929/lib Modified Files: TWiki.pm Log Message: I18N fix for edit, fix for anchor regex. Index: TWiki.pm =================================================================== RCS file: /cvsroot/twiki/twiki/lib/TWiki.pm,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -r1.180 -r1.181 *** TWiki.pm 8 Dec 2002 15:22:33 -0000 1.180 --- TWiki.pm 8 Dec 2002 16:25:52 -0000 1.181 *************** *** 441,447 **** $webNameRegex = qr/[$upperAlpha]+[$lowerAlphaNum]*/; $defaultWebNameRegex = qr/_[${mixedAlphaNum}_]+/; ! # FIXME: Should really be '+' not '*' - at least one character in ! # anchor ! $anchorRegex = qr/\#[${mixedAlphaNum}_]*/; $abbrevRegex = qr/[$upperAlpha]{3,}/; --- 441,445 ---- $webNameRegex = qr/[$upperAlpha]+[$lowerAlphaNum]*/; $defaultWebNameRegex = qr/_[${mixedAlphaNum}_]+/; ! $anchorRegex = qr/\#[${mixedAlphaNum}_]+/; $abbrevRegex = qr/[$upperAlpha]{3,}/; *************** *** 787,790 **** --- 785,798 ---- $name ||= ""; # Default value if undef return ( $name =~ m/^${wikiWordRegex}$/o ) + } + + # ========================= + # Check for a valid ABBREV (acronym) + sub isAbbrev + { + my( $name ) = @_; + + $name ||= ""; # Default value if undef + return ( $name =~ m/^${abbrevRegex}$/o ) } |