Skip to content

Commit

Permalink
fix: resolve issue with markdown video creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 17, 2024
1 parent 0a28f8a commit 74caf33
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/scripts/create-rss.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,12 @@ const rssFilePath = `./feeds/rss/${year}-${week}.json`;
rehypePlugins: [[ rehypeVideo, { details: false, test: (url) => /\.(mp4|mov)|[?&]rehype=video/i.test(url) } ]],
filterPlugins:(type, plugins) => {
if (type === "rehype") {
const replugins = plugins.filter((plugin) => {
return plugins.map((plugin) => {
if (Array.isArray(plugin) && plugin[0].name === 'RehypeVideo') {
return false
return [rehypeVideo, { details: false, test: (url) => /\.(mp4|mov)|[?&]rehype=video/i.test(url) }];
}
return true;
return plugin;
});
return replugins
}
return plugins
}
Expand Down

0 comments on commit 74caf33

Please sign in to comment.