Show completions when using parameterized and/or labelled variants

master
Brad Cornes 2022-10-07 16:54:25 +01:00
parent 72569b00dd
commit d073bb9de6
1 changed files with 2 additions and 2 deletions

View File

@ -14,8 +14,8 @@ export function getVariantsFromClassName(
if ( if (
allVariants.includes(part) || allVariants.includes(part) ||
(state.jit && (state.jit &&
part.startsWith('[') && ((part.includes('[') && part.endsWith(']')) ||
part.endsWith(']') && (part.includes('<') && part.includes('>'))) &&
jit.generateRules(state, [`${part}${state.separator}[color:red]`]).rules.length > 0) jit.generateRules(state, [`${part}${state.separator}[color:red]`]).rules.length > 0)
) { ) {
variants.add(part) variants.add(part)