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

c# patch_toText + patch_fromText doesn't work #92

Open
GoogleCodeExporter opened this issue May 6, 2015 · 0 comments
Open

c# patch_toText + patch_fromText doesn't work #92

GoogleCodeExporter opened this issue May 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run this code with C# version

            string text1 = "I like football\nI like baseball";
            string text2 = "I like football\nI love baseball";

            diff_match_patch dmp = new diff_match_patch();
            List<Diff> diff = dmp.diff_main(text1, text2);

            List<Patch> patchList = dmp.patch_make(diff);

            string patchText = dmp.patch_toText(patchList);
            List<Patch> patchList2 = dmp.patch_fromText(patchText);
            object[] ob = dmp.patch_apply(patchList2, text1);
            string patchedStr = ob[0].ToString();

            if (patchedStr != text2)
            {
                // patch didn't work
            }


What is the expected output? What do you see instead?
     patchedStr != text2

What version of the product are you using? On what operating system?
    downloaded in Sept 2013 from your site. Windows 7.

Please provide any additional information below.

Original issue reported on code.google.com by sswave4d...@hotmail.com on 25 Sep 2013 at 3:57

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

No branches or pull requests

1 participant