Split stuff like "#444444 !important" to find the real colour.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 23 Nov 2010 19:26:49 +0000 (20:26 +0100)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Tue, 23 Nov 2010 19:26:49 +0000 (20:26 +0100)
lisp/ChangeLog
lisp/shr.el

index 58e7db9..56716cb 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-23  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * shr.el (shr-insert-color-overlay): Split stuff like
+       "#444444 !important" to find the real colour.
+
 2010-11-23  Andrew Cohen  <cohen@andy.bu.edu>
 
        * nnheader.el (nnheader-parse-head): Bug fix.  Properly position
index 1efa31a..8398e8a 100644 (file)
@@ -502,6 +502,8 @@ START, and END."
 
 (defun shr-insert-color-overlay (color start end)
   (when color
+    (when (string-match " " color)
+      (setq color (car (split-string color))))
     (let ((overlay (make-overlay start end)))
       (overlay-put overlay 'face (cons 'foreground-color
                                        (cadr (shr-color-check color)))))))