Use startsWith instead of regex testing
This commit is contained in:
parent
a5d46bb40c
commit
41f6b6ab6b
1 changed files with 1 additions and 2 deletions
|
@ -37,9 +37,8 @@ function resolveDerivedVariable(decl, variables) {
|
|||
}
|
||||
|
||||
function extractAlias(decl) {
|
||||
const RE_VARIABLE_PROP = /--(.+)/;
|
||||
const wholeVariable = decl.value.match(RE_VARIABLE_VALUE)?.[1];
|
||||
if (RE_VARIABLE_PROP.test(decl.prop) && wholeVariable) {
|
||||
if (decl.prop.startsWith("--") && wholeVariable) {
|
||||
aliasMap.set(decl.prop, wholeVariable);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue