G5-iMac:~ arthurclemens$ diff /Data/Projects_Arthur/TWiki\ Subversion/twiki/lib/TWiki.pm /Users/arthurclemens/Desktop/TWiki.pm 373c373,375 < $regex{wikiWordRegex} = qr/[$regex{upperAlpha}]+[$regex{lowerAlpha}]+[$regex{upperAlpha}]+[$regex{mixedAlphaNum}]*/o; --- > $regex{wikiWordRegex} = ''; # will be set in setWikiWordRegex > $regex{classicWikiWordPattern} = qr/[$regex{upperAlpha}]+[$regex{lowerAlpha}]+[$regex{upperAlpha}]+[$regex{mixedAlphaNum}]*/o; > $regex{underscoreWikiWordPattern} = qr/[$regex{mixedAlphaNum}]+[_]+[$regex{mixedAlphaNum}_]*/o; 715d716 < 808a810,857 > ---++ ObjectMethod setWikiWordRegex () > > Sets the value of $regex{wikiWordRegex} to the value of AUTOLINKTYPE set in TWikiPreferences; either 'wikiword' (= classicWikiWordPattern) or 'underscore' (=underscoreWikiWordPattern) or a combination of the two. If AUTOLINKTYPE has not been set, 'wikiword' is assumed. > > =cut > > sub setWikiWordRegex { > my $this = shift; > > ASSERT(ref($this) eq 'TWiki') if DEBUG; > > my $autolinktype = ''; > $autolinktype = $this->{prefs}->getPreferencesValue( 'AUTOLINKTYPE' ) || 'wikiword'; > > my $regexes = ''; > my @types = split( /,\s?/, $autolinktype ); > my $type = ''; > my $typesCount = scalar @types; > if ( $typesCount == 1 ) { > $type = @types[0]; > $regex{wikiWordRegex} = getAutoLinkRegexForType( $type ); > return; > } > > # if comma separated list > my $regexes = ''; > my $n = 0; > foreach $type ( @types ) { > $regexes .= getAutoLinkRegexForType( $type ); > $regexes .= '|' if ( $n < ($typesCount-1) ); > $n++; > } > $regex{wikiWordRegex} = $regexes; > } > > sub getAutoLinkRegexForType { > my( $autoLinkType ) = @_; > > if ( $autoLinkType eq 'wikiword' ) { > return $regex{classicWikiWordPattern}; > } > if ( $autoLinkType eq 'underscore' ) { > return $regex{underscoreWikiWordPattern}; > } > } > > =pod > 1093a1143,1144 > > $this->setWikiWordRegex(); 1132c1183 < --- > 1675c1726 < Revrses the encoding from =entityEncode=. _Does not_ decode --- > Reverses the encoding from =entityEncode=. _Does not_ decode