emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 78bcd42: Further empty <li> tweaks


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 78bcd42: Further empty <li> tweaks
Date: Sun, 20 Mar 2016 14:15:42 +0000

branch: master
commit 78bcd428573f4eed83bf143d296fbd38a3ffd71e
Author: Lars Magne Ingebrigtsen <address@hidden>
Commit: Lars Magne Ingebrigtsen <address@hidden>

    Further empty <li> tweaks
    
    * lisp/net/shr.el (shr-tag-li): When showing several empty
    <li> 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 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 4adb4a6..6079415 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 0000000..05cfee7
--- /dev/null
+++ b/test/data/shr/li-empty.html
@@ -0,0 +1 @@
+<ol><li></li><li></li><li></li></ol>
diff --git a/test/data/shr/li-empty.txt b/test/data/shr/li-empty.txt
new file mode 100644
index 0000000..8320bc0
--- /dev/null
+++ b/test/data/shr/li-empty.txt
@@ -0,0 +1,3 @@
+1 
+2 
+3 



reply via email to

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