]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid an infloop in shr when filling text with :align-to properties
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 06:51:35 +0000 (08:51 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Aug 2019 06:51:35 +0000 (08:51 +0200)
* lisp/net/shr.el (shr-fill-line): Only join together URL buttons
if there are any URL buttons.

lisp/net/shr.el

index fbd1a9b7661172f3e7d1253001c03f995f2dd33e..c0f8c72d5b6581a97e7e6a902bc11253fc4b1409 100644 (file)
@@ -719,6 +719,7 @@ size, and full-buffer size."
           (insert "\n")
          (shr-indent)
           (when (and (> (1- gap-start) (point-min))
+                     (get-text-property (point) 'shr-url)
                      ;; The link on both sides of the newline are the
                      ;; same...
                      (equal (get-text-property (point) 'shr-url)
@@ -2363,6 +2364,7 @@ flags that control whether to collect or render objects."
        (car (window-text-pixel-size nil (point-min) (point-max)))))))
 
 (defun shr-render-td (dom width fill)
+  (setq d dom)
   (let ((cache (intern (format "shr-td-cache-%s-%s" width fill))))
     (or (dom-attr dom cache)
        (and fill