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

lack document of DiffDelete/DiffInsert. #84

Open
bronze1man opened this issue Nov 2, 2017 · 0 comments
Open

lack document of DiffDelete/DiffInsert. #84

bronze1man opened this issue Nov 2, 2017 · 0 comments

Comments

@bronze1man
Copy link

bronze1man commented Nov 2, 2017

From the document of DiffMatchPatch.DiffMain:

https://github.com/sergi/go-diff/blob/master/diffmatchpatch/diff.go#L49

// DiffMain finds the differences between two texts.
// If an invalid UTF-8 sequence is encountered, it will be replaced by the Unicode replacement character.
func (dmp *DiffMatchPatch) DiffMain(text1, text2 string, checklines bool) []Diff {

From the document of DiffDelete:

https://github.com/sergi/go-diff/blob/master/diffmatchpatch/diff.go#L30

	// DiffDelete item represents a delete diff.
	DiffDelete Operation = -1

So what is the mean of DiffDelete ?

Is DiffDelete mean that text1 do not have this content and text2 has this content? or text2 do not have this content and text1 has this content?

The user can do the experiment to find out that text1 is the old version ,and the text2 is the newer version, so DiffDelete mean that text2 do not have this content and text1 has this content.

But that information is not in the document.

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

1 participant