From b06d67a073fdbf0614a548d3d2dbd5dacb667f07 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Wed, 16 Oct 2019 01:26:35 -0700 Subject: [PATCH] Make color matches not happen in the middle of \w MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Valid colors won't appear inside of a word, so we'll use a clever bit of vim to match them only not immediately after a word (as opposed to a WORD, they're not the same thing in vim.) This was done by patching the patterns in about line 319-321. This created a new problem however if an invalid color such as… call minpac#add('gko/vim-coloresque') …happened to appear in the same file as a valid '#add' color. To fix that, we use the same '\w\@\|#[0-9A-Fa-f]\{6\}\>', - \ 'rgba' : 'rgba\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)', - \ 'hsla' : 'hsla\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)' + \ 'hex' : '\w\@\|#[0-9A-Fa-f]\{6\}\>', + \ 'rgba' : '\w\@