diff options
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 73280abf1..212b0de08 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -362,8 +362,14 @@ sub bestlink ($$) { #{{{ } } while $cwd=~s!/?[^/]+$!!; - if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) { - return "$config{userdir}/".lc($link); + if (length $config{userdir}) { + my $l = "$config{userdir}/".lc($link); + if (exists $links{$l}) { + return $l; + } + elsif (exists $pagecase{lc $l}) { + return $pagecase{lc $l}; + } } #print STDERR "warning: page $page, broken link: $link\n"; |