Added the white text.

This commit is contained in:
NoobDeveloper412 2024-09-28 22:40:37 +05:00
parent 15565b23b7
commit 0ff4bde8e9

View file

@ -1,5 +1,4 @@
export function parseAndWrapCaptions(caption) {
console.log(caption)
return caption.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g, (match,text, content) => {
// Split the content by spaces to identify potential URLs
const parts = content.split(' ');
@ -10,7 +9,7 @@ export function parseAndWrapCaptions(caption) {
// If a URL is found, wrap the content in an anchor tag using the first URL
return `<a href="${url}"
target="_blank"
class="underline"
class="text-white underline"
style="text-underline-offset: 4px;"
>${text}</a>`;
} else {