Skip to content

Commit 0e02f36

Browse files
authored
Merge pull request #161 from lonekorean/remove-image-qs
remove-image-qs
2 parents 9d706b5 + 473a89c commit 0e02f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/translator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export function getPostContent(content) {
117117
if (shared.config.saveImages === 'scraped' || shared.config.saveImages === 'all') {
118118
// writeImageFile() will save all content images to a relative /images
119119
// folder so update references in post content to match
120-
content = content.replace(/(<img(?=\s)[^>]+?(?<=\s)src=")[^"]*?([^/"]+)("[^>]*>)/gi, '$1images/$2$3');
120+
content = content.replace(/(<img(?=\s)[^>]+?(?<=\s)src=")[^"]*?([^/"]+?)(\?[^"]*)?("[^>]*>)/gi, '$1images/$2$4');
121121
}
122122

123123
// preserve "more" separator, max one per post, optionally with custom label

0 commit comments

Comments
 (0)