diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-28 23:31:53 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-28 23:31:53 +0000 |
commit | d9f1b1214926832793103adef926c0bccc833b48 (patch) | |
tree | fae805f735637463f3d66f2ac949ab74eb468cc3 /IkiWiki | |
parent | d73574e19f3544faee8bfaf2d7269b8bc70eca7a (diff) |
support [[linktext|pagename]] links
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. |