--- FormatOutlineNodeFormatter.pm 2006/03/25 20:27:54 1.1 +++ FormatOutlineNodeFormatter.pm 2006/03/25 21:12:15 @@ -43,30 +43,35 @@ # let subclasses override if they want sub formatLevel { return $_[1] + 1 ;} # humans start counting at 1 # let subclasses override if they want sub formatCount { return $_[1] ;} sub formatNode { my ($this, $node, $count, $level) = @_; my $res = $this->data("format"); - my $nodeLinkName = '[[' . $node->name() . ']]'; - return $nodeLinkName unless ($res); + my $nodeLinkName = $node->name(); + return '[[' . $nodeLinkName . ']]' unless ($res); # special substituions # Make linkable non-wiki-word names - my $spaceTopicLinkName = '[[' . &TWiki::Plugins::TreePlugin::FormatHelper::spaceTopic($node->name()) . ']]'; + my $spaceTopicLinkName = &TWiki::Plugins::TreePlugin::FormatHelper::spaceTopic($node->name()); $res =~ s/\$topic/$nodeLinkName/geo; $res =~ s/\$spacetopic/$spaceTopicLinkName/ge; + { + my $_outnum = $this->formatOutNum($node); + $_outnum =~ s/\./_/g; + $res =~ s/\$_outnum/$_outnum/geo; + } $res =~ s/\$outnum/$this->formatOutNum($node)/geo; $res =~ s/\$count/$this->formatCount($count)/geo; $res =~ s/\$level/$this->formatLevel($level)/geo; $res =~ s/\$n/\n/go; # node data substitutions $res = &TWiki::Plugins::TreePlugin::FormatHelper::loopReplaceRefData( $res, $node, qw(modTime author web)); # formatter data substitutions