(b []byte, d diffMode)
| 119 | return string(b) |
| 120 | } |
| 121 | func (s *textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { |
| 122 | n0 := len(b) // Original buffer length |
| 123 | b = append(b, s.Prefix...) |
| 124 | b, s.Value = s.Value.formatCompactTo(b, d) |
| 125 | b = append(b, s.Suffix...) |
| 126 | if _, ok := s.Value.(textLine); ok { |
| 127 | return b, textLine(b[n0:]) |
| 128 | } |
| 129 | return b, s |
| 130 | } |
| 131 | func (s *textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { |
| 132 | b = append(b, s.Prefix...) |
| 133 | b = s.Value.formatExpandedTo(b, d, n) |
no test coverage detected