From a1b3266d42214fb9dd0c358e329676d31fb4c3ea Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Mon, 12 Apr 2021 11:21:00 +0200 Subject: [PATCH] Improve language CSS color literal pattern Close #123 --- data/plugins/language_css.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/plugins/language_css.lua b/data/plugins/language_css.lua index 021c5d33..9ea3d0d3 100644 --- a/data/plugins/language_css.lua +++ b/data/plugins/language_css.lua @@ -9,7 +9,8 @@ syntax.add { { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, { pattern = "[%a][%w-]*%s*%f[:]", type = "keyword" }, - { pattern = "#%x+", type = "string" }, + { pattern = "#%x%x%x%x%x%x%f[%W]",type = "string" }, + { pattern = "#%x%x%x%f[%W]", type = "string" }, { pattern = "-?%d+[%d%.]*p[xt]", type = "number" }, { pattern = "-?%d+[%d%.]*deg", type = "number" }, { pattern = "-?%d+[%d%.]*", type = "number" },