diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index c0833caf72b..8936e0b5bef 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -282,6 +282,20 @@ function _MarkDownContent(props: { content: string }) { p: (pProps) =>

, a: (aProps) => { const href = aProps.href || ""; + if (/\.(aac|mp3|opus|wav)$/.test(href)) { + return ( +

+ +
+ ); + } + if (/\.(3gp|3g2|webm|ogv|mpeg|mp4|avi)$/.test(href)) { + return ( + + ); + } const isInternal = /^\/#/i.test(href); const target = isInternal ? "_self" : aProps.target ?? "_blank"; return ;