hackerxian / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

"Word Mode" - The definition of a 'word' #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
---What steps will reproduce the problem?
1. Try implementing the "Word Mode" explained here 
http://code.google.com/p/google-diff-match-patch/wiki/LineOrWordDiffs
2. Diff some stuff
3. Eat pizza

---What is the expected output? What do you see instead?
We should have the choice of determining what is a "word". Does it include the 
delimiter (whitespace) before it? Does it include the delimiter following it? 
Is the delimiter itself considered a separate 'word' in its own right?
Instead, the decision seems to have been hardcoded that the word-delimiter 
(whitespace in my case) is part of the previous word.

---What version of the product are you using? On what operating system?
JavaScript version
Windows XP
Testing with IE8 and Chrome

---Please provide any additional information below.
I need every word-delimiter (whitespace in my case) to be considered a separate 
'word' in its own right. Any quick fixes to do this please?

Original issue reported on code.google.com by logic....@gmail.com on 19 May 2011 at 4:33