Skip to content

Commit

Permalink
fixed description of cursor_normalize_diff
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Oct 19, 2016
1 parent 427d921 commit 3f63633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,9 @@ module.exports = diff;
/*
* Modify a diff such that the cursor position points to the start of a change:
* E.g.
* cursor_normalize_diff([[DIFF_EQUAL, 'abc']], cursorPos)
* cursor_normalize_diff([[DIFF_EQUAL, 'abc']], 1)
* => [1, [[DIFF_EQUAL, 'a'], [DIFF_EQUAL, 'bc']]]
* cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 1)
* cursor_normalize_diff([[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xyz']], 2)
* => [2, [[DIFF_INSERT, 'new'], [DIFF_DELETE, 'xy'], [DIFF_DELETE, 'z']]]
*
* @param {Array} diffs Array of diff tuples
Expand Down

0 comments on commit 3f63633

Please sign in to comment.