fix webfetch

This commit is contained in:
Dax Raad 2025-06-05 15:59:09 -04:00
commit 9147108675

View file

@ -99,6 +99,13 @@ function extractTextFromHTML(html: string): string {
}
function convertHTMLToMarkdown(html: string): string {
const turndownService = new TurndownService()
const turndownService = new TurndownService({
headingStyle: "atx",
hr: "---",
bulletListMarker: "-",
codeBlockStyle: "fenced",
emDelimiter: "*",
})
turndownService.remove(["script", "style", "meta", "link"])
return turndownService.turndown(html)
}