diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Render.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5f9de8d26..504edc843 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -9,7 +9,8 @@ sub linkify ($$) { #{{{ 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; @@ -324,7 +325,7 @@ sub findlinks ($$) { #{{{ 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. |