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

Function htmlToPlainText

apps/sim/tools/gmail/utils.ts:354–364  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

352 * entity decoding (also used elsewhere in the repo for the same purpose).
353 */
354export function htmlToPlainText(html: string): string {
355 return convert(html, {
356 wordwrap: false,
357 selectors: [
358 { selector: 'a', options: { hideLinkHrefIfSameAsText: true, noAnchorUrl: true } },
359 { selector: 'img', format: 'skip' },
360 { selector: 'script', format: 'skip' },
361 { selector: 'style', format: 'skip' },
362 ],
363 })
364}
365
366/**
367 * Produce the plain-text and HTML representations of a body so we can emit a

Callers 2

utils.test.tsFile · 0.90
buildBodyAlternativesFunction · 0.70

Calls 1

convertFunction · 0.85

Tested by

no test coverage detected