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

NewLines appear broken in patches (Python 3, Django 1.6.1) #95

Open
GoogleCodeExporter opened this issue Mar 21, 2016 · 2 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. have a change at the end of a line
  - from: 
   some text
   more text
  - to:
   some text with change
   more text
2. call
  d = dmp.diff_match_patch()
  diffs = d.diff_main(text1, text2)
  patch = d.patch_make(diffs)
  print_me = d.patch_toText(patch)


What is the expected output? What do you see instead?
print_me containts:
  + with change
    %0D%0Amore text

it should have contained:
  + with change
    more text

What version of the product are you using? On what operating system?
- Python 3.3 x64 on Windows
- Django 1.6.1
- Chrome on Windows

Please provide any additional information below.

I could do a work-around by removing newlines but I have no idea what side 
effects I'm introducing:

  diffs = d.diff_main(
          "".join(text1.splitlines()), 
          "".join(text2.splitlines())
  )

Original issue reported on code.google.com by [email protected] on 22 Jan 2014 at 9:56

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Fixed with patch from issue 97

Original comment by [email protected] on 23 Jan 2014 at 6:02

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