diff --git a/src/index.ts b/src/index.ts index c05c450..72657e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import { VNodeData } from "vue"; const pattern = { camel: /-(\w)/g, style: /:(.*)/, + styleList: /;(?![^(]*\))/g, } as const; function camelReplace(_substr: string, match: string) { @@ -16,7 +17,7 @@ function camelCase(str: string) { function parseStyle(style: string) { let styleMap: Record = {}; - for (let s of style.split(";")) { + for (let s of style.split(pattern.styleList)) { let [key, val] = s.split(pattern.style); key = key.trim(); if (!key) {