]> sipb.mit.edu Git - ikiwiki.git/commitdiff
web commit by cworth: Attempting to protect patch content with indentation...
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 23 May 2007 13:42:07 +0000 (13:42 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 23 May 2007 13:42:07 +0000 (13:42 +0000)
doc/bugs/img_plugin_should_pass_through_class_attribute.mdwn

index ab86fc4afd3533cc20c63f945dd2bf8452a3516e..c66055dd0ad2730233caf8e54d36676ef409c509 100644 (file)
@@ -8,40 +8,40 @@ And here's a patch to implement it. Will this survive markdown munging? It seems
 
 -Carl
 
-From 405c29ba2ef97a514bade33ef826e71fe825962b Mon Sep 17 00:00:00 2001
-From: Carl Worth <cworth@cworth.org>
-Date: Wed, 23 May 2007 15:27:51 +0200
-Subject: [PATCH] img plugin: Pass a class attribute through to the final img tag.
-
-This is particularly useful for allowing the image to float.
-For example, in my usage I use class=floatleft and then
-in the css do .floatleft { float: left; }.
----
- Plugin/img.pm |   12 +++++++++---
- 1 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/Plugin/img.pm b/Plugin/img.pm
-index 7226231..3eb1ae7 100644
---- a/Plugin/img.pm
-+++ b/Plugin/img.pm
-@@ -93,9 +93,15 @@ sub preprocess (@) { #{{{
-                $imgurl="$config{url}/$imglink";
-        }
--       return '<a href="'.$fileurl.'"><img src="'.$imgurl.
--               '" alt="'.$alt.'" width="'.$im->Get("width").
--               '" height="'.$im->Get("height").'" /></a>';
-+        my $result = '<a href="'.$fileurl.'"><img src="'.$imgurl.
-+            '" alt="'.$alt.'" width="'.$im->Get("width").
-+            '" height="'.$im->Get("height").'" ';
-+        if (exists $params{class}) {
-+            $result .= ' class="'.$params{class}.'"';
-+        }
-+        $result .= '/></a>';
-+
-+        return $result;
- } #}}}
- 1
--- 
-1.5.1.gee969
+    From 405c29ba2ef97a514bade33ef826e71fe825962b Mon Sep 17 00:00:00 2001
+    From: Carl Worth <cworth@cworth.org>
+    Date: Wed, 23 May 2007 15:27:51 +0200
+    Subject: [PATCH] img plugin: Pass a class attribute through to the final img tag.
+    
+    This is particularly useful for allowing the image to float.
+    For example, in my usage I use class=floatleft and then
+    in the css do .floatleft { float: left; }.
+    ---
    Plugin/img.pm |   12 +++++++++---
    1 files changed, 9 insertions(+), 3 deletions(-)
+    
+    diff --git a/Plugin/img.pm b/Plugin/img.pm
+    index 7226231..3eb1ae7 100644
+    --- a/Plugin/img.pm
+    +++ b/Plugin/img.pm
+    @@ -93,9 +93,15 @@ sub preprocess (@) { #{{{
+                    $imgurl="$config{url}/$imglink";
+            }
+     
+    -       return '<a href="'.$fileurl.'"><img src="'.$imgurl.
+    -               '" alt="'.$alt.'" width="'.$im->Get("width").
+    -               '" height="'.$im->Get("height").'" /></a>';
+    +        my $result = '<a href="'.$fileurl.'"><img src="'.$imgurl.
+    +            '" alt="'.$alt.'" width="'.$im->Get("width").
+    +            '" height="'.$im->Get("height").'" ';
+    +        if (exists $params{class}) {
+    +            $result .= ' class="'.$params{class}.'"';
+    +        }
+    +        $result .= '/></a>';
+    +
+    +        return $result;
    } #}}}
+     
    1
+    -- 
+    1.5.1.gee969