Skip to content

Commit 6ce744a

Browse files
authored
fix: do not convert attributes starting with stroke (#201)
1 parent 3056f19 commit 6ce744a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/htmlToJsx.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function transformToReactJSX(jsx: string) {
1515
export function HtmlToJSX(html: string, reactJSX = false) {
1616
const jsx = html.replace(/([\w-]+)=/g, (i) => {
1717
const words = i.split('-')
18-
if (words.length === 1)
18+
if (words.length === 1 || words[0] === 'stroke')
1919
return i
2020
return words
2121
.map((i, idx) =>

0 commit comments

Comments
 (0)