(content: ExtractedContent, _: ExportOptions)
| 14 | |
| 15 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 16 | async convert(content: ExtractedContent, _: ExportOptions): Promise<ConvertResult> { |
| 17 | if (content.contentType !== 'table') { |
| 18 | throw new Error('CSV format only supports table content') |
| 19 | } |
| 20 | |
| 21 | const csv = markdownTableToCsv(content.rawContent) |
| 22 | |
| 23 | return { |
| 24 | content: csv, |
| 25 | preview: csv, |
| 26 | isBinary: false, |
| 27 | extension: 'csv', |
| 28 | mimeType: 'text/csv' |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | /** |
nothing calls this directly
no test coverage detected