Closed ExplodingCabbage closed 4 months ago
This seems wrong:
> wd = require('./lib/diff/word') { diffWords: [Function: diffWords], diffWordsWithSpace: [Function: diffWordsWithSpace], wordDiff: { equals: [Function (anonymous)], tokenize: [Function (anonymous)], options: { ignoreWhitespace: true } } } > wd.wordDiff.tokenize("( foo ), bar") [ '', '(', '', ' ', 'foo', ' ', '', ')', ',', ' ', 'bar' ]
I'm honestly not sure why this doesn't just completely break the main diffing algorithm when we use diffWords; we must have logic to filter out the ''s somewhere. But even so, it seems like it'd be nice if that happened at the .tokenize stage...
diffWords
''
.tokenize
This seems wrong:
I'm honestly not sure why this doesn't just completely break the main diffing algorithm when we use
diffWords
; we must have logic to filter out the''
s somewhere. But even so, it seems like it'd be nice if that happened at the.tokenize
stage...