htmllink: allow a title attribute to be specified

master
Joey Hess 2009-11-26 14:10:21 -05:00
parent d334e02211
commit 268a2dd54c
3 changed files with 6 additions and 5 deletions

View File

@ -1081,11 +1081,10 @@ sub htmllink ($$$;@) {
}
my @attrs;
if (defined $opts{rel}) {
push @attrs, ' rel="'.$opts{rel}.'"';
}
if (defined $opts{class}) {
push @attrs, ' class="'.$opts{class}.'"';
foreach my $attr (qw{rel class title}) {
if (defined $opts{$attr}) {
push @attrs, " $attr=\"".$opts{attr}.'"';
}
}
return "<a href=\"$bestlink\"@attrs>$linktext</a>";

1
debian/changelog vendored
View File

@ -12,6 +12,7 @@ ikiwiki (3.20091114) UNRELEASED; urgency=low
* date: New plugin that allows inserting date directives that expand to
pretty-printed dates, using the same formatting as used for page
modification date display, etc.
* htmllink: Allow a title attribute to be specified.
-- Joey Hess <joeyh@debian.org> Mon, 16 Nov 2009 15:46:45 -0500

View File

@ -712,6 +712,7 @@ control some options. These are:
* anchor - set to make the link include an anchor
* rel - set to add a rel attribute to the link
* class - set to add a css class to the link
* title - set to add a title attribute to the link
#### `readfile($;$)`