In some cases I'd like the marked library open links in new tabs, but the default behavior is to open in the same tab. This means you have to override then renderer but the documentation doesn't make it completely obvious how to do that. Here's how you can do it.
// src/utils/markdown.ts
import { marked } from "marked";
import type { Token, Tokens } from "marked";
export const renderMarkdown = (content: string) => {
try {
const renderer = new marked.Renderer();