Skip to content

Commit db2d987

Browse files
committed
Fix markdown replacement
1 parent d332690 commit db2d987

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils/markdown.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export async function replaceYouTubeLinks(
1414
let updatedContent = markdownContent;
1515

1616
for (const match of matches) {
17-
const fullUrl = match[0];
1817
const id = match[1];
1918

2019
if (!id) continue;
@@ -23,8 +22,7 @@ export async function replaceYouTubeLinks(
2322
props: { id, alt: "Embedded YouTube video" },
2423
});
2524

26-
updatedContent = updatedContent.replace(fullUrl, html);
25+
return html;
2726
}
28-
2927
return updatedContent;
3028
}

0 commit comments

Comments
 (0)