fix(markdown): Ensure abbr: links render correctly in react-markdown v9+ (#20648)
This commit is contained in:
parent
7ae5819c67
commit
4f066454d0
2 changed files with 51 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ import RemarkGfm from 'remark-gfm'
|
|||
import RehypeRaw from 'rehype-raw'
|
||||
import { flow } from 'lodash-es'
|
||||
import cn from '@/utils/classnames'
|
||||
import { preprocessLaTeX, preprocessThinkTag } from './markdown-utils'
|
||||
import { customUrlTransform, preprocessLaTeX, preprocessThinkTag } from './markdown-utils'
|
||||
import {
|
||||
AudioBlock,
|
||||
CodeBlock,
|
||||
|
|
@ -65,6 +65,7 @@ export function Markdown(props: { content: string; className?: string; customDis
|
|||
}
|
||||
},
|
||||
]}
|
||||
urlTransform={customUrlTransform}
|
||||
disallowedElements={['iframe', 'head', 'html', 'meta', 'link', 'style', 'body', ...(props.customDisallowedElements || [])]}
|
||||
components={{
|
||||
code: CodeBlock,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue