mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-18 14:13:55 +09:00
Data fixes, fix for <img> with 2+ src attributes
This commit is contained in:
+1
-1
@@ -107,7 +107,7 @@ export function getPostContent(content) {
|
||||
if (shared.config.saveImages === 'scraped' || shared.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');
|
||||
content = content.replace(/(<img\s[^>]*?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