(shr-insert-table): Also insert empty TDs.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 7 Oct 2010 14:38:36 +0000 (16:38 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Thu, 7 Oct 2010 14:38:36 +0000 (16:38 +0200)
lisp/ChangeLog
lisp/shr.el

index eb5accd..86a2c65 100644 (file)
@@ -4,6 +4,7 @@
        to avoid getting an exponential rendering behaviour in nested tables.
        (shr-insert): Rework the line-breaking algorithm.
        (shr-insert): Don't leave trailing spaces.
+       (shr-insert-table): Also insert empty TDs.
 
 2010-10-07  Katsumi Yamaoka  <yamaoka@jpl.org>
 
index 9acb557..ff3474c 100644 (file)
@@ -504,16 +504,15 @@ Return a string with image data."
              overlay overlay-line)
          (dolist (line lines)
            (setq overlay-line (pop overlay-lines))
-           (when (> (length line) 0)
-             (end-of-line)
-             (insert line "|")
-             (dolist (overlay overlay-line)
-               (let ((o (make-overlay (- (point) (nth 0 overlay) 1)
-                                      (- (point) (nth 1 overlay) 1)))
-                     (properties (nth 2 overlay)))
-                 (while properties
-                   (overlay-put o (pop properties) (pop properties)))))
-             (forward-line 1)))
+           (end-of-line)
+           (insert line "|")
+           (dolist (overlay overlay-line)
+             (let ((o (make-overlay (- (point) (nth 0 overlay) 1)
+                                    (- (point) (nth 1 overlay) 1)))
+                   (properties (nth 2 overlay)))
+               (while properties
+                 (overlay-put o (pop properties) (pop properties)))))
+           (forward-line 1))
          ;; Add blank lines at padding at the bottom of the TD,
          ;; possibly.
          (dotimes (i (- height (length lines)))