]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Bugreport
authorAnonymous <anonymous@none>
Mon, 11 Oct 2010 09:45:38 +0000 (11:45 +0200)
committeranonymous <anonymous@none>
Mon, 11 Oct 2010 09:46:29 +0000 (11:46 +0200)
doc/bugs/class_parameter_of_img_directive_behave_not_as_documented.mdwn [new file with mode: 0644]

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
new file mode 100644 (file)
index 0000000..10ba150
--- /dev/null
@@ -0,0 +1,29 @@
+On [[ikiwiki/directive/img/]] I read that
+
+> You can also pass alt, title, class, align, id, hspace, and vspace
+> parameters. These are passed through unchanged to the html img tag.
+
+but when I pass `class="myclass"` to an img directive, I obtain
+
+    <img class="myclass img" ...
+
+I found that this behaviour was added in commit f6db10d:
+
+> img: Add a margin around images displayed by this directive.
+>
+> Particularly important for floating images, which could before be placed
+> uncomfortably close to text.
+    
+which adds to img.pm:
+    
+    if (exists $params{class}) {
+            $params{class}.=" img";
+    }
+    else {
+            $params{class}="img";
+    }
+
+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.