(shr-render-td): Make width computation consistent by defaulting
all zero-width columns to 10 characters. This may not be optimal,
but it's at least consistent.
+ (shr-make-table-1): Redo last change to fix the real problem in
+ colspan handling.
2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
10))
(when (and fill
(setq colspan (cdr (assq :colspan (cdr column)))))
- (setq colspan (string-to-number colspan))
+ (setq colspan (min (string-to-number colspan)
+ ;; The colspan may be wrong, so
+ ;; truncate it to the length of the
+ ;; remaining columns.
+ (- (length widths) i)))
(dotimes (j (1- colspan))
(if (> (+ i 1 j) (1- (length widths)))
(setq width (aref widths (1- (length widths))))
shr-table-separator-length
(aref widths (+ i 1 j))))))
(setq width-column (+ width-column (1- colspan))))
- ;; Sanity check for degenerate tables.
- (when (zerop width)
- (setq width 10))
(when (or column
(not fill))
(push (shr-render-td (cdr column) width fill)
(split-string (buffer-string) "\n")
nil
(car actual-colors))
- (max max 10))))))
+ max)))))
(defun shr-buffer-width ()
(goto-char (point-min))