Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing count #69

Closed
wfalkwallace opened this issue Aug 11, 2015 · 2 comments
Closed

Missing count #69

wfalkwallace opened this issue Aug 11, 2015 · 2 comments
Milestone

Comments

@wfalkwallace
Copy link

diff.diffLines('var a = 0;', 'var a = 0;\nvar b = 1;\nvar c = 3') returns

[{
  added: undefined,
  count: 1,
  removed: true,
  value: "var a = 0;",
},
{
  added: true,
  count: 3,
  removed: undefined,
  value: "var a = 0;↵var b = 1;↵var c = 3",
}]

diff.diffLines('', 'var a = 0;\nvar b = 1;') returns

[{
  added: true,
  value: "var a = 0;↵var b = 1;",
}]

what happened to count?

@kpdecker
Copy link
Owner

There are some short-circuit edge cases here that don't run the tokenizer. count was intended more as an internal field, but it wouldn't be that much overhead to run the tokenizer for these special cases and include the field for those as well.

@kpdecker kpdecker added this to the 2.1.0 milestone Aug 11, 2015
@kpdecker
Copy link
Owner

Released in 2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants