(markdown: string, chatUrl: string)
| 276 | } |
| 277 | |
| 278 | async function renderEmailHtml(markdown: string, chatUrl: string): Promise<string> { |
| 279 | const safeMarkdown = preserveSoftBreaks(stripRawHtml(markdown)) |
| 280 | const html = await render( |
| 281 | createElement( |
| 282 | InboxResponseEmail, |
| 283 | { chatUrl, linkLabel: 'View full conversation' }, |
| 284 | createElement( |
| 285 | EmailMarkdown, |
| 286 | { |
| 287 | markdownContainerStyles: emailStyles.markdownContainer, |
| 288 | markdownCustomStyles: markdownStyles, |
| 289 | }, |
| 290 | safeMarkdown |
| 291 | ) |
| 292 | ) |
| 293 | ) |
| 294 | |
| 295 | return stripUnsafeUrls(html) |
| 296 | } |
| 297 | |
| 298 | async function renderErrorHtml(error: string, chatUrl: string): Promise<string> { |
| 299 | const html = await render( |
no test coverage detected