aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSimen Heggestøyl2017-12-16 09:37:11 +0100
committerSimen Heggestøyl2017-12-16 09:46:54 +0100
commit63b6281fdd9c00c6d968e936289c1e32aa9d0dd3 (patch)
treea326fb5cd3db2c34bfa6b154d5b47bf506f55cb7 /lisp
parent804b37ca63ecd68c5359febbedbec120c06918af (diff)
downloademacs-63b6281fdd9c00c6d968e936289c1e32aa9d0dd3.tar.gz
emacs-63b6281fdd9c00c6d968e936289c1e32aa9d0dd3.zip
Fix off-by-one error in 'css--hex-color'
* lisp/textmodes/css-mode.el (css--hex-color): Fix off-by-one error. * test/lisp/textmodes/css-mode-tests.el (css-test-hex-color): New test for 'css--hex-color'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/css-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 1de4ff0fca9..f2481da8aa1 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -1037,7 +1037,7 @@ This recognizes CSS-color-4 extensions."
1037STR is the incoming CSS hex color. 1037STR is the incoming CSS hex color.
1038This function simply drops any transparency." 1038This function simply drops any transparency."
1039 ;; Either #RGB or #RRGGBB, drop the "A" or "AA". 1039 ;; Either #RGB or #RRGGBB, drop the "A" or "AA".
1040 (if (> (length str) 4) 1040 (if (> (length str) 5)
1041 (substring str 0 7) 1041 (substring str 0 7)
1042 (substring str 0 4))) 1042 (substring str 0 4)))
1043 1043