emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 69b5d54 1/2: Fix filling problem in shr due to zero-width id tagg


From: Lars Ingebrigtsen
Subject: master 69b5d54 1/2: Fix filling problem in shr due to zero-width id tagging
Date: Tue, 22 Sep 2020 10:02:48 -0400 (EDT)

branch: master
commit 69b5d5431157fdb6e83ca94b9e48cef0586ec902
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix filling problem in shr due to zero-width id tagging
    
    * lisp/net/shr.el (shr-descend): Fix problem with filling lines
    that have a zero-width ID tag at the start.
---
 lisp/net/shr.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index dcb6415..efa1dba 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -555,7 +555,10 @@ size, and full-buffer size."
          ;; If the element was empty, we don't have anything to put the
          ;; anchor on.  So just insert a dummy character.
          (when (= start (point))
-            (insert ? )
+            (if (not (bolp))
+                (insert ? )
+              (insert ? )
+              (shr-mark-fill start))
             (put-text-property (1- (point)) (point) 'display ""))
           (put-text-property start (1+ start) 'shr-target-id id))
        ;; If style is set, then this node has set the color.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]