From 5f5ab6f2bd63fa48be96aa5a7b04c9fae665aecb Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Tue, 4 Feb 2025 14:01:07 -0500 Subject: [PATCH] Fix incorrect config name to saveImages --- src/translator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translator.js b/src/translator.js index 163c602..1fc3f75 100644 --- a/src/translator.js +++ b/src/translator.js @@ -102,7 +102,7 @@ export function getPostContent(postData, turndownService, config) { // without mucking up content inside of other elements (like blocks) content = content.replace(/(\r?\n){2}/g, '\n
\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(/(]*src=").*?([^/"]+\.(?:gif|jpe?g|png|webp))("[^>]*>)/gi, '$1images/$2$3');