From 1064b2f65ecc9b09e4ede3d8a614b9948e179aa4 Mon Sep 17 00:00:00 2001
From: Lars Ingebrigtsen <larsi@gnus.org>
Date: Tue, 25 Aug 2020 13:57:00 +0200
Subject: [PATCH] Extend background colours in shr

* lisp/net/shr.el (shr-colorize-region): Extend backgrounds to the
end (bug#43031).  This avoid ragged edges to the right when, for
instance, the <body> has a bgcolor.
(shr-face-background): Ditto.
---
 lisp/net/shr.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 24595301b79..8fdc7580320 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1315,7 +1315,7 @@ ones, in case fg and bg are nil."
 				  t))
 	(when bg
 	  (add-face-text-property start end
-				  (list :background (car new-colors))
+				  (list :background (car new-colors) :extend t)
 				  t)))
       new-colors)))
 
@@ -2250,7 +2250,7 @@ flags that control whether to collect or render objects."
                           (not background))
                  (setq background (cadr elem))))
              (and background
-                  (list :background background))))))
+                  (list :background background :extend t))))))
 
 (defun shr-expand-alignments (start end)
   (while (< (setq start (next-single-property-change
-- 
2.39.5