(str string)
| 59 | } |
| 60 | |
| 61 | func (t *TextWrapperStyle) Wrap(str string) string { |
| 62 | if !t.Empty() { |
| 63 | |
| 64 | if t.ColorPattern != `` { |
| 65 | str = colorpatterns.ApplyColorPattern(str, t.ColorPattern, t.colorPatternStyle) |
| 66 | } |
| 67 | |
| 68 | if ac := t.AnsiClass(); ac != `` { |
| 69 | str = `<ansi ` + t.AnsiClass() + `>` + str + `</ansi>` |
| 70 | } |
| 71 | } |
| 72 | return str |
| 73 | } |
| 74 | |
| 75 | var ( |
| 76 | errNoScript = errors.New("no script") |
no test coverage detected