import { ExternalLink, ExternalLinkIcon } from "lucide-react" interface DocAuthorProps { author: string } export function DocAuthor({ author }: DocAuthorProps) { if (!author || author.length === 0 || author === "undefined") { return null } return (

by {" "} {author.match(/\[([^\]]+)\]\(([^)]+)\)/g) ? author.split(",").map((authorItem, i) => { const match = authorItem.match(/\[([^\]]+)\]\(([^)]+)\)/) if (match) { return ( {i > 0 && " "} {match[1].trim()} ) } return ( {i > 0 && " "} {authorItem.trim()} ) }) : author.match(/(.*?)\s*<(https?:\/\/[^>]+)>/g) ? author.split(",").map((authorItem, i) => { const match = authorItem.match(/(.*?)\s*<(https?:\/\/[^>]+)>/) if (match) { return ( {i > 0 && " "} {match[1].trim()} ) } return ( {i > 0 && " "} {authorItem.trim()} ) }) : author}

) }