]> code.delx.au - gnu-emacs/blobdiff - lisp/net/shr-color.el
Some editing fixes in Tramp
[gnu-emacs] / lisp / net / shr-color.el
index 95ae5139e6835cd9c7ee837566ada9dbe9bd110f..482f829707d2b75d7ffa0c54105c7e05ae573513 100644 (file)
@@ -1,6 +1,6 @@
 ;;; shr-color.el --- Simple HTML Renderer color management
 
-;; Copyright (C) 2010-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2015 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: html
@@ -242,7 +242,7 @@ Like rgb() or hsl()."
            "rgb(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*)"
            color)
           (string-match
-           "rgba(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*[0-9]*\.?[0-9]+\s*%?\s*)"
+           "rgba(\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*\\([0-9]\\{1,3\\}\\(?:\s*%\\)?\\)\s*,\s*[0-9]*\\.?[0-9]+\s*%?\s*)"
            color))
       (format "#%02X%02X%02X"
               (shr-color-relative-to-absolute (match-string-no-properties 1 color))
@@ -253,7 +253,7 @@ Like rgb() or hsl()."
            "hsl(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*)"
            color)
           (string-match
-           "hsla(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*[0-9]*\.?[0-9]+\s*%?\s*)"
+           "hsla(\s*\\([0-9]\\{1,3\\}\\)\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*\\([0-9]\\{1,3\\}\\)\s*%\s*,\s*[0-9]*\\.?[0-9]+\s*%?\s*)"
            color))
       (let ((h (/ (string-to-number (match-string-no-properties 1 color)) 360.0))
             (s (/ (string-to-number (match-string-no-properties 2 color)) 100.0))