func PrettyHTML(dmp *diffmatchpatch.DiffMatchPatch, diffs []diffmatchpatch.Diff) string {
	var buff bytes.Buffer
	for _, diff := range diffs {
		text := strings.Replace(html.EscapeString(diff.Text), "\n", "&para;<br>", -1)
		switch diff.Type {
		case diffmatchpatch.DiffInsert:
			_, _ = buff.WriteString("<span class=\"ins\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		case diffmatchpatch.DiffDelete:
			_, _ = buff.WriteString("<span class=\"del\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		case diffmatchpatch.DiffEqual:
			_, _ = buff.WriteString("<span class=\"good\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		}
	}
	return buff.String()
}
// PrettyHTML produces pretty HTML for display.
//
// This function is copied and modified from the function `DiffPrettyHtml()` in
// the github.com/sergi/go-diff/diffmatchpatch package.
PrettyHTML produces pretty HTML for display.

This function is copied and modified from the function `DiffPrettyHtml()` in
the github.com/sergi/go-diff/diffmatchpatch package.
// PrettyHTML produces pretty HTML for display . // // This function is copied and modified from the function ` DiffPrettyHtml () ` in // the github . com / sergi / go - diff / diffmatchpatch package .
func PrettyHTML(dmp *diffmatchpatch.DiffMatchPatch, diffs []diffmatchpatch.Diff) string {
	var buff bytes.Buffer
	for _, diff := range diffs {
		text := strings.Replace(html.EscapeString(diff.Text), "\n", "&para;<br>", -1)
		switch diff.Type {
		case diffmatchpatch.DiffInsert:
			_, _ = buff.WriteString("<span class=\"ins\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		case diffmatchpatch.DiffDelete:
			_, _ = buff.WriteString("<span class=\"del\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		case diffmatchpatch.DiffEqual:
			_, _ = buff.WriteString("<span class=\"good\">")
			_, _ = buff.WriteString(text)
			_, _ = buff.WriteString("</span>")
		}
	}
	return buff.String()
}
func PrettyHTML ( dmp * diffmatchpatch . DiffMatchPatch , diffs [ ] diffmatchpatch . Diff ) string { var buff bytes . Buffer for _ , diff := range diffs { text := strings . Replace ( html . EscapeString ( diff . Text ) , " \n " , " " , - 1 ) switch diff . Type { case diffmatchpatch . DiffInsert : _ , _ = buff . WriteString ( " \" \" " ) _ , _ = buff . WriteString ( text ) _ , _ = buff . WriteString ( " " ) case diffmatchpatch . DiffDelete : _ , _ = buff . WriteString ( " \" \" " ) _ , _ = buff . WriteString ( text ) _ , _ = buff . WriteString ( " " ) case diffmatchpatch . DiffEqual : _ , _ = buff . WriteString ( " \" \" " ) _ , _ = buff . WriteString ( text ) _ , _ = buff . WriteString ( " " ) } } return buff . String ( ) }
PrettyHTML produces pretty HTML for display.
PrettyHTML produces pretty HTML for display .