Skip to content

Diff algorithm has duplicate checks that will always be false #426

@DraagrenKirneh

Description

@DraagrenKirneh

in http://prettydiff.com/guide/unrelated_diff.xhtml
in line 127 of the fix function the first expression one[code[2] - 1] === two[prior[4] - 1] is identical to the one on line 119.
if this expression is true then the branch on line 119 will return, thus the same expression on 127 will always be false.

the same issue is present on line 143, where line 135 returns if that expression is true

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions