From b36cf986c7288e6019d11338867a5730fee70b95 Mon Sep 17 00:00:00 2001 From: tophf <tophf@gmx.com> Date: Fri, 22 Dec 2017 10:32:36 +0300 Subject: [PATCH] [stylus mode] parse CSS4 hex colors - #RGBA and #RRGGBBAA --- mode/stylus/stylus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mode/stylus/stylus.js b/mode/stylus/stylus.js index b83be16f4..a9f50c05d 100644 --- a/mode/stylus/stylus.js +++ b/mode/stylus/stylus.js @@ -76,7 +76,7 @@ if (ch == "#") { stream.next(); // Hex color - if (stream.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i)) { + if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b/i)) { return ["atom", "atom"]; } // ID selector -- GitLab