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
Is this the expected behavior? I would love if it was configurable, because it's A) surprising and, B) if trying to display the diffs visually, it makes changes to new lines seem more complicated than they really are.
(I can see about opening a pull request if a change to this behavior is welcome.)
The text was updated successfully, but these errors were encountered:
The behavior of diffWordsWithSpace surprised me with its treatment of consecutive new lines as a single word.
For example:
Left:
Right:
Given the above, I would expect this diff:
[{ value: "A\n" }, { value: "\n", removed: true }, { value: "B\n" }]
Instead, I get:
[{ value: "A" }, { value: "\n\n", removed: true}, { value: "\n", added: true}, { value: "B\n" }]
Is this the expected behavior? I would love if it was configurable, because it's A) surprising and, B) if trying to display the diffs visually, it makes changes to new lines seem more complicated than they really are.
(I can see about opening a pull request if a change to this behavior is welcome.)
The text was updated successfully, but these errors were encountered: