PatchToText takes a list of patches and returns a textual representation.
(patches []Patch)
| 579 | |
| 580 | // PatchToText takes a list of patches and returns a textual representation. |
| 581 | func (dmp *DiffMatchPatch) PatchToText(patches []Patch) string { |
| 582 | var text bytes.Buffer |
| 583 | for _, aPatch := range patches { |
| 584 | _, _ = text.WriteString(aPatch.String()) |
| 585 | } |
| 586 | return text.String() |
| 587 | } |
| 588 | |
| 589 | var patchHeaderRegex = regexp.MustCompile("^@@ -(\\d+),?(\\d*) \\+(\\d+),?(\\d*) @@$") |
| 590 |