(s: string)
| 35 | * here). |
| 36 | */ |
| 37 | export function normalizeProse(s: string): string { |
| 38 | return s.replace(/[ \t]+\n/g, '\n').replace(/\n{3,}/g, '\n\n').replace(/^\n+|\n+$/g, ''); |
| 39 | } |
| 40 | |
| 41 | /** Split a message into alternating prose and fenced-code segments. */ |
| 42 | export function parseSegments(text: string): Segment[] { |
no outgoing calls
no test coverage detected