From 8f71a9f0515fbf84b36995da0bf2dd84b52c7b42 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 22 Dec 2017 10:47:14 +0300 Subject: [PATCH] temporarily patch codemirror::mode::stylus to see CSS4 hex colors --- vendor/codemirror/mode/stylus/stylus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/codemirror/mode/stylus/stylus.js b/vendor/codemirror/mode/stylus/stylus.js index b83be16f..a9f50c05 100644 --- a/vendor/codemirror/mode/stylus/stylus.js +++ b/vendor/codemirror/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