Skip to content

Commit 1d8de78

Browse files
fixed eslint issues
1 parent 442629d commit 1d8de78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/services/contributions/hooks/metascraper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = function () {
1919

2020
try {
2121
// find links
22-
const youtubeRegex = new RegExp(/(?:(?:https?:)?\/\/)?(?:www\.)?youtu(?:be\.com\/(?:watch\?(?:.*?&(?:amp;)?)*v=|v\/|embed\/)|\.be\/)([\w\-]+)(?:(?:&(?:amp;)?|\?)[\w\?=]*)*/, 'ig');
22+
const youtubeRegex = new RegExp(/(?:(?:https?:)?\/\/)?(?:www\.)?youtu(?:be\.com\/(?:watch\?(?:.*?&(?:amp;)?)*v=|v\/|embed\/)|\.be\/)([\w\-]+)(?:(?:&(?:amp;)?|\?)[\w\?=]*)*/, 'ig'); // eslint-disable-line
2323
const youtubeLinks = youtubeRegex.exec(hook.data.content);
2424

2525
// here you could scrape the url for metadata
@@ -33,7 +33,7 @@ module.exports = function () {
3333
hook.data.teaserImg = `https://img.youtube.com/vi/${youtubeLinks[1]}/maxresdefault.jpg`;
3434
hook.data.meta = Object.assign(hook.data.meta || {}, { hasVideo: true });
3535
}
36-
} catch (err) {}
36+
} catch (err) {} // eslint-disable-line
3737

3838
return resolve(hook);
3939
});

0 commit comments

Comments
 (0)