mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 06:42:26 +00:00
fix webfetch
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user