* shr.el (shr-tag-table-1): Use bg/gfcolor specs on tables.
(shr-render-td): Handle td style="" better.
(shr-tag-table): Use the color from the style sheet.
+ (shr-render-td): Make sure we copy over all the overlays, too.
2010-12-07 Andrew Cohen <cohen@andy.bu.edu>
(let ((bgcolor (cdr (assq :bgcolor cont)))
(fgcolor (cdr (assq :fgcolor cont)))
(style (cdr (assq :style cont)))
- (shr-stylesheet shr-stylesheet))
+ (shr-stylesheet shr-stylesheet)
+ overlays)
(when style
(setq style (and (string-match "color" style)
(shr-parse-style style))))
(setq shr-stylesheet (append style shr-stylesheet)))
(let ((cache (cdr (assoc (cons width cont) shr-content-cache))))
(if cache
- (insert cache)
+ (progn
+ (insert (car cache))
+ (let ((end (length (car cache))))
+ (dolist (overlay (cadr cache))
+ (let ((new-overlay
+ (make-overlay (1+ (- end (nth 0 overlay)))
+ (1+ (- end (nth 1 overlay)))))
+ (properties (nth 2 overlay)))
+ (while properties
+ (overlay-put new-overlay
+ (pop properties) (pop properties)))))))
(let ((shr-width width)
(shr-indentation 0))
(shr-descend (cons 'td cont)))
(point)
(+ (point)
(skip-chars-backward " \t\n")))
- (push (cons (cons width cont) (buffer-string))
+ (push (list (cons width cont) (buffer-string)
+ (shr-overlays-in-region (point-min) (point-max)))
shr-content-cache)))
(goto-char (point-min))
(let ((max 0))