mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 15:03:17 +00:00
fix: Move HTML to Markdown conversion to scraper.go
This commit is contained in:
@@ -174,13 +174,9 @@ func extractAndConvertContent(urlStr string) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Create a new converter
|
||||
converter := md.NewConverter("", true, nil)
|
||||
|
||||
// Convert HTML to Markdown
|
||||
markdown, err := converter.ConvertString(content)
|
||||
markdown, err := scraper.ProcessHTMLContent(content, scraper.Config{})
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error converting HTML to Markdown: %v", err)
|
||||
return "", fmt.Errorf("error processing HTML content: %v", err)
|
||||
}
|
||||
|
||||
parsedURL, err := url.Parse(urlStr)
|
||||
|
||||
Reference in New Issue
Block a user