MCPcopy Index your code
hub / github.com/simstudioai/sim / renderEmailHtml

Function renderEmailHtml

apps/sim/lib/mothership/inbox/response.ts:278–296  ·  view source on GitHub ↗
(markdown: string, chatUrl: string)

Source from the content-addressed store, hash-verified

276}
277
278async 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
298async function renderErrorHtml(error: string, chatUrl: string): Promise<string> {
299 const html = await render(

Callers 1

sendInboxResponseFunction · 0.85

Calls 4

preserveSoftBreaksFunction · 0.85
stripRawHtmlFunction · 0.85
stripUnsafeUrlsFunction · 0.85
renderFunction · 0.50

Tested by

no test coverage detected