Skip to content

Changing tag doesn't count as differenceΒ #10

@dmitrymurashenkov

Description

@dmitrymurashenkov

For example changing <b> to <i> doesn't result in addition of <ins>/<del> tags.

Made an example:

https://codepen.io/anon/pen/EMrRJG

let originalHTML = `This text is <b>bold</b>.`;

let newHTML = `This text is <i>bold</i>.`;

// Diff HTML strings
let output = htmldiff(originalHTML, newHTML);

Result:

This text is <b><i>bold</i></b>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions