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

how to only show different part? #118

Open
LoRexxar opened this issue Mar 29, 2021 · 2 comments
Open

how to only show different part? #118

LoRexxar opened this issue Mar 29, 2021 · 2 comments

Comments

@LoRexxar
Copy link

just like

image

@chenyahui
Copy link

chenyahui commented May 20, 2021

just like

image

You can filter out the DiffEqual items of item before pass the diffs to DiffPrettyHtml or DiffPrettyText.
just like this:

	var newDiffs []diffmatchpatch.Diff
	for _, item := range diffs {
		if item.Type != diffmatchpatch.DiffEqual {
			newDiffs = append(newDiffs, item)
		}
	}

@LoRexxar
Copy link
Author

I think it’s best to select the display content by adding parameters, this can only be a temporary solution

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