my $page=shift;
$content =~ s{(\\?)$config{wiki_link_regexp}}{
- $1 ? "[[$2]]" : htmllink($page, $2)
+ $2 ? ( $1 ? "[[$2|$3]]" : htmllink($page, $3, 0, 0, pagetitle($2)))
+ : ( $1 ? "[[$3]]" : htmllink($page, $3))
}eg;
return $content;
my $parentpage=shift;
my %params=@_;
- return "" if exists $params{archive} && $params{archive} eq 'yes';
-
if (! exists $params{show}) {
$params{show}=10;
}
my @links;
while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) {
- push @links, lc($1);
+ push @links, lc($2);
}
# Discussion links are a special case since they're not in the text
# of the page, but on its template.