mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 11:36:24 +01:00
Match regex only if declaration is a variable
This commit is contained in:
parent
ff10297bf8
commit
9f77df0bff
@ -55,9 +55,11 @@ function resolveDerivedVariable(decl, {variables, derive}) {
|
||||
}
|
||||
|
||||
function extractAlias(decl) {
|
||||
const wholeVariable = decl.value.match(/var\(--(.+)\)/)?.[1];
|
||||
if (decl.prop.startsWith("--") && wholeVariable) {
|
||||
aliasMap.set(decl.prop, wholeVariable);
|
||||
if (decl.variable) {
|
||||
const wholeVariable = decl.value.match(/var\(--(.+)\)/)?.[1];
|
||||
if (wholeVariable) {
|
||||
aliasMap.set(decl.prop, wholeVariable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user