fix webfetch
This commit is contained in:
parent
ea9dd4e9e2
commit
9147108675
1 changed files with 19 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue