Skip to content

Comparing Html string that contains style #54

Closed
@xitox97

Description

@xitox97

Hi, is there a way to compare correctly for case like this?

I need to compare by word, it will become a problem if the element tag contains different style property. The comparison result will return unnecessary closing tag"/>".

Original

<div>
    <p style="text-align:left;"><span style="color: rgb(32,33,36);font-size: 24px;">Hello World</span></p>
    <p style="text-align:left;"><span style="font-size: 24px;">John Doe</span></p>
</div>

New

<div>
    <p style="text-align:right"><span style="color: rgb(32,33,36);background-color: rgb(248,249,250);font-size: 124px;">Hello World</span></p>
    <p style="text-align:right;"><span style="font-size: 24px;">Maria Doe</span></p>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionJust asking some questions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions