]> code.delx.au - gnu-emacs/commitdiff
Render empty <ul><li><ul> correctly
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Mar 2016 12:52:36 +0000 (13:52 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 20 Mar 2016 12:52:36 +0000 (13:52 +0100)
* lisp/net/shr.el (shr-tag-ul): Render empty <ul><li><ul>
correctly (bug#22964).

lisp/net/shr.el

index eae50a7143847bbf59f780f680d60d49620a25fa..4f64618c00804be416a0c36173c289f2a2a2a52f 100644 (file)
@@ -1589,6 +1589,10 @@ The preference is a float determined from `shr-prefer-media-type'."
   (shr-ensure-paragraph)
   (let ((shr-list-mode 'ul))
     (shr-generic dom))
+  ;; If we end on an empty <li>, then make sure we really end on a new
+  ;; paragraph.
+  (unless (bolp)
+    (insert "\n"))
   (shr-ensure-paragraph))
 
 (defun shr-tag-ol (dom)