mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-11 20:43:42 +08:00
Update markdown.tsx
This commit is contained in:
@@ -96,7 +96,8 @@ export function Markdown(
|
||||
components={{
|
||||
pre: PreCode,
|
||||
a: (aProps) => {
|
||||
const isInternal = /^\/#/i.test(aProps.href);
|
||||
const href = aProps.href || "";
|
||||
const isInternal = /^\/#/i.test(href);
|
||||
const target = isInternal ? "_self" : aProps.target ?? "_blank";
|
||||
return <a {...aProps} target={target} />;
|
||||
},
|
||||
|
Reference in New Issue
Block a user