-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Milestone
Description
we have the following behavior:
coffee> diff = require 'diff'
# works as expected
coffee> diff.diffWords("hase igel fuchs", "hase igel fuchs")
[ { value: 'hase igel fuchs' } ]
# newline at righthand results in a change
coffee> diff.diffWords("hase igel fuchs", "hase igel fuchs\n")
[ { count: 5, value: 'hase igel fuchs' },
{ count: 1, added: true, removed: undefined, value: '\n' } ]
# newline at lefthand results in a change
coffee> diff.diffWords("hase igel fuchs\n", "hase igel fuchs")
[ { count: 5, value: 'hase igel fuchs' },
{ count: 1, added: undefined, removed: true, value: '\n' } ]
# newline in the middle words also as expected
coffee> diff.diffWords("hase igel fuchs", "hase igel\nfuchs")
[ { value: 'hase igel\nfuchs' } ]
when we read the documentation right, every whitespace should be ignored when using diffWords
.
Any thoughts on that?
/cc @Partyschaum
Metadata
Metadata
Assignees
Labels
No labels