]> code.delx.au - gnu-emacs/commitdiff
Fix shr table rendering of nested tables
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 18 Jan 2016 19:37:44 +0000 (20:37 +0100)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 18 Jan 2016 19:37:44 +0000 (20:37 +0100)
* shr.el (shr-table-body): Don't include all tbodies in nested
tables in the levels above.

lisp/net/shr.el

index 0703171a436d5cbc584ef5421f09ff4646360bbc..88041f7e553ab7a1d32c7c1c741b71f0e19ab969 100644 (file)
@@ -1600,7 +1600,9 @@ The preference is a float determined from `shr-prefer-media-type'."
     (shr-insert-table (shr-make-table dom sketch-widths t) sketch-widths)))
 
 (defun shr-table-body (dom)
-  (let ((tbodies (dom-by-tag dom 'tbody)))
+  (let ((tbodies (seq-filter (lambda (child)
+                               (eq (dom-tag child) 'tbody))
+                             (dom-children dom))))
     (cond
      ((null tbodies)
       dom)