From 268a2dd54cd47d6ec39c22d61baa5f6f9d40b7f5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 26 Nov 2009 14:10:21 -0500 Subject: htmllink: allow a title attribute to be specified --- IkiWiki.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1e9d1ca2a..611ba6f65 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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 "$linktext"; -- cgit v1.2.3