]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/img.pm
pagestats: when making a tag cloud, don't emit links where the tag is unused
[git.ikiwiki.info.git] / IkiWiki / Plugin / img.pm
index d295b833b21b57ccfef5c5d985ae91281efb466b..78e3789171c53a5e90110f666e08ef0860bd36f7 100644 (file)
@@ -43,7 +43,7 @@ sub preprocess (@) {
                return '';
        }
 
-       push @{$links{$params{page}}}, $image;
+       add_link($params{page}, $image);
        # optimisation: detect scan mode, and avoid generating the image
        if (! defined wantarray) {
                return;
@@ -121,8 +121,9 @@ sub preprocess (@) {
        my $imgtag='<img src="'.$imgurl.
                '" width="'.$im->Get("width").
                '" height="'.$im->Get("height").'"'.
-               (exists $params{alt} ? '" alt="'.$params{alt}.'"' : '').
+               (exists $params{alt} ? ' alt="'.$params{alt}.'"' : '').
                (exists $params{title} ? ' title="'.$params{title}.'"' : '').
+               (exists $params{align} ? ' align="'.$params{align}.'"' : '').
                (exists $params{class} ? ' class="'.$params{class}.'"' : '').
                (exists $params{id} ? ' id="'.$params{id}.'"' : '').
                ' />';