(styled: StyledString)
| 25 | } |
| 26 | |
| 27 | function styledStringToMarkdown(styled: StyledString): string { |
| 28 | switch (styled.type) { |
| 29 | case 'text': |
| 30 | return styled.value |
| 31 | case 'strong': |
| 32 | return '**' + styled.value + '**' |
| 33 | case 'code': |
| 34 | return '`' + styled.value + '`' |
| 35 | case 'line': |
| 36 | return styled.value.map(styledStringToMarkdown).join('') |
| 37 | case 'stack': |
| 38 | return styled.value.map(styledStringToMarkdown).join('\n') |
| 39 | default: |
| 40 | throw new Error('Unknown StyledString type', styled) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | function normalizeIssues(issues: Issue[]) { |
| 45 | return issues |
no test coverage detected