shr.el (shr-insert-color-overlay): Pass rgb(rrr, ggg, bbb) type color expression...
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 24 Nov 2010 06:48:20 +0000 (06:48 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 24 Nov 2010 06:48:20 +0000 (06:48 +0000)
lisp/ChangeLog
lisp/shr.el

index 3e95873..cc0bfe1 100644 (file)
@@ -1,5 +1,8 @@
 2010-11-24  Katsumi Yamaoka  <yamaoka@jpl.org>
 
+       * shr.el (shr-insert-color-overlay): Pass rgb(rrr, ggg, bbb) type color
+       expression to shr-color-check as is.
+
        * shr-color.el (shr-color->hexadecimal): Ignore case of color names.
 
        * color-lab.el: Add coding cookie.
index b195f6b..3d3b199 100644 (file)
@@ -502,11 +502,12 @@ START, and END."
 
 (defun shr-insert-color-overlay (color start end)
   (when color
-    (when (string-match " " color)
+    (when (and (not (string-match "\\`rgb([^\)]+)\\'" color))
+              (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)))))))
+                                      (cadr (shr-color-check color)))))))
 
 ;;; Tag-specific rendering rules.