(f *TextFragment)
| 208 | } |
| 209 | |
| 210 | func (fm *formatter) FormatTextFragment(f *TextFragment) { |
| 211 | fm.FormatTextFragmentHeader(f) |
| 212 | fm.WriteByte('\n') |
| 213 | |
| 214 | for _, line := range f.Lines { |
| 215 | fm.WriteString(line.Op.String()) |
| 216 | fm.WriteString(line.Line) |
| 217 | if line.NoEOL() { |
| 218 | fm.WriteString("\n\\ No newline at end of file\n") |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | func (fm *formatter) FormatTextFragmentHeader(f *TextFragment) { |
| 224 | fmt.Fprintf(fm, "@@ -%d,%d +%d,%d @@", f.OldPosition, f.OldLines, f.NewPosition, f.NewLines) |
no test coverage detected