From d7cfcef54a067221b801de17fafc1f05a13c2004 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 12 Jun 2010 16:16:24 -0400 Subject: img: Support hspace and vspace attributes. --- IkiWiki/Plugin/img.pm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 48211454e..a69175ba6 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -156,14 +156,18 @@ sub preprocess (@) { $imgurl="$config{url}/$imglink"; } + my $attrs=''; + foreach my $attr (qw{alt title class id hspace vspace}) { + if (exists $params{$attr}) { + $attrs.=" $attr=\"$params{$attr}\""; + } + } + my $imgtag=''.$params{alt}.''; my $link; -- cgit v1.2.3