Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a slash in a TD causes extra TD elements in diff #42

Open
conallcheevers opened this issue Jan 7, 2022 · 0 comments
Open

a slash in a TD causes extra TD elements in diff #42

conallcheevers opened this issue Jan 7, 2022 · 0 comments

Comments

@conallcheevers
Copy link

conallcheevers commented Jan 7, 2022

[Test]
public void TestSlash()
{
   var oldText = "<table><tr><td> a1 n/a</td><td> b1</td></tr><tr><td> </td><td> </td></tr></table>";
   var newText = "<table><tr><td> a1</td><td> n/a</td></tr><tr><td> </td><td> </td></tr></table>";
   var output = global::HtmlDiff.HtmlDiff.Execute(oldText, newText);
   var expected = "<table><tr><td> a1<del class='diffdel'> n/a</del></td>" +
                  "<td> <del class='diffmod'>b1</del><ins class='diffmod'>n/a</ins></td></tr><tr><td> </td><td> </td></tr></table>";
   Assert.AreEqual(expected, output);
}

actual output:
<table><tr><td> a1</td><td> n/a</td><td><del class='diffdel'> b1</del></td></tr><tr><td> </td><td> </td></tr></table>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant