You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand, diffWordsWithSpace currently treats any amount of spaces as a single token. Which makes sense for diffWords (where space isn't significant), but doesn't work well for diffWordsWithSpace.
Suggestion: maybe it should compare spaces between words on character-by-character basis?
Possible solution - change regexp in tokenizer like this:
< let tokens = value.split(/(\s+|\b)/);---> let tokens = this.options.ignoreWhitespace ?> value.split(/(\s+|\b)/) :> value.split(/(\s|\b)/);
Seems to work fine for me, but I'm not quite sure it's correct.
The text was updated successfully, but these errors were encountered:
Returns:
'foo<del>\n</del><ins>\n\n\n</ins>bar'
Desired output is:
'foo<ins>\n\n</ins>bar'
As far as I understand,
diffWordsWithSpace
currently treats any amount of spaces as a single token. Which makes sense fordiffWords
(where space isn't significant), but doesn't work well fordiffWordsWithSpace
.Suggestion: maybe it should compare spaces between words on character-by-character basis?
Possible solution - change regexp in tokenizer like this:
Seems to work fine for me, but I'm not quite sure it's correct.
The text was updated successfully, but these errors were encountered: