diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 4adb4a6099c..60794158024 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1617,7 +1617,9 @@ The preference is a float determined from `shr-prefer-media-type'." (put-text-property start (1+ start) 'shr-continuation-indentation shr-indentation) (put-text-property start (1+ start) 'shr-prefix-length (length bullet)) - (shr-generic dom))))) + (shr-generic dom)))) + (unless (bolp) + (insert "\n"))) (defun shr-mark-fill (start) ;; We may not have inserted any text to fill. diff --git a/test/data/shr/li-empty.html b/test/data/shr/li-empty.html new file mode 100644 index 00000000000..05cfee7bdd4 --- /dev/null +++ b/test/data/shr/li-empty.html @@ -0,0 +1 @@ +