From 8555d10f6369d78c44cf4677010b7e1260d9f5c0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 Oct 2010 12:57:16 -0400 Subject: [PATCH] img: If a class is specified, don't also put the img in the img class. --- IkiWiki/Plugin/img.pm | 5 +---- debian/changelog | 2 ++ ..._parameter_of_img_directive_behave_not_as_documented.mdwn | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index 2375ead89..bd527c8c8 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -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"; } diff --git a/debian/changelog b/debian/changelog index 12cc90b11..5433ba05f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 29 Sep 2010 11:58:23 -0400 diff --git a/doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn b/doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn index 10ba15066..e7797765f 100644 --- a/doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn +++ b/doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn @@ -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]]