(body: string, max: number)
| 40 | } |
| 41 | |
| 42 | function truncateBody(body: string, max: number): string { |
| 43 | const truncateWarning = '...*[Comment body truncated]*'; |
| 44 | if (body.length > max) { |
| 45 | logWarning(`Comment body is too long. Truncating to ${max} characters.`); |
| 46 | return body.slice(0, max - truncateWarning.length) + truncateWarning; |
| 47 | } |
| 48 | return body; |
| 49 | } |
no test coverage detected