mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 16:23:41 +08:00 
			
		
		
		
	Merge pull request #1196 from ClarenceDan/main
fix: Resolve markdown link issue
This commit is contained in:
		@@ -46,8 +46,13 @@ function _MarkDownContent(props: { content: string }) {
 | 
			
		||||
      ]}
 | 
			
		||||
      components={{
 | 
			
		||||
        pre: PreCode,
 | 
			
		||||
        a: (aProps) => {
 | 
			
		||||
          const href = aProps.href || "";
 | 
			
		||||
          const isInternal = /^\/#/i.test(href);
 | 
			
		||||
          const target = isInternal ? "_self" : aProps.target ?? "_blank";
 | 
			
		||||
          return <a {...aProps} target={target} />;
 | 
			
		||||
        },
 | 
			
		||||
      }}
 | 
			
		||||
      linkTarget={"_blank"}
 | 
			
		||||
    >
 | 
			
		||||
      {props.content}
 | 
			
		||||
    </ReactMarkdown>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user