X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bd7221ae5450e14e9641e01e0c2890a8f018ddb4..9f401d6617a11efcedda1c956b2ccea061a7540f:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 35b38df46..0457a6c61 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1074,6 +1074,13 @@ sub urlto ($$;$) { return beautify_urlpath($link); } +sub isselflink ($$) { + my $page=shift; + my $link=shift; + + return $page eq $link; +} + sub htmllink ($$$;@) { my $lpage=shift; # the page doing the linking my $page=shift; # the page that will contain the link (different for inline) @@ -1099,7 +1106,7 @@ sub htmllink ($$$;@) { } return "$linktext" - if length $bestlink && $page eq $bestlink && + if length $bestlink && isselflink($page, $bestlink) && ! defined $opts{anchor}; if (! $destsources{$bestlink}) {