(text: string, color: (text: string) => string)
| 11 | /// when sending OutputEvents() to VS Code, it won't allow source locations to be attached (since |
| 12 | /// they can only be attached to single-line messages). |
| 13 | export function applyColor(text: string, color: (text: string) => string) { |
| 14 | const match = text && whitespacePattern.exec(text); |
| 15 | if (!match) |
| 16 | return color(text); |
| 17 | |
| 18 | return `${match[1]}${color(match[2])}${match[3]}`; |
| 19 | } |
no outgoing calls
no test coverage detected