From 78bcd428573f4eed83bf143d296fbd38a3ffd71e Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 20 Mar 2016 15:15:32 +0100 Subject: [PATCH] Further empty
  • tweaks * lisp/net/shr.el (shr-tag-li): When showing several empty
  • elements, ensure that they really get inserted on a new line. --- lisp/net/shr.el | 4 +++- test/data/shr/li-empty.html | 1 + test/data/shr/li-empty.txt | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/data/shr/li-empty.html create mode 100644 test/data/shr/li-empty.txt 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 @@ +
    diff --git a/test/data/shr/li-empty.txt b/test/data/shr/li-empty.txt new file mode 100644 index 00000000000..8320bc0097b --- /dev/null +++ b/test/data/shr/li-empty.txt @@ -0,0 +1,3 @@ +1 +2 +3 -- 2.39.2