1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Fix shr table rendering of nested tables

* shr.el (shr-table-body): Don't include all tbodies in nested
tables in the levels above.
This commit is contained in:
Lars Magne Ingebrigtsen 2016-01-18 20:37:44 +01:00
parent 4e559f22a0
commit 2f838b7689

View 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)