fixup: ignore grammar in (), preserve - in LC

This commit is contained in:
tophf 2021-03-12 23:02:15 +03:00
parent 9cc4696927
commit dfed35c1f4
2 changed files with 2 additions and 1 deletions

View File

@ -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])];

View File

@ -29,6 +29,7 @@
let last = '';
const uniq = [];
const words = describeProp(v)
.replace(/\(.*?\)/g, '(')
.replace('<named-color>', namedColors)
.split(rxNonWord)
.sort(comparator);