Skip to content

Commit

Permalink
fix(transformAttrs): attrRules error
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Apr 29, 2024
1 parent f31acf5 commit afacb1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export function transformAttrs(attrs: any[]) {
let newAttr = content
for (const match of content.matchAll(attrRules)) {
const index = match.index
newAttr = `${newAttr.slice(0, index)}[${match[4].replace(/\s+/g, '')}]${newAttr.slice(index + match[0].length)}`
newAttr = `${newAttr.slice(0, index)}[${match[2].replace(/\s+/g, '')}]${newAttr.slice(index + match[0].length)}`
}

if (content !== newAttr) {
Expand Down

0 comments on commit afacb1b

Please sign in to comment.