]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - IkiWiki/Plugin/img.pm
* Apply a patch from Carl Worth allowing a class attribute to be passed
[www/ikiwiki.git] / IkiWiki / Plugin / img.pm
index b1c9db80c969055edc59227b5c79d83945b7b911..cff9dabf082f3429e1bc6937aba9ed86ec9d00d4 100644 (file)
@@ -98,7 +98,10 @@ sub preprocess (@) { #{{{
 
        return '<a href="'.$fileurl.'"><img src="'.$imgurl.
                '" alt="'.$alt.'" width="'.$im->Get("width").
-               '" height="'.$im->Get("height").'" /></a>';
+               '" height="'.$im->Get("height").'"'.
+               (exists $params{class} ? ' class="'.$params{class}.'"' : '').
+               (exists $params{id} ? ' id="'.$params{id}.'"' : '').
+               ' /></a>';
 } #}}}
 
 1