diff --git a/edit/autocomplete.js b/edit/autocomplete.js index 29376ce9..b52bf7c9 100644 --- a/edit/autocomplete.js +++ b/edit/autocomplete.js @@ -152,7 +152,7 @@ if (prop) { if (/[^-\w]/.test(leftLC)) { prev += execAt(/[\s:()]*/y, prev, text)[0].length; - leftLC = ''; + leftLC = leftLC.replace(/^\s*:?\s*/, ''); } if (!cssPropsValues) cssPropsValues = await linterMan.worker.getCssPropsValues(); list = [...new Set([...cssPropsValues[prop] || [], ...cssGlobalValues])]; diff --git a/edit/editor-worker.js b/edit/editor-worker.js index e1cc6f98..837dbbcc 100644 --- a/edit/editor-worker.js +++ b/edit/editor-worker.js @@ -29,6 +29,7 @@ let last = ''; const uniq = []; const words = describeProp(v) + .replace(/\(.*?\)/g, '(') .replace('', namedColors) .split(rxNonWord) .sort(comparator);