MCPcopy Create free account
hub / github.com/anomalyco/opencode / convertHTMLToMarkdown

Function convertHTMLToMarkdown

packages/core/src/tool/webfetch.ts:208–218  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

206}
207
208export function convertHTMLToMarkdown(html: string) {
209 const turndown = new TurndownService({
210 headingStyle: "atx",
211 hr: "---",
212 bulletListMarker: "-",
213 codeBlockStyle: "fenced",
214 emDelimiter: "*",
215 })
216 turndown.remove(["script", "style", "meta", "link"])
217 return turndown.turndown(html)
218}

Callers 1

convertFunction · 0.70

Calls 1

removeMethod · 0.65

Tested by

no test coverage detected