mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-13 19:56:36 +09:00
Add webp support. Provide the option to disable strict SSL to facilitate local testing.
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ function getPostContent(postData, turndownService, config) {
|
||||
if (config.saveScrapedImages) {
|
||||
// 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))("[^>]*>)/gi, '$1images/$2$3');
|
||||
content = content.replace(/(<img[^>]*src=").*?([^/"]+\.(?:gif|jpe?g|png|webp))("[^>]*>)/gi, '$1images/$2$3');
|
||||
}
|
||||
|
||||
// preserve "more" separator, max one per post, optionally with custom label
|
||||
|
||||
Reference in New Issue
Block a user