mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
Added the white text.
This commit is contained in:
parent
15565b23b7
commit
0ff4bde8e9
1 changed files with 1 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue