react-html-parser icon indicating copy to clipboard operation
react-html-parser copied to clipboard

CSS custom properties are processed incorrectly

Open jouni opened this issue 4 years ago • 0 comments

Input HTML string

<div style="--foo: bar;"></div>,

Expected style object output

{ "--foo": "bar"}.

Actual output

{ "-Foo": "bar" }

Relevant part of the code

https://github.com/wrakky/react-html-parser/blob/master/src/utils/inlineStyleToObject.js#L35-L37

jouni avatar Oct 28 '20 16:10 jouni