* shr.el (shr-colorize-region): Put the colours over the entire region.
[gnus] / lisp / shr.el
index d3b9a36..d348e31 100644 (file)
@@ -838,9 +838,13 @@ ones, in case fg and bg are nil."
     (let ((new-colors (shr-color-check fg bg)))
       (when new-colors
        (when fg
-         (shr-add-font start end (list :foreground (cadr new-colors))))
+         (add-face-text-property start end
+                                 (list :foreground (cadr new-colors))
+                                 t))
        (when bg
-         (shr-add-font start end (list :background (car new-colors)))))
+         (add-face-text-property start end
+                                 (list :background (car new-colors))
+                                 t)))
       new-colors)))
 
 (defun shr-expand-newlines (start end color)