diff --git a/index.js b/index.js index 88e247b..6a52bf1 100644 --- a/index.js +++ b/index.js @@ -158,15 +158,11 @@ function initTurndownService() { }); // preserve iframes (common for embedded audio/video) - // other solutions via blankRule() and keep() did not work for me - // that's why getPostContent() adds a "." to make ', ''); + .replace('allowfullscreen=""', 'allowfullscreen'); return '\n\n' + html + '\n\n'; } }); @@ -204,18 +200,23 @@ function getPostDate(post) { function getPostContent(post, turndownService) { let content = post.encoded[0].trim(); - // this is for a workaround/hack in initTurndownService() - content = content.replace(/<\/iframe>/gi, '.$&'); - if (argv.addcontentimages) { // writeImageFile() will save all content images to a relative /images folder // so update references in post content to match content = content.replace(/(]*src=").*?([^\/"]+\.(?:gif|jpg|png))("[^>]*>)/gi, '$1images/$2$3'); } + // this is a hack to make