Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dca9634
)
moved selflink test to its own isselflink (overridable) sub
author
intrigeri
<intrigeri@boum.org>
Sat, 9 Jan 2010 21:53:45 +0000
(22:53 +0100)
committer
intrigeri
<intrigeri@boum.org>
Sat, 9 Jan 2010 21:53:45 +0000
(22:53 +0100)
IkiWiki.pm
patch
|
blob
|
history
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index b8e599928678d31ab918cb629da94d95a35b7b1e..5d5c7f0d00af7aaab7a294c19bd3e56075f5c0f2 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-1026,6
+1026,13
@@
sub urlto ($$;$) {
return beautify_urlpath($link);
}
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)
sub htmllink ($$$;@) {
my $lpage=shift; # the page doing the linking
my $page=shift; # the page that will contain the link (different for inline)
@@
-1051,7
+1058,7
@@
sub htmllink ($$$;@) {
}
return "<span class=\"selflink\">$linktext</span>"
}
return "<span class=\"selflink\">$linktext</span>"
- if length $bestlink &&
$page eq $bestlink
&&
+ if length $bestlink &&
isselflink($page, $bestlink)
&&
! defined $opts{anchor};
if (! $destsources{$bestlink}) {
! defined $opts{anchor};
if (! $destsources{$bestlink}) {