2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * net/shr.el (shr-make-table-1): dom.el changes for table rendering.
+
* dom.el (dom-by-tag): Use `equal' for comparisons so that tags
can be strings.
(dom-elements): Protect against non-text nodes.
(shr-inhibit-decoration (not fill))
(rowspans (make-vector (length widths) 0))
width colspan)
- (dolist (row (dom-children dom))
+ (dolist (row (dom-non-text-children dom))
(when (eq (dom-tag row) 'tr)
(let ((tds nil)
(columns (dom-children row))
;; Return a summary of the number and shape of the TDs in the table.
(defun shr-column-specs (dom)
(let ((columns (make-vector (shr-max-columns dom) 1)))
- (dolist (row (dom-children dom))
+ (dolist (row (dom-non-text-children dom))
(when (eq (dom-tag row) 'tr)
(let ((i 0))
(dolist (column (dom-children row))
(defun shr-max-columns (dom)
(let ((max 0))
(dolist (row (dom-children dom))
- (when (eq (dom-tag row) 'tr)
+ (when (and (not (stringp row))
+ (eq (dom-tag row) 'tr))
(setq max (max max (+ (shr-count row 'td)
(shr-count row 'th))))))
max))