diff options
author | Joey Hess <joey@kitenet.net> | 2010-07-18 19:35:16 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-07-18 19:35:16 -0400 |
commit | b45688e34e25a596dc19f6a2b94f3f342041da1e (patch) | |
tree | 91782ca94eabd0ca431c8d9f822717678a0e4786 /IkiWiki.pm | |
parent | 4bcd6cc4ffffc2888b2907100ce1decc20e5fcde (diff) | |
parent | 4449a70214b561da14f8e566f2747517c941cb40 (diff) | |
download | ikiwiki-b45688e34e25a596dc19f6a2b94f3f342041da1e.tar ikiwiki-b45688e34e25a596dc19f6a2b94f3f342041da1e.tar.gz |
Merge remote branch 'intrigeri/po'
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 2cf0ad819..0c0b7bd4c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1118,6 +1118,15 @@ sub urlto ($$;$) { return beautify_urlpath($link); } +sub isselflink ($$) { + # Plugins can override this function to support special types + # of selflinks. + 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) @@ -1143,7 +1152,7 @@ sub htmllink ($$$;@) { } return "<span class=\"selflink\">$linktext</span>" - if length $bestlink && $page eq $bestlink && + if length $bestlink && isselflink($page, $bestlink) && ! defined $opts{anchor}; if (! $destsources{$bestlink}) { |