Fix incorrect config name to saveImages

This commit is contained in:
Will Boyd
2025-02-04 14:01:07 -05:00
parent bcc0963a06
commit 5f5ab6f2bd
+1 -1
View File
@@ -102,7 +102,7 @@ export function getPostContent(postData, turndownService, config) {
// without mucking up content inside of other elements (like <code> blocks)
content = content.replace(/(\r?\n){2}/g, '\n<div></div>\n');
if (config.saveScrapedImages) {
if (config.saveImages === 'scraped' || config.saveImages === 'all') {
// writeImageFile() will save all content images to a relative /images
// folder so update references in post content to match
content = content.replace(/(<img[^>]*src=").*?([^/"]+\.(?:gif|jpe?g|png|webp))("[^>]*>)/gi, '$1images/$2$3');