Skip to content

Commit

Permalink
feat: import upstream package (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: aymanbagabas <[email protected]>
  • Loading branch information
github-actions[bot] and aymanbagabas authored Dec 17, 2023
1 parent 58ea632 commit ea3bdd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/UPSTREAM
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3fd334ce9bcd0ffac28669e1d3b1379996ac37b1
261fa1a5d9a85d0d89f965368d818eddd2ec3b98
9 changes: 9 additions & 0 deletions myers/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ import (
// https://blog.jcoglan.com/2017/02/17/the-myers-diff-algorithm-part-3/
// https://www.codeproject.com/Articles/42279/%2FArticles%2F42279%2FInvestigating-Myers-diff-algorithm-Part-1-of-2

// ComputeEdits returns the diffs of two strings using a simple
// line-based implementation, like [diff.Strings].
//
// Deprecated: this implementation is moribund. However, when diffs
// appear in marker test expectations, they are the particular diffs
// produced by this implementation. The marker test framework
// asserts diff(orig, got)==wantDiff, but ideally it would compute
// got==apply(orig, wantDiff) so that the notation of the diff
// is immaterial.
func ComputeEdits(before, after string) []diff.Edit {
beforeLines := splitLines(before)
ops := operations(beforeLines, splitLines(after))
Expand Down

0 comments on commit ea3bdd8

Please sign in to comment.