Skip to content

CSS custom properties are processed incorrectly #79

Open
@jouni

Description

@jouni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions