Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Request #17620 Trimming newlines should not be done by the engines
Submitted: 2010-07-22 12:52 UTC
From: dirkthomas_tigrisorg Assigned:
Status: Open Package: Text_Diff (version 1.1.1)
PHP Version: 5.3.2 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 35 - 16 = ?

 
 [2010-07-22 12:52 UTC] dirkthomas_tigrisorg (Dirk Thomas)
Description: ------------ If you want to use the package to diff two different files it should be possible to detect differences in line endings too. This is currently not possible since every engine processes the passed line with "trimNewlines". Therefore this should be moved out of the engines are at least be made configurable. Since i am a developer of WebSVN (http://www.websvn.info) i currently have to patch the package to remove the trimming, since it is perfectly valid to have lines which only differ in line endings, but which needs to be detected as a difference.

Comments

 [2011-04-29 23:24 UTC] dirkthomas_tigrisorg (Dirk Thomas)
 [2011-06-06 14:33 UTC] yunosh (Jan Schneider)
This patch breaks the string.phpt unit test. And please add tests for this new feature. Also, please consider using Horde_Text_Diff from pear.horde.org, which is the PHP5 successor of Text_Diff. I wouldn't mind patches for both versions though.