chore: fix test

This commit is contained in:
zernonia 2024-06-18 22:28:06 +08:00
parent 2f5279ffdc
commit b2d7dabf87

View File

@ -41,7 +41,7 @@ export function transformCssVars(opts: TransformOpts): CodemodPlugin {
// handle class attribute without binding // handle class attribute without binding
else if (node.type === 'VLiteral' && typeof node.value === 'string') { else if (node.type === 'VLiteral' && typeof node.value === 'string') {
if (node.parent.key.name === 'class') { if (node.parent.key.name === 'class') {
node.value = applyColorMapping(node.value.replace(/"/g, ''), baseColor.inlineColors) node.value = `"${applyColorMapping(node.value.replace(/"/g, ''), baseColor.inlineColors)}"`
transformCount++ transformCount++
} }
} }