Skip to content

Commit

Permalink
Fix 'data-*' attributes should not be wrapped in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
vieira committed Sep 13, 2024
1 parent 0038070 commit 66bd14a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/transformSvg.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ export default (t) => ({
// to
// <svg strokeWidth="5">
// don't convert any custom data-* or aria-* attributes just wrap in quotes
if (/^data-|^aria-/.test(originalName.name)) {
originalName.name = `'${originalName.name}'`;
} else {
if (!/^data-|^aria-/.test(originalName.name)) {
originalName.name = hyphenToCamel(originalName.name);
}
}
Expand Down

0 comments on commit 66bd14a

Please sign in to comment.