diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-11-26 14:10:21 -0500 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-11-26 14:10:21 -0500 |
commit | 268a2dd54cd47d6ec39c22d61baa5f6f9d40b7f5 (patch) | |
tree | 1885ce008191a865f0ff6445944aaafb281501a7 | |
parent | d334e0221143e20b95e5b979dfc8eac0440c12a7 (diff) | |
download | ikiwiki-268a2dd54cd47d6ec39c22d61baa5f6f9d40b7f5.tar ikiwiki-268a2dd54cd47d6ec39c22d61baa5f6f9d40b7f5.tar.gz |
htmllink: allow a title attribute to be specified
-rw-r--r-- | IkiWiki.pm | 9 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/plugins/write.mdwn | 1 |
3 files changed, 6 insertions, 5 deletions
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 "<a href=\"$bestlink\"@attrs>$linktext</a>"; diff --git a/debian/changelog b/debian/changelog index 10fcebbec..e31928223 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 2f179d46f..45f083b42 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -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($;$)` |