*** Render.pm.~1~ Tue Aug 3 13:48:00 2004 --- Render.pm Thu Nov 3 18:45:23 2005 *************** *** 527,533 **** sub linkToolTipInfo { ! my( $theWeb, $theTopic ) = @_; return "" unless( $linkToolTipInfo ); return "" if( $linkToolTipInfo =~ /^off$/i ); --- 581,587 ---- sub linkToolTipInfo { ! my( $theWeb, $theTopic, $theAnchor ) = @_; return "" unless( $linkToolTipInfo ); return "" if( $linkToolTipInfo =~ /^off$/i ); *************** *** 542,548 **** $text =~ s/\$wikiname/"" . &TWiki::userToWikiName( $user, 1 )/ge; # "JohnSmith" $text =~ s/\$wikiusername/"" . &TWiki::userToWikiName( $user )/ge; # "Main.JohnSmith" if( $text =~ /\$summary/ ) { ! my $summary = &TWiki::Store::readFileHead( "$TWiki::dataDir/$theWeb/$theTopic.txt", 16 ); $summary = &TWiki::makeTopicSummary( $summary, $theTopic, $theWeb ); $summary =~ s/[\"\']//g; # remove quotes (not allowed in title attribute) $text =~ s/\$summary/$summary/g; --- 596,619 ---- $text =~ s/\$wikiname/"" . &TWiki::userToWikiName( $user, 1 )/ge; # "JohnSmith" $text =~ s/\$wikiusername/"" . &TWiki::userToWikiName( $user )/ge; # "Main.JohnSmith" if( $text =~ /\$summary/ ) { ! my $summary; ! my $regexa = qr/^((<[hH][1-6]>)|(---+|\t+)(\++|\#+))\s*/; ! if ( $theAnchor ) { ! $summary = &TWiki::Store::readFile( "$TWiki::dataDir/$theWeb/$theTopic.txt" ); ! if (!(( $theAnchor =~ s/^\#// ) ! && ( $summary =~ m/(^\#)$theAnchor\s(.*)/sm ) && ( $summary = $2 ))) { ! $theAnchor =~ s/_/./g; # find simple heading anchors ! if ( !(( $summary =~ m/$regexa$theAnchor([<\s].*)/sm ) && ( $summary = $5 ))) { ! $summary = "#" . $theAnchor . "? " . $summary; # indicate non-existant anchor ! } ! } ! } else { ! $summary = &TWiki::Store::readFileHead( "$TWiki::dataDir/$theWeb/$theTopic.txt", 16 ); ! } ! # sometimes 162 chars is too much: clip to ^#EndOfSummary or ^#NextAnchor ! # (possibly better if done in makeTopicSummary) ! $summary =~ s/(.*?)(\n#|$).*/$1/s; ! $summary = &TWiki::makeTopicSummary( $summary, $theTopic, $theWeb ); $summary =~ s/[\"\']//g; # remove quotes (not allowed in title attribute) $text =~ s/\$summary/$summary/g; *************** *** 612,618 **** my $anchor = makeAnchorName( $theAnchor ); $text .= "$theLinkText"; return $text; } else { --- 708,714 ---- my $anchor = makeAnchorName( $theAnchor ); $text .= "$theLinkText"; return $text; } else {