Browse Source

Should tolerate dos format

Matthew Wang 11 years ago
parent
commit
b87376fac9
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cdiff.py

+ 2
- 2
cdiff.py View File

@@ -480,9 +480,9 @@ class DiffParser(object):
480 480
 
481 481
         if size >= 4 and (header[0].startswith('*** ') and
482 482
                           header[1].startswith('--- ') and
483
-                          header[2] == '***************\n' and
483
+                          header[2].rstrip() == '***************' and
484 484
                           header[3].startswith('*** ') and
485
-                          header[3].endswith(' ****\n')):
485
+                          header[3].rstrip().endswith(' ****')):
486 486
             self._type = 'context'
487 487
             return
488 488