img: If a class is specified, don't also put the img in the img class.
authorJoey Hess <joey@kitenet.net>
Wed, 13 Oct 2010 16:57:16 +0000 (12:57 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 13 Oct 2010 16:57:16 +0000 (12:57 -0400)
IkiWiki/Plugin/img.pm
debian/changelog
doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn

index 2375ead8968b6a9baf64ff8ac825dbde6a75b82d..bd527c8c82c79eb5a8ef1a2ae6aa694f0279121d 100644 (file)
@@ -156,10 +156,7 @@ sub preprocess (@) {
                $imgurl="$config{url}/$imglink";
        }
 
-       if (exists $params{class}) {
-               $params{class}.=" img";
-       }
-       else {
+       if (! exists $params{class}) {
                $params{class}="img";
        }
 
index 12cc90b117ff3091ca774760547acc2171e2fed2..5433ba05f0541350dd03f959c57beeddafc07d27 100644 (file)
@@ -14,6 +14,8 @@ ikiwiki (3.20100927) UNRELEASED; urgency=low
   * websetup: Fix defaults of checkboxes in advanced mode.
   * monotone: Fix recentchanges page when the srcdir is not at the top
     of the monotone workspace. Thanks, tommyd.
+  * img: If a class is specified, don't also put the img in the img
+    class.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 29 Sep 2010 11:58:23 -0400
 
index 10ba150665633823562fb3c1dfa6769d5ed4eea0..e7797765f9903ca6c3b85090d32d9b03f1e28b06 100644 (file)
@@ -27,3 +27,5 @@ I would prefer if the `img` class were only added if no class attribute is
 passed.
 
 If you keep the current behaviour, please document it.
+
+> [[done]] --[[Joey]]