1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

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.
This commit is contained in:
Lars Ingebrigtsen 2020-09-22 15:10:30 +02:00
parent de6844b624
commit 69b5d54311

View file

@ -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.