shr.el (shr-tag-img): Don't get images displayed in tables.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 6 Oct 2011 09:24:53 +0000 (09:24 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Thu, 6 Oct 2011 09:24:53 +0000 (09:24 +0000)
lisp/ChangeLog
lisp/shr.el

index 62440c1..ee91cdf 100644 (file)
@@ -1,3 +1,7 @@
+2011-10-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * shr.el (shr-tag-img): Don't get images displayed in tables.
+
 2011-10-03  Glenn Morris  <rgm@gnu.org>
 
        * gnus-group.el (gnus-bug-group-download-format-alist): Once again get
index ddf47f4..7b9af33 100644 (file)
@@ -914,12 +914,13 @@ ones, in case fg and bg are nil."
           (shr-encode-url url) 'shr-image-fetched
           (list (current-buffer) start (set-marker (make-marker) (1- (point))))
           t)))
-       (put-text-property start (point) 'keymap shr-map)
-       (put-text-property start (point) 'shr-alt alt)
-       (put-text-property start (point) 'image-url url)
-       (put-text-property start (point) 'image-displayer
-                          (shr-image-displayer shr-content-function))
-       (put-text-property start (point) 'help-echo alt)
+       (when (zerop shr-table-depth) ;; We are not in a table.
+         (put-text-property start (point) 'keymap shr-map)
+         (put-text-property start (point) 'shr-alt alt)
+         (put-text-property start (point) 'image-url url)
+         (put-text-property start (point) 'image-displayer
+                            (shr-image-displayer shr-content-function))
+         (put-text-property start (point) 'help-echo alt))
        (setq shr-state 'image)))))
 
 (defun shr-tag-pre (cont)