fix(hi-patterns): correct regex for shorthand hex colors. See ##2562

This commit is contained in:
Folke Lemaitre
2024-03-08 11:31:42 +01:00
parent 166942251d
commit 7415231855

View File

@ -20,7 +20,7 @@ M.plugin = {
highlighters = {
hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }),
shorthand = {
pattern = "#%x%x%x%f[%X]",
pattern = "()#%x%x%x()%f[^%x%w]",
group = function(_, _, data)
---@type string
local match = data.full_match