(shr-table-widths): Off-by-one error in width computation.
(shr-expand-newlines): Remove dead code.
(shr-insert-table): Extend background colors to the end of the column.
+ (shr-insert-table): Only copy the background, not underline and
+ the like.
+ (shr-face-background): New function.
2015-02-10 Fabián Ezequiel Gallina <fgallina@gnu.org>
(when bolp
(shr-mark-fill start))
(when shr-use-fonts
- (add-face-text-property start (point)
- (or shr-current-font 'variable-pitch)
- t)))))))
+ (put-text-property start (point)
+ 'face
+ (or shr-current-font 'variable-pitch))))))))
(defun shr-fill-lines (start end)
(if (<= shr-internal-width 0)
(propertize " "
'display `(space :align-to (,pixel-align))
'face (and (> (length line) 0)
- (get-text-property
- (1- (length line)) 'face line))
+ (shr-face-background
+ (get-text-property
+ (1- (length line)) 'face line)))
'shr-table-indent shr-table-id)
shr-table-vertical-line)
(shr-colorize-region
(unless (= start (point))
(put-text-property start (1+ start) 'shr-table-id shr-table-id))))
+(defun shr-face-background (face)
+ (and (consp face)
+ (let ((background nil))
+ (dolist (elem face)
+ (when (and (consp elem)
+ (eq (car elem) :background))
+ (setq background (cadr elem))))
+ (and background
+ (list :background background)))))
+
(defun shr-expand-alignments (start end)
(while (< (setq start (next-single-property-change
start 'shr-table-id nil end))